Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SmartSockets::TipcMsg Class Reference

#include <rtworks/tmsg.h>

List of all members.

Public Methods

 TipcMsg ()
 TipcMsg (const TipcMt &mt) throw (TipcException)
 TipcMsg (int4 mtNum, const char *destination=(const char *) T_NULL, const char *sender=(const char *) T_NULL) throw (TipcException)
 TipcMsg (const char *mtName) throw (TipcException)
 TipcMsg (const T_IPC_MSG msg) throw (TipcException)
 TipcMsg (const TipcMsg &msg) throw (TipcException)
 ~TipcMsg () throw ()
void destroy () throw (TipcException)
TipcMsg * clone () const throw (TipcException)
 operator T_IPC_MSG () const throw ()
void traverse (TipcMsgTraverser *travObj) throw (TipcException)
bool isReadOnly () const throw (TipcException)
bool isCurrentFieldKnown () const throw (TipcException)
int2 getRefCount () const throw (TipcException)
int4 getSeqNum () const throw (TipcException)
uint4 getPacketSize () const throw (TipcException)
void encrypt () throw (TipcException)
void decrypt () throw (TipcException)
void ack () throw (TipcException)
void appendUnknown (T_IPC_FT field_type) throw (TipcException)
TipcMsg * nextMsgArray (int4 &size) const throw (TipcException)
bool * nextBoolArray (int4 &size) const throw (TipcException)
void nextUnknown () const throw (TipcException)
TipcMsg * getNamedMsgArray (const char *name, int4 &size) const throw (TipcException)
bool * getNamedBoolArray (const char *name, int4 &size) const throw (TipcException)
T_IPC_FT getTypeNamed (const char *name) const throw (TipcException)
bool existsNamed (const char *name) const throw (TipcException)
void setNameCurrent (const char *name) throw (TipcException)
const char * getNameCurrent () const throw (TipcException)
void deleteCurrent () throw (TipcException)
void deleteField (int4 index) throw (TipcException)
void deleteNamed (const char *name) throw (TipcException)
void print (T_OUT_FUNC out_func=(T_OUT_FUNC)::TutOut) const throw (TipcException)
void reset () throw (TipcException)
TipcMsg & operator= (const T_IPC_MSG msg) throw (TipcException)
TipcMsg & operator= (const TipcMsg &msg) throw (TipcException)
const char * getDest () const throw (TipcException)
void setDest (const char *dest_return) throw (TipcException)
const char * getSender () const throw (TipcException)
void setSender (const char *sender) throw (TipcException)
const TipcMt getType () const throw (TipcException)
int4 getTypeNum () const throw (TipcException)
void setType (const TipcMt &mt) throw (TipcException)
int4 getCurrent () const throw (TipcException)
void setCurrent (int4 field_num) throw (TipcException)
int4 getNumFields () const throw (TipcException)
void setNumFields (int4 num_fields) throw (TipcException)
int2 getPriority () const throw (TipcException)
void setPriority (int2 priority) throw (TipcException)
int4 getUserProp () const throw (TipcException)
void setUserProp (int4 user_prop) throw (TipcException)
bool getCompression () const throw (TipcException)
void setCompression (bool compression) throw (TipcException)
real8 getDeliveryTimeout () const throw (TipcException)
void setDeliveryTimeout (real8 timeout) throw (TipcException)
T_IPC_DELIVERY_MODE getDeliveryMode () const throw (TipcException)
void setDeliveryMode (T_IPC_DELIVERY_MODE mode) throw (TipcException)
T_IPC_LB_MODE getLbMode () const throw (TipcException)
void setLbMode (T_IPC_LB_MODE lb_mode) throw (TipcException)
bool isUsingHeaderStrEncode () const throw (TipcException)
void setHeaderStrEncode (bool header_encode) throw (TipcException)
const char * getMessageId () const throw (TipcException)
void generateMessageId () throw (TipcException)
const char * getCorrelationId () const throw (TipcException)
void setCorrelationId (const char *correlation_id) throw (TipcException)
const char * getReplyTo () const throw (TipcException)
void setReplyTo (const char *subj) throw (TipcException)
real8 getExpiration () const throw (TipcException)
void setExpiration (real8 expiration) throw (TipcException)
real8 getSenderTimestamp () const throw (TipcException)
void setSenderTimestamp (real8 timestamp) throw (TipcException)
real8 getArrivalTimestamp () const throw (TipcException)
void setArrivalTimestamp (real8 timestamp) throw (TipcException)
TipcMsg & operator<< (bool arg) throw (TipcException)
TipcMsg & operator<< (const bool *arg) throw (TipcException)
TipcMsg & operator<< (const void *arg) throw (TipcException)
TipcMsg & operator<< (char arg) throw (TipcException)
TipcMsg & operator<< (int2 arg) throw (TipcException)
TipcMsg & operator<< (const int2 *arg) throw (TipcException)
TipcMsg & operator<< (int4 arg) throw (TipcException)
TipcMsg & operator<< (const int4 *arg) throw (TipcException)
TipcMsg & operator<< (int8 arg) throw (TipcException)
TipcMsg & operator<< (const int8 *arg) throw (TipcException)
TipcMsg & operator<< (const TipcMsg &arg) throw (TipcException)
TipcMsg & operator<< (const TipcMsg *arg) throw (TipcException)
TipcMsg & operator<< (real4 arg) throw (TipcException)
TipcMsg & operator<< (const real4 *arg) throw (TipcException)
TipcMsg & operator<< (real8 arg) throw (TipcException)
TipcMsg & operator<< (const real8 *arg) throw (TipcException)
TipcMsg & operator<< (real16 arg) throw (TipcException)
TipcMsg & operator<< (const real16 *arg) throw (TipcException)
TipcMsg & operator<< (const char *arg) throw (TipcException)
TipcMsg & operator<< (const char **arg) throw (TipcException)
TipcMsg & operator<< (const XML &arg) throw (TipcException)
TipcMsg & operator<< (unsigned char arg) throw (TipcException)
const TipcMsg & operator>> (bool &arg) const throw (TipcException)
const TipcMsg & operator>> (const void *&arg) const throw (TipcException)
const TipcMsg & operator>> (char &arg) const throw (TipcException)
const TipcMsg & operator>> (int2 &arg) const throw (TipcException)
const TipcMsg & operator>> (const int2 *&arg) const throw (TipcException)
const TipcMsg & operator>> (int4 &arg) const throw (TipcException)
const TipcMsg & operator>> (const int4 *&arg) const throw (TipcException)
const TipcMsg & operator>> (int8 &arg) const throw (TipcException)
const TipcMsg & operator>> (const int8 *&arg) const throw (TipcException)
const TipcMsg & operator>> (TipcMsg &arg) const throw (TipcException)
const TipcMsg & operator>> (real4 &arg) const throw (TipcException)
const TipcMsg & operator>> (const real4 *&arg) const throw (TipcException)
const TipcMsg & operator>> (real8 &arg) const throw (TipcException)
const TipcMsg & operator>> (const real8 *&arg) const throw (TipcException)
const TipcMsg & operator>> (real16 &arg) const throw (TipcException)
const TipcMsg & operator>> (const real16 *&arg) const throw (TipcException)
const TipcMsg & operator>> (const char *&arg) const throw (TipcException)
const TipcMsg & operator>> (const char **&arg) const throw (TipcException)
const TipcMsg & operator>> (XML &arg) const throw (TipcException)
const TipcMsg & operator>> (unsigned char &arg) const throw (TipcException)
const TipcMsg & operator>> (TipcMsg *&arg) const throw (TipcException)
const TipcMsg & operator>> (bool *&arg) const throw (TipcException)
void append (const void *binary_data, int4 binary_size) throw (TipcException)
void append (char char_data) throw (TipcException)
void append (int2 int2_data) throw (TipcException)
void append (const int2 *int2_array_data, int4 int2_array_size) throw (TipcException)
void append (int4 int4_data) throw (TipcException)
void append (const int4 *int4_array_data, int4 int4_array_size) throw (TipcException)
void append (int8 int8_data) throw (TipcException)
void append (const int8 *int8_array_data, int4 int8_array_size) throw (TipcException)
void append (const TipcMsg &msg_data) throw (TipcException)
void append (const TipcMsg *msg_array_data, int4 msg_array_size) throw (TipcException)
void append (real4 real4_data) throw (TipcException)
void append (const real4 *real4_array_data, int4 real4_array_size) throw (TipcException)
void append (real8 real8_data) throw (TipcException)
void append (const real8 *real8_array_data, int4 real8_array_size) throw (TipcException)
void append (real16 real16_data) throw (TipcException)
void append (const real16 *real16_array_data, int4 real16_array_size) throw (TipcException)
void append (const char *str_data) throw (TipcException)
void append (const char **str_array_data, int4 str_array_size) throw (TipcException)
void append (const char *str_data, real8 real8_data) throw (TipcException)
void append (const XML &xml_data) throw (TipcException)
void append (unsigned char byte_data) throw (TipcException)
void append (bool bool_data) throw (TipcException)
void append (const bool *bool_array_data, int4 bool_array_size) throw (TipcException)
void appendTimestamp (real8 timestamp_data) throw (TipcException)
void appendTimestampArray (const real8 *timestamp_data, int4 real8_array_size) throw (TipcException)
void appendUtf8 (const char *str_data) throw (TipcException)
void appendUtf8 (const char **str_array_data, int4 str_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const void *binary_data, int4 binary_data_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const int2 *int2_array_data, int4 int2_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const int4 *int4_array_data, int4 int4_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const int8 *int8_array_data, int4 int8_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const TipcMsg &msg_data) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const TipcMsg *arg, int4 size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const real4 *real4_array_data, int4 real4_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const real8 *real8_array_data, int4 real8_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const real16 *real16_array_data, int4 size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const char *str_data) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const char **str_array_data, int4 str_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (const XML &xml_data) throw (TipcException)
T_IPC_MSG_FIELD appendPtr (bool *bool_array_data, int4 bool_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendTimestampArrayPtr (const real8 *timestamp_array_data, int4 timestamp_array_size) throw (TipcException)
T_IPC_MSG_FIELD appendUtf8Ptr (const char *str_data) throw (TipcException)
T_IPC_MSG_FIELD appendUtf8Ptr (const char **str_array_data, int4 str_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const void *binary_data, int4 binary_data_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const int2 *int2_array_data, int4 int2_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const int4 *int4_array_data, int4 int4_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const int8 *int8_array_data, int4 int8_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const TipcMsg &msg_data) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const TipcMsg *msg_array_data, int4 msg_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const real4 *real4_array_data, int4 real4_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const real8 *real8_array_data, int4 real8_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const real16 *real16_array_data, int4 size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const char *str_data) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const char **str_array_data, int4 str_array_size) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const XML &xml_data) throw (TipcException)
void updatePtr (T_IPC_MSG_FIELD field, const bool *bool_array_data, int4 bool_array_size) throw (TipcException)
void updateTimestampArrayPtr (T_IPC_MSG_FIELD field, const real8 *real8_array_data, int4 real8_array_size) throw (TipcException)
void updateUtf8Ptr (T_IPC_MSG_FIELD field, const char *str_data) throw (TipcException)
void updateUtf8Ptr (T_IPC_MSG_FIELD field, const char **str_array_data, int4 str_array_size) throw (TipcException)
const void * nextBinary (int4 &size) const throw (TipcException)
char nextChar () const throw (TipcException)
int2 nextInt2 () const throw (TipcException)
const int2 * nextInt2Array (int4 &size) const throw (TipcException)
int4 nextInt4 () const throw (TipcException)
const int4 * nextInt4Array (int4 &size) const throw (TipcException)
int8 nextInt8 () const throw (TipcException)
const int8 * nextInt8Array (int4 &size) const throw (TipcException)
const TipcMsg nextMsg () const throw (TipcException)
real4 nextReal4 () const throw (TipcException)
const real4 * nextReal4Array (int4 &size) const throw (TipcException)
real8 nextReal8 () const throw (TipcException)
const real8 * nextReal8Array (int4 &size) const throw (TipcException)
real16 nextReal16 () const throw (TipcException)
const real16 * nextReal16Array (int4 &size) const throw (TipcException)
const char * nextString () const throw (TipcException)
const char ** nextStringArray (int4 &size) const throw (TipcException)
const XML nextXML () const throw (TipcException)
unsigned char nextByte () const throw (TipcException)
bool nextBool () const throw (TipcException)
real8 nextTimestamp () const throw (TipcException)
const real8 * nextTimestampArray (int4 &size) const throw (TipcException)
const char * nextUtf8 () const throw (TipcException)
const char ** nextUtf8Array (int4 &size) const throw (TipcException)
void addNamed (const char *name, const void *value, int4 size) throw (TipcException)
void addNamed (const char *name, char value) throw (TipcException)
void addNamed (const char *name, int2 value) throw (TipcException)
void addNamed (const char *name, const int2 *value, int4 size) throw (TipcException)
void addNamed (const char *name, int4 value) throw (TipcException)
void addNamed (const char *name, const int4 *value, int4 size) throw (TipcException)
void addNamed (const char *name, int8 value) throw (TipcException)
void addNamed (const char *name, const int8 *value, int4 size) throw (TipcException)
void addNamed (const char *name, const TipcMsg &value) throw (TipcException)
void addNamed (const char *name, const TipcMsg *value, int4 size) throw (TipcException)
void addNamed (const char *name, real4 value) throw (TipcException)
void addNamed (const char *name, const real4 *value, int4 size) throw (TipcException)
void addNamed (const char *name, real8 value) throw (TipcException)
void addNamed (const char *name, const real8 *value, int4 size) throw (TipcException)
void addNamed (const char *name, real16 value) throw (TipcException)
void addNamed (const char *name, const real16 *value, int4 size) throw (TipcException)
void addNamed (const char *name, const char *value) throw (TipcException)
void addNamed (const char *name, const char **value, int4 size) throw (TipcException)
void addNamed (const char *name, const XML &value) throw (TipcException)
void addNamed (const char *name, unsigned char value) throw (TipcException)
void addNamed (const char *name, bool value) throw (TipcException)
void addNamed (const char *name, const bool *value, int4 size) throw (TipcException)
void addNamedTimestamp (const char *name, real8 value) throw (TipcException)
void addNamedTimestampArray (const char *name, const real8 *value, int4 size) throw (TipcException)
void addNamedUtf8 (const char *name, const char *value) throw (TipcException)
void addNamedUtf8Array (const char *name, const char **value, int4 size) throw (TipcException)
void addNamedUnknown (const char *name, T_IPC_FT field_type) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const bool *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const XML &value) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const real16 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const real8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const real4 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const TipcMsg *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const TipcMsg &value) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const int4 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const void *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const int2 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const int8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const char **value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedPtr (const char *name, const char *value) throw (TipcException)
T_IPC_MSG_FIELD addNamedTimestampArrayPtr (const char *name, const real8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedUtf8ArrayPtr (const char *name, const char **value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD addNamedUtf8Ptr (const char *name, const char *value) throw (TipcException)
const void * getNamedBinary (const char *name, int4 &size) const throw (TipcException)
char getNamedChar (const char *name) const throw (TipcException)
int2 getNamedInt2 (const char *name) const throw (TipcException)
const int2 * getNamedInt2Array (const char *name, int4 &size) const throw (TipcException)
int4 getNamedInt4 (const char *name) const throw (TipcException)
const int4 * getNamedInt4Array (const char *name, int4 &size) const throw (TipcException)
int8 getNamedInt8 (const char *name) const throw (TipcException)
const int8 * getNamedInt8Array (const char *name, int4 &size) const throw (TipcException)
const TipcMsg getNamedMsg (const char *name) const throw (TipcException)
real4 getNamedReal4 (const char *name) const throw (TipcException)
const real4 * getNamedReal4Array (const char *name, int4 &size) const throw (TipcException)
real8 getNamedReal8 (const char *name) const throw (TipcException)
const real8 * getNamedReal8Array (const char *name, int4 &size) const throw (TipcException)
real16 getNamedReal16 (const char *name) const throw (TipcException)
const real16 * getNamedReal16Array (const char *name, int4 &size) const throw (TipcException)
const char * getNamedString (const char *name) const throw (TipcException)
const char ** getNamedStringArray (const char *name, int4 &size) const throw (TipcException)
const XML getNamedXML (const char *name) const throw (TipcException)
unsigned char getNamedByte (const char *name) const throw (TipcException)
bool getNamedBool (const char *name) const throw (TipcException)
real8 getNamedTimestamp (const char *name) const throw (TipcException)
const real8 * getNamedTimestampArray (const char *name, int4 &size) const throw (TipcException)
const char * getNamedUtf8 (const char *name) const throw (TipcException)
const char ** getNamedUtf8Array (const char *name, int4 &size) const throw (TipcException)
void getNamedUnknown (const char *name) const throw (TipcException)
void updateNamed (const char *name, const void *value, int4 size) throw (TipcException)
void updateNamed (const char *name, char value) throw (TipcException)
void updateNamed (const char *name, int2 value) throw (TipcException)
void updateNamed (const char *name, const int2 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, int4 value) throw (TipcException)
void updateNamed (const char *name, const int4 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, int8 value) throw (TipcException)
void updateNamed (const char *name, const int8 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, const TipcMsg &value) throw (TipcException)
void updateNamed (const char *name, const TipcMsg *value, int4 size) throw (TipcException)
void updateNamed (const char *name, real4 value) throw (TipcException)
void updateNamed (const char *name, const real4 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, real8 value) throw (TipcException)
void updateNamed (const char *name, const real8 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, real16 value) throw (TipcException)
void updateNamed (const char *name, const real16 *value, int4 size) throw (TipcException)
void updateNamed (const char *name, const char *value) throw (TipcException)
void updateNamed (const char *name, const char **value, int4 size) throw (TipcException)
void updateNamed (const char *name, const XML &value) throw (TipcException)
void updateNamed (const char *name, unsigned char value) throw (TipcException)
void updateNamed (const char *name, bool value) throw (TipcException)
void updateNamed (const char *name, const bool *value, int4 size) throw (TipcException)
void updateNamedTimestamp (const char *name, real8 value) throw (TipcException)
void updateNamedTimestampArray (const char *name, const real8 *value, int4 size) throw (TipcException)
void updateNamedUtf8 (const char *name, const char *value) throw (TipcException)
void updateNamedUtf8 (const char *name, const char **value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const int8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const int4 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const int2 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const void *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const TipcMsg *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const TipcMsg &value) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const real4 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const real8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const real16 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const char **value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const char *value) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const XML &value) throw (TipcException)
T_IPC_MSG_FIELD updateNamedPtr (const char *name, const bool *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedTimestampArrayPtr (const char *name, const real8 *value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedUtf8Ptr (const char *name, const char **value, int4 size) throw (TipcException)
T_IPC_MSG_FIELD updateNamedUtf8Ptr (const char *name, const char *value) throw (TipcException)

Static Public Methods

void setFieldSize (T_IPC_MSG_FIELD field, int4 size) throw (TipcException)
const char * deliveryModeToStr (T_IPC_DELIVERY_MODE delivery_mode) throw (TipcException)
T_IPC_DELIVERY_MODE strToDeliveryMode (const char *delivery_str) throw (TipcException)
const char * ftToStr (T_IPC_FT type) throw (TipcException)
T_IPC_FT strToFt (const char *str) throw (TipcException)
const char * lbModeToStr (T_IPC_LB_MODE lb_mode) throw (TipcException)
T_IPC_LB_MODE strToLbMode (const char *str) throw (TipcException)
TipcMsg & setName (TipcMsg &msg, const char *name)
const TipcMsg & getName (const TipcMsg &msg, const char *&nameReturn)
TipcMsg & setSize (TipcMsg &msg, int4 size)
const TipcMsg & getSize (const TipcMsg &msg, int4 &size_return)

Protected Methods

void incrRefCount () throw (TipcException)

Friends

class T_IPCX_API TipcConn
class T_IPCX_API TipcSrv
class T_IPCX_API TipcMsgFile


Detailed Description

The methods of the TipcMsg class allow you to construct messages and to manipulate the data in a message. The TipcMsg class acts as a C++ interface to the SmartSockets TipcMsg* C language API functions. See the SmartSockets User's Guide for more information on message composition in SmartSockets applications.

The TipcMsg class has two ways of appending and accessing data fields from a message. The first is designed to provide an interface similar to the C API and consists of several append*() and next* member functions. The append*() and next*() member functions replace the prefixed TipcMsgAppend* and TipcMsgNext* functions of the C API.

The second method of appending and accessing data fields is designed to provide an interface similar to C++ IOstream classes. Overloaded insertion (operator<<) and extraction (operator>>) operators replace the prefixed TipcMsgAppend and TipcMsgNext* functions of the C API. The TipcMsg class contains a private SmartSockets C API T_IPC_MSG message.


Constructor & Destructor Documentation

SmartSockets::TipcMsg::TipcMsg   [inline]
 

Default constructor

SmartSockets::TipcMsg::TipcMsg const TipcMt   mt throw (TipcException)
 

Constructor.

Parameters:
mt  - TipcMt object used to determine the message type.
Exceptions:
TipcMsgException  if an invalid message type is passed.

SmartSockets::TipcMsg::TipcMsg int4    mtNum,
const char *    destination = (const char *)T_NULL,
const char *    sender = (const char *)T_NULL
throw (TipcException) [explicit]
 

Constructor

Parameters:
mtNum  - message type number either corresponding to a pre-defined SmartSockets message, or to a user-defined message created using the TipcMt::create() method.
destination  - optional parameter that sets the destination field of a message to a subject string (can be NULL).
sender  - optional parameter that sets the sender field of the message. Note that if the sender field is not set, it will default to the connection's unique subject.
Exceptions:
TipcMsgException  if an invalid message type number is passed, or the sender or destination cannot be set.

SmartSockets::TipcMsg::TipcMsg const char *    mtName throw (TipcException) [explicit]
 

Constructor

Parameters:
mtName  - message type name either corresponding to a pre-defined SmartSockets message, or to a user-defined message created using the TipcMt::create() method.
Exceptions:
TipcMsgException  if an invalid message type name is passed.

SmartSockets::TipcMsg::TipcMsg const T_IPC_MSG    msg throw (TipcException)
 

Constructor

Parameters:
msg  - C structure; used for compatibility with the C API.
Exceptions:
TipcMsgException  if a NULL C-structure is passed.

SmartSockets::TipcMsg::TipcMsg const TipcMsg &    msg throw (TipcException)
 

Copy Constructor that doesn't clone the whole message , but simply increments the reference count.

Exceptions:
TipcMsgException  if the reference count couldn't be increased.

SmartSockets::TipcMsg::~TipcMsg   throw ()
 

Destructor. Will only decrease the reference count and only destroy the message if the reference count is back to zero.

Exceptions:
TipcMsgException  if the reference count can't be decreased or if the message can't be destroyed.


Member Function Documentation

void SmartSockets::TipcMsg::ack   throw (TipcException)
 

Acknowledges successful delivery of a message by a receiving process. When a message with a delivery mode of T_IPC_DELIVERY_SOME or T_IPC_DELIVERY_ALL is sent through a connection with TipcConnMsgSend, the sender saves a copy of the message until some (in the case of T_IPC_DELIVERY_SOME) or all (in the case of T_IPC_DELIVERY_ALL) receiving processes acknowledge that they have received the message. ~TipcMsg() automatically calls ack() to ensure a received message is acknowledged before it is destroyed. ~TipcMsg() assumes that when a receiving process destroys a message, it is finished processing the message and that the message can be considered to have been successfully delivered to this receiving process. Ack() first updates the highest sequence number (based on the sequence number and sender of msg) in the GMD area of the connection the message was received on. The highest sequence number is used to detect duplicate messages . Ack() then creates a GMD_ACK message, appends an INT4 integer field containing the sequence number of the message being acknowledged, and sends the GMD_ACK message with TipcConn::send() through the same connection the message was received on. If the message's delivery mode is either T_IPC_DELIVERY_SOME or T_IPC_DELIVERY_ALL and the message has not already been acknowledged manually with ack(), then ~TipcMsg() first calls ack() to acknowledge successful delivery of the message to this receiving process.

void SmartSockets::TipcMsg::addNamed const char *    name,
const void *    value,
int4    size
throw (TipcException)
 

Inserts a named field into a message.

Warning:
Named fields should not be mixed with unnamed fields; use extreme caution if doing so. Messages using named fields should always have a grammar of verbose.
Exceptions:
TipcMsgException  if the name already exists in the message.

T_IPC_MSG_FIELD SmartSockets::TipcMsg::addNamedPtr const char *    name,
const bool *    value,
int4    size
throw (TipcException)
 

Inserts a named field into a message. Named fields should not be mixed with unnamed fields; use extreme caution if doing so. Messages using named fields should always have a grammar of verbose.

This method does not make a copy of data. Instead, the supplied pointer to the data is entered directly into the new message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

One advantage of TipcMsg::addNamedPtr() over TipcMsg::addNamed() is that the overhead of one copy operation is avoided, because the data is still copied into the connection message buffer when the message is sent. To update the pointer to point to a new memory location, use the appropriate TipcMsg::updateNamedPtr() method.

Returns:
a T_IPC_MSG_FIELD object that can be used to update individual fields without doing deep copies.
Exceptions:
TipcMsgException  if the name already exists in the message.

void SmartSockets::TipcMsg::append const void *    binary_data,
int4    binary_size
throw (TipcException)
 

Method used to sequentially insert fields without a name into a message. Fields added to a message using the append() method should only be extracted using the appropriate next*() method; it is not advisable to mix append() calls with calls to addNamed(); in general, either messages have all the fields named, or none at all.

T_IPC_MSG_FIELD SmartSockets::TipcMsg::appendPtr const void *    binary_data,
int4    binary_data_size
throw (TipcException)
 

Method used to sequentially insert unnamed fields without making a deep copy into a message. Fields added to a message using the appendPtr() method should only be extracted using the appropriate next*() method; it is not advisable to mix append() calls with calls to addNamed(); in general, either messages have all the fields named, or none at all. This method does not make a copy of data. Instead, the supplied pointer to the data is entered directly into the new message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

One advantage of TipcMsg::appendPtr() over TipcMsg::append() is that the data can be modified after the field is appended, but before the message is sent. Also, the overhead of one copy operation is avoided, because the data is still copied into the connection message buffer when the message is sent. To update the pointer to point to a new memory location, use the appropriate TipcMsg::updatePtr() method.

Returns:
a T_IPC_MSG_FIELD object that can be used to update individual fields.
See also:
updatePtr().

void SmartSockets::TipcMsg::appendTimestamp real8    timestamp_data throw (TipcException)
 

Method used to append Timestamp and Timestamp Array fields to the message

T_IPC_MSG_FIELD SmartSockets::TipcMsg::appendTimestampArrayPtr const real8 *    timestamp_array_data,
int4    timestamp_array_size
throw (TipcException)
 

Method uses to append Timestamp filed without making a deep copy into a message.

void SmartSockets::TipcMsg::appendUnknown T_IPC_FT    field_type throw (TipcException)
 

Method used to append an unknown field type into a message.

void SmartSockets::TipcMsg::appendUtf8 const char *    str_data throw (TipcException)
 

Method used to sequentially insert UTF8 string fields without a name into a message. Fields added to a message using the append() method should only be extracted using the appropriate next*() method; it is not advisable to mix append() calls with calls to addNamed(); in general, either messages have all the fields named, or none at all.

T_IPC_MSG_FIELD SmartSockets::TipcMsg::appendUtf8Ptr const char *    str_data throw (TipcException)
 

Method used to sequentially insert unnamed UTF8 string fields without making a deep copy into a message. Fields added to a message using the appendUtf8Ptr() method should only be extracted using the appropriate next*() method; it is not advisable to mix append() calls with calls to addNamed(); in general, either messages have all the fields named, or none at all. This method does not make a copy of data. Instead, the supplied pointer to the data is entered directly into the new message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

One advantage of TipcMsg::appendUtf8Ptr() over TipcMsg::appendUtf8() is that the data can be modified after the field is appended, but before the message is sent. Also, the overhead of one copy operation is avoided, because the data is still copied into the connection message buffer when the message is sent. To update the pointer to point to a new memory location, use the appropriate TipcMsg::updateUtf8Ptr() method.

Returns:
a T_IPC_MSG_FIELD object that can be used to update individual fields.
See also:
updatePtr().

TipcMsg* SmartSockets::TipcMsg::clone   const throw (TipcException)
 

Fully clones the contents of the message and creates a new object.

Exceptions:
TipcMsgException  if the message can't be cloned.

void SmartSockets::TipcMsg::decrypt   throw (TipcException)
 

Decrypts the current message if it has been previously encrypted. This method first checks to see if the message's message type has a key registered for it. If it does, decrypt() calls the decrypt function registered for that message type, and that decryption function decrypts the message.

Warning:
If the message type has an encrypt function associated with it, it needs a corresponding decrypt function to decrypt it.
See also:
TipcMt::setDecrypt() , TipcMt::setKey()

void SmartSockets::TipcMsg::deleteCurrent   throw (TipcException)
 

Deletes the current field of the message.

void SmartSockets::TipcMsg::deleteField int4    index throw (TipcException)
 

Deletes a specific field of the message.

void SmartSockets::TipcMsg::deleteNamed const char *    name throw (TipcException)
 

Deletes a named field of the message.

const char* SmartSockets::TipcMsg::deliveryModeToStr T_IPC_DELIVERY_MODE    delivery_mode throw (TipcException) [static]
 

Static converters that get string representations of various enumerations

void SmartSockets::TipcMsg::destroy   throw (TipcException) [inline]
 

Safely destroys the managed T_IPC_MSG message

void SmartSockets::TipcMsg::encrypt   throw (TipcException)
 

Encrypts the current message. This method first checks to see if the message's message type has a key registered for it. If it does, it calls the encrypt function registered for that message. That encryption function encrypts the function. Note that this modifies the current object; therefore, after calling encrypt(), a lot of the data accessor methods will not work properly.

See also:
TipcMt::setEncrypt() , TipcMt::setKey()

bool SmartSockets::TipcMsg::existsNamed const char *    name const throw (TipcException)
 

Determines whether or not a field with the given name exists in the message.

real8 SmartSockets::TipcMsg::getArrivalTimestamp   const throw (TipcException)
 

Accessor methods for the message arrival timestamp property. As messages are read, their arrival timestamp property will automatically be set. A value of 0.0 indicates that the arrival timestamp property was not set.

bool SmartSockets::TipcMsg::getCompression   const throw (TipcException)
 

Accessor method for the compression property of the message. The compression property indicates whether the message data is to be compressed at the time the message is sent. The message will not be uncompressed until a receiver of the message attempts to access any of the message data fields.

The compression used is governed by the Compression_Name and Compression_Args options.

When a message is created, its compression property is initialized to the message type compression property. This allows a default value to easily be set for all messages of a certain type.

Exceptions:
TipcMsgException  if this property cannot be accessed.

const char* SmartSockets::TipcMsg::getCorrelationId   const throw (TipcException)
 

Accessor methods for the message correlation ID property. The correlation ID is used to logically group together different messages. Applications of messages are free to use the correlation ID for any purpose; there are no restrictions on the format for this field; i.e. any string of any size can be used.

int4 SmartSockets::TipcMsg::getCurrent   const throw (TipcException)
 

Accessor method for the current message field index. The next*() methods will automatically increment the current field; however if random access to unnamed fields is required, then the field index may be moved using the setter method below.

Exceptions:
TipcMsgException  if this property cannot be retrieved or if it is set to a number out of the range of zero and getNumFields() - 1.

T_IPC_DELIVERY_MODE SmartSockets::TipcMsg::getDeliveryMode   const throw (TipcException)
 

Accessor method for the delivery mode property of the message. The delivery mode of a message controls what level of guarantee is used when the message is sent through a connection with TipcConn::send(). When a message is created, its delivery mode is initialized to the message type delivery mode. This allows a default value to easily be set for all messages of a certain type.

The default message delivery mode is T_IPC_DELIVERY_BEST_EFFORT. In this mode, no special actions are taken to ensure delivery of sent messages. The message is delivered unless network failures or process failures occur. If the message is not delivered, there is no way for the sender to know that delivery failed. When there is a failure, it is possible for some messages to be lost or be delivered in a different order than the order in which they were published.

In the case of a network or process failure, a more useful delivery mode is T_IPC_DELIVERY_ORDERED. Messages can still be lost in the event of a failure, but all delivered messages are received in the order in which they were published. Because Java Message Service (JMS) cannot handle messages that come out of order, you must use the T_IPC_DELIVERY_ORDERED delivery mode or one of the GMD delivery modes if you are sending messages to a JMS client.

The difference between the other delivery modes and the GMD delivery modes is that in GMD, a copy of the message is kept when the message is sent and acknowledgements are sent when the message is received. No acknowledgements (ACKs) are used in the ordered or best effort delivery modes, and no copy of the message is kept. One of the GMD delivery modes is T_IPC_DELIVERY_SOME. In this mode, the sending process saves a copy of the message in the connection GMD area until the message is successfully delivered, and the sender can also resend the message if necessary. Delivery is considered successful if the sent message is acknowledged by at least one receiving process.

The other and most robust GMD delivery mode is T_IPC_DELIVERY_ALL. In this mode, the sending process saves a copy of the message in the connection GMD area until the message is successfully delivered, and the sender can also resend the message if necessary. Delivery is not considered successful until all receiving processes acknowledge the sent message. For two processes communicating through a non- RTclient and non-RTserver T_IPC_CONN connection, T_IPC_DELIVERY_SOME and T_IPC_DELIVERY_ALL are identical because there is only one process receiving the message. For RTclients, the two modes do differ if more than one RTclient is subscribing to the subject in the destination of the message.

Exceptions:
TipcMsgException  if this property cannot be set or retrieved

real8 SmartSockets::TipcMsg::getDeliveryTimeout   const throw (TipcException)
 

Accessor method for the delivery timeout property of the message. The delivery timeout of a message is measured in seconds. It controls how long to wait for guaranteed message delivery to complete when a message is sent through a connection with TipcConn::send. When a message is created, its delivery timeout is initialized to the message type delivery timeout, which defaults to UNKNOWN. This allows a default value to be easily set for all messages of a certain type.

When a message is sent using GMD on a connection, the connection delivery timeout is used if the message delivery timeout is not set. The delivery timeout of a message is never sent through the connection, as it is only needed by the sending process.

Exceptions:
TipcMsgException  if this property cannot be set or retrieved

const char* SmartSockets::TipcMsg::getDest   const throw (TipcException)
 

Accessor method for the sender and detination properties of the message. The sender and destination properties are strings whose meanings depend on how the message is being used. Messages sent with publish-subscribe between RTclients by RTserver, for example, use a subject name for the message sender and destination properties. Other applications of messages are free to use the sender and destination for other purposes. Message sender and destination properties can be null if they are not needed.

real8 SmartSockets::TipcMsg::getExpiration   const throw (TipcException)
 

Accessor methods for the message reply-to property. The reply-to destination property is a string representing a subject where a reply to the message should be sent.

T_IPC_LB_MODE SmartSockets::TipcMsg::getLbMode   const throw (TipcException)
 

Accessor methods for the load balance mode property of the message. The load balancing mode of a message controls how (or if) the message is load balanced among RTclients subscribed to a load balanced subject. When a message is created, its load balancing mode is initialized to the message type load balancing mode. This allows a default value to easily be set for all messages of a certain type.

The default load balancing mode is T_IPC_LB_NONE. In this mode, no load balancing is done. The message is delivered to all RTclients subscribing to the subject to which the message is published.

The other load balancing modes are T_IPC_LB_ROUND_ROBIN, T_IPC_LB_WEIGHTED, and T_IPC_LB_SORTED. In these modes, one and only one RTclient in the list of potential receivers receives the message. In ROUND_ROBIN mode, each successive message is sent to the next RTclient in a circular list of RTclients, therefore, distributing the load evenly. The WEIGHTED mode sends the message to the most responsive RTclient (as measured by the fewest pending GMD acknowledgments), reasoning that this is also the RTclient with the least load. In SORTED mode, each message is sent to the RTclient whose unique subject name sorts lowest lexicographically.

Exceptions:
TipcMsgException  if this property cannot be set or retrieved due to a corrupt message, or if attempting to set the load balancing mode to WEIGHTED in a non- GMD message (with the error set to T_ERRNM_TYPE_INVALID).

const char* SmartSockets::TipcMsg::getMessageId   const throw (TipcException)
 

Accessor methods for the message ID property. The message identifier property is a string that represents a unique identifier for the message. Applications of messages are free to use the message identifier for any purpose. This message identifier is unique for all messages that are created anywhere. It is sent along with the message and adds 38 extra bytes to the message.

const char* SmartSockets::TipcMsg::getNameCurrent   const throw (TipcException)
 

Gets the name of the current field of the message.

const void* SmartSockets::TipcMsg::getNamedBinary const char *    name,
int4 &    size
const throw (TipcException)
 

Extracts a named field from a message.

Warning:
Named fields should not be mixed with unnamed fields; use extreme caution if doing so.
Messages using named fields should always have a grammar of verbose.
The memory returned should NOT BE FREED; it belongs to this class.
Exceptions:
TipcMsgException  if the name doesn't exists in the message, or if the given name was a NULL pointer, or if the wrong type extraction is attempted.
See also:
getTypeNamed()

bool* SmartSockets::TipcMsg::getNamedBoolArray const char *    name,
int4 &    size
const throw (TipcException)
 

Extracts a named field from a message.

Warning:
Named fields should not be mixed with unnamed fields; use extreme caution if doing so.
Messages using named fields should always have a grammar of verbose.
The memory returned MUST BE FREED using the detele[]; operator it belongs to this class. The following example shows how to do it:
 TipcMsg msg;
 bool booArray[2] = { true, false };

 msg.addNamed("bool array", boolArray, 2);
 ...
 msg.setCurrent(0);
 int4 size;
 bool* boolExtracted = getNamedMsgArray("bool array",size);
 ...
 delete[] boolExtracted;
Exceptions:
TipcMsgException  if the name doesn't exists in the message, or if the given name was a NULL pointer, or if the wrong type extraction is attempted.
See also:
getTypeNamed()

TipcMsg* SmartSockets::TipcMsg::getNamedMsgArray const char *    name,
int4 &    size
const throw (TipcException)
 

Extracts a named field from a message.

Warning:
Named fields should not be mixed with unnamed fields; use extreme caution if doing so.
Messages using named fields should always have a grammar of verbose.
The memory returned MUST BE FREED using the detele[]; operator it belongs to this class. The following example shows how to do it:
 TipcMsg msg;
 TipcMsg msgArr[2] = { TipcMsg(), TipcMsg ("info") };

 msg.addNamed("msg array", msgArr, 2);
 ...
 msg.setCurrent(0);
 int4 size;
 TipcMsg* msgArrExtracted = getNamedMsgArray("msg array",size);
 ...
 delete[] msgArrExtracted;
Exceptions:
TipcMsgException  if the name doesn't exists in the message, or if the given name was a NULL pointer, or if the wrong type extraction is attempted.
See also:
getTypeNamed()

int4 SmartSockets::TipcMsg::getNumFields   const throw (TipcException)
 

Accessor method for the number of fields of the message. The setter method sets the number of fields in a message by truncating the message to the desired number of fields; note that one can only decrease the number of fields (increasing it can be accomplished by calling one of the append*() methods). If num_fields is 0, the message is completely emptied (the message properties are not changed, but any fields in the data buffer are lost ). The reset() method is a convenience method that calls the setter method with a zero argument ; it is useful for reusing messages, rather than continually destroying and creating objects. The best example for message reuse is a publishing process.

uint4 SmartSockets::TipcMsg::getPacketSize   const throw (TipcException)
 

Gets the size of the message object's serialized form.

Exceptions:
TipcMsgException  if this property cannot be obtained due to an invalid message.

int2 SmartSockets::TipcMsg::getPriority   const throw (TipcException)
 

Accessor method for the priority property of the message. Message priorities are used by TipcConn::read to queue incoming messages in priority order. When a message is created, its priority is initialized to the message type priority (if set) or to the value of the option Default_Msg_Priority (if the message type priority is unknown). This allows a default value to be set easily for all messages of a certain type or for all messages.

See also:
TipcMt::getPriority()
Exceptions:
TipcMsgException  if this property cannot be accessed.

int2 SmartSockets::TipcMsg::getRefCount   const throw (TipcException)
 

Gets the current reference count.

See also:
TipcMsg::incrRefCount()
Exceptions:
TipcMsgException  if this property cannot be obtained due to an invalid message.

const char* SmartSockets::TipcMsg::getReplyTo   const throw (TipcException)
 

Accessor methods for the message reply-to property. The reply-to destination property is a string representing a subject where a reply to the message should be sent.

real8 SmartSockets::TipcMsg::getSenderTimestamp   const throw (TipcException)
 

Accessor methods for the message sender timestamp property. A value of 0.0 indicates that the sender timestamp property was not set.

int4 SmartSockets::TipcMsg::getSeqNum   const throw (TipcException)
 

Gets the sequence number of a message. The sequence number is used by GMD to detect duplicate messages. When a message with a delivery mode of T_IPC_DELIVERY_SOME or T_IPC_DELIVERY_ALL is sent through a connection, TipcConn:: send() increments an internal per-connection sequence number and sets the sequence number of the message to the incremented value. If the message is later resent because of a GMD failure, TipcConn::gmdMsgResend preserves the sequence number, which allows the receiving processes to detect the duplicate sequence number and thus avoid processing the same message twice. There is no setter method for this property.

Exceptions:
TipcMsgException  if this property cannot be obtained due to an invalid message.

const TipcMt SmartSockets::TipcMsg::getType   const throw (TipcException)
 

Accessor method for the message type property. Note that the contents of the message will be erased when the type is changed. If getting a message type that hasn't been created in this process use getTypeNum() (e.g. if the application attempts to filter out messages without knowing the source of the messages, getType() will throw an exception because the message type may not have been created in this process). Note that getType() returns a TipcMt object by value; since this is a failry light weight object, it's preferrable to pass it by value than to keep an internal reference.

T_IPC_FT SmartSockets::TipcMsg::getTypeNamed const char *    name const throw (TipcException)
 

Gets the type of a given named field. This is useful to prevent a TipcMsgException from being thrown by the getNamed*() methods.

Exceptions:
TipcMsgException  if the name doens't exist, or if the name is a NULL pointer.

int4 SmartSockets::TipcMsg::getUserProp   const throw (TipcException)
 

Accessor method for the user property of the message. You can use the user-defined property for any purpose, such as attaching a version number to messages. This property is not used internally by SmartSockets. When a message is sent through a connection with TipcConn::send(), the user-defined property is byte-swapped along with all the other integer message properties. On architectures where a pointer is four bytes, a pointer can be stored in the user-defined property of a message. This is useful for attaching extra temporary data to the message. Use pointers with caution; when a message is sent through a connection, the data the pointer refers to does not exist in the receiving process. In this situation, add extra fields to the message instead of using a pointer in the user-defined property. When a message is created, its user-defined property is initialized to the message type user-defined property. This allows a default value to easily be set for all messages of a certain type.

Exceptions:
TipcMsgException  if this property cannot be accessed.

void SmartSockets::TipcMsg::incrRefCount   throw (TipcException) [protected]
 

Increments the reference count of a message. The reference count property can be used to prevent a message from being destroyed. This is useful for keeping copies of messages whilst using methods that always destroy the TipcMsg object (e.g. TipcConn::mainLoop(), or TipcSrv::mainLoop()). For example, connection message- related callbacks are only given temporary access to a message, but sometimes these callbacks need to save the messages for later processing. When a message is created or read from a connection, its reference count is initialized to 1. Each call to TipcMsg:: incrRefCount() increments the reference count. Each call to TipcMsg::~TipcMsg() decrements the reference count. Once the reference count reaches 0, the internal T_IPC_MSG object is permanently destroyed.

While TipcMsg::clone() can also be used to copy a message, if the message is not going to be modified then TipcMsgIncrRefCount can be used instead. TipcMsgIncrRefCount is much faster than TipcMsg::clone() because no memory allocation and copying is performed.

bool SmartSockets::TipcMsg::isCurrentFieldKnown   const throw (TipcException)
 

Checks to see if the current field has a known value. This is used to map TipcMsg objects to database rows where some fields have an unknown value (where zero or a negative number may be valid choices).

Exceptions:
TipcMsgException  if this property cannot be obtained due to an invalid message.

bool SmartSockets::TipcMsg::isReadOnly   const throw (TipcException)
 

Gets the read-only property of a message. A message is marked read-only if the message is embedded as a field in another message.

Exceptions:
TipcMsgException  if the read-only flag cannot be read due to an invalid message.

bool SmartSockets::TipcMsg::isUsingHeaderStrEncode   const throw (TipcException)
 

Accessor methods for the header string encode property, which controls whether the message header string properties are converted into four-byte integers when the message is sent through a connection with TipcConnMsgSend. Enabling this property compresses the message header so that less network bandwidth is used, but this compression requires more CPU utilization.

When a message is created, its header string encode property is initialized to the message type header string encode property. This allows a default value to easily be set for all messages of a certain type.

const void* SmartSockets::TipcMsg::nextBinary int4 &    size const throw (TipcException)
 

Method to sequentially extract data from the message. If this method succeeds, it advances the current field to the next field in the message. Before extracting any fields from a message, it is advisable to set the current field to zero (or whatever field to be extracted).

Warning:
the memory returned by each method belongs to the message, and therefore, SHOULD NOT BE DELETED OR CHANGED.
Exceptions:
TipcMsgException  if the field cannot be extracted (this usually happens if attempting to go past the last field in the message).

bool* SmartSockets::TipcMsg::nextBoolArray int4 &    size const throw (TipcException)
 

Method to sequentially extract an array of bools from the message. If this method succeeds, it advances the current field to the next field in the message. Before extracting any fields from a message, it is advisable to set the current field to zero (or whatever field to be extracted).

Warning:
Unlike with the other next*() methods, the value returned by this method does not belong to the TipcMsg class; therefore, it SHOULD BE FREED with the delete[] operator.
Exceptions:
TipcMsgException  if the field cannot be extracted (this usually happens if attempting to go past the last field in the message).

TipcMsg* SmartSockets::TipcMsg::nextMsgArray int4 &    size const throw (TipcException)
 

Method to sequentially extract an array of messages from the message. If this method succeeds, it advances the current field to the next field in the message. Before extracting any fields from a message, it is advisable to set the current field to zero (or whatever field to be extracted).

Warning:
Unlike with the other next*() methods, the value returned by this method does not belong to the TipcMsg class; therefore, it SHOULD BE FREED with the delete[] operator.
Exceptions:
TipcMsgException  if the field cannot be extracted (this usually happens if attempting to go past the last field in the message).

void SmartSockets::TipcMsg::nextUnknown   const throw (TipcException)
 

Extract the next field as an unknown field.

Exceptions:
TipcMsgException  if the field cannot be extracted (this usually happens if attempting to go past the last field in the message, or if the field isn't unknown).
See also:
isCurrentFieldKnown()

SmartSockets::TipcMsg::operator T_IPC_MSG   const throw () [inline]
 

typecast operator used for compatibility with the C API; this gives access to the private _msg variable.

TipcMsg& SmartSockets::TipcMsg::operator<< bool    arg throw (TipcException)
 

Insertion operator. Provides a one to one mapping to the append() and addNamed() methods; (note that no compatibility was provided for the appendPtr(), addNamedPtr(), appendUtf8*(), and addNamedUtf8*() methods since there's no way to distinguish the signature). In order to provide full compatibility with the append and addNamed () methods, two modifiers (setSize() and setName()) were created:

  • setSize() allows the size of a binary or array field to be set; setSize() should be called before inserting a binary or array field:
        int4 int4Array [100];
        ...
        msg << setSize(100) << int4Array;
    
  • setName() allows a name to be given to the last appended field; setName() should be called after inserting a field:
      real8 real8Array [1000];
      ...
      msg << setSize(100) << real8Array << setName("named real8 array");
    

TipcMsg& SmartSockets::TipcMsg::operator= const T_IPC_MSG    msg throw (TipcException)
 

Assignment operator that copies the state of the TipcMsg class, without doing a full clone (deep copy), and simply increments a reference count.

Exceptions:
TipcMsgException  if the reference count couldn't be increased.

const TipcMsg& SmartSockets::TipcMsg::operator>> TipcMsg *&    arg const throw (TipcException)
 

Extraction operator. Provides a one to one mapping to the next*() and getNameCurrent() methods (note that no compatibility was provided for the getNamed*() method as that implies random access, and >> operators are sequencial in nature).

Warning:
The memory of the return value extracted MUST BE FREED using the delete[] operator as it does not belong to the TipcMsg class.
In order to provide full compatibility with the next*() and getNamed*() methods , two modifiers (getSize() and getName()) were created:

  • getSize() allows the size of the last binary or array field extracted to be obtained; getSize() should be called after extracting a binary or array field:
     bool* boolArray =(bool*) NULL;
     TipcMsg* msgArray = (TipcMsg*) NULL;
     int4 size1,size2;
     ...
     msg >> boolArray >> getSize(size1)
         >> msgArray  >> getSize(size2);
     ...
     delete [] boolArray;
     delete [] msgArray;
    
  • getName() allows the name of the next field to be extracted to be obtained. Note that this modifier should only be used to obtain the name of the current field, and not to determine which field to obtain:
     const real8* real8Array;
     const char*  name;
     int4 size;
     ...
     msg >> getName(name) >> real8Array >> getSize(size);
    

const TipcMsg& SmartSockets::TipcMsg::operator>> bool &    arg const throw (TipcException)
 

Extraction operator. Provides a one to one mapping to all the next*() and getNameCurrent() methods (note that no compatibility was provided for the getNamed*() methods as that implies random access, and >> operators are sequencial in nature).

Warning:
The memory of the return value extracted should NOT BE FREED as it belongs to the TipcMsg class.
In order to provide full compatibility with the next*() and getNamed*() methods , two modifiers (getSize() and getName()) were created:

  • getSize() allows the size of the last binary or array field extracted to be obtained; getSize() should be called after extracting a binary or array field:
     const int4* int4Array =(const int4*) NULL;
     int4 size;
     ...
     msg >> int4Array >> getSize(size);
    
  • getName() allows the name of the next field to be extracted to be obtained. Note that this modifier should only be used to obtain the name of the current field, and not to determine which field to obtain:
     const real8* real8Array;
     const char*  name;
     int4 size;
     ...
     msg >> getName(name) >> real8Array >> getSize(size);
    

void SmartSockets::TipcMsg::print T_OUT_FUNC    out_func = (T_OUT_FUNC) ::TutOut const throw (TipcException)
 

Prints the contents of the message using the given method.

Parameters:
out_func  pointer to a static method with the following signature: void func( char* formatStr, ...); the default value is TutOut, which outputs data to standard out. Note: on Windows platforms the function should be declared as follows: void T_ENTRY_VA T_EXPORT func (T_STR format_str,...);

void SmartSockets::TipcMsg::reset   throw (TipcException)
 

Resets the data contents of the message. This is a convenience method that sets the number of fields in a message to zero, therefore, allowing the same message to be reused. This is useful for publishing processes that publish the same message over and over with the same header properties, but different data payloads each time. If only some fields of a message will change, try to make those the last few fields in the message, and call the setNumFields() method.

void SmartSockets::TipcMsg::setFieldSize T_IPC_MSG_FIELD    field,
int4    size
throw (TipcException) [static]
 

Sets the size of a message pointer field .

Parameters:
field  value returned by one of the TipcMsg::append*Ptr methods.
size  - for scalar and binary field types, the size argument is specified in bytes for all array field types (including MSG_ARRAY), the size argument is specified in elements; for individual MSG fields, the size argument must always be zero.
Exceptions:
TipcMsgException  if the field cannot be set to the given size.

TipcMsg& SmartSockets::TipcMsg::setName TipcMsg &    msg,
const char *    name
[inline, static]
 

Methods used by the TipcMsgManipName and TipcMsgManipSize classes.

void SmartSockets::TipcMsg::setNameCurrent const char *    name throw (TipcException)
 

Sets the name of the current field in the message.

void SmartSockets::TipcMsg::traverse TipcMsgTraverser   travObj throw (TipcException)
 

Traverse all message fields. Allows users to sequentially go through every field of the TipcMsg.

Parameters:
travObj  an instance of a child class of TipcMsgTraverser
travMethod  a traversal method matching the signature of TipcMsgTraverser::onTraverse(). If the default NULL value is used, TipcMsgTraverser::onTraverse() is used.

void SmartSockets::TipcMsg::updateNamed const char *    name,
const void *    value,
int4    size
throw (TipcException)
 

Updates a named field appended by using the addNamedPtr() method in a message.

Exceptions:
TipcMsgException  if the value cannot be updated because of a type mismatch or an inexistant name.

T_IPC_MSG_FIELD SmartSockets::TipcMsg::updateNamedPtr const char *    name,
const int8 *    value,
int4    size
throw (TipcException)
 

Updates a named field appended by using the addNamedPtr() method in a message. The contents of the pointer are not copied. Instead, the supplied pointer is entered directly into the message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

Exceptions:
TipcMsgException  if the value cannot be updated because of a type mismatch or an inexistant name.

void SmartSockets::TipcMsg::updatePtr T_IPC_MSG_FIELD    field,
const void *    binary_data,
int4    binary_data_size
throw (TipcException)
 

Method used to update a field previously appended to the message using one of the TipcMsg::appendPtr() methods. The contents of the pointer are not copied. Instead, the supplied pointer is entered directly into the message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

Exceptions:
TipcMsgException  if the field cannot be updated.


The documentation for this class was generated from the following file:
Generated on Fri Jul 14 15:05:56 2006 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001