Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
virtual nByte | getTypeCode (void) const =0 |
virtual bool | compare (const CustomTypeBase &other) const =0 |
virtual void | duplicate (CustomTypeBase *pRetVal) const =0 |
virtual void | deserialize (const nByte *pData, short length)=0 |
virtual short | serialize (nByte *pRetVal) const =0 |
virtual JString & | toString (JString &retStr, bool withTypes=false) const=0 |
JString | toString (bool withTypes=false) const |
Public Member Functions inherited from Base | |
virtual | ~Base (void)=0 |
Public Member Functions inherited from LoggingBase< Base > | |
virtual | ~LoggingBase (void)=0 |
Public Member Functions inherited from ToString | |
virtual | ~ToString (void) |
virtual JString | typeToString (void) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const =0 |
JString | toString (bool withTypes=false) const |
Additional Inherited Members | |
Static Public Member Functions inherited from LoggingBase< Base > | |
static void | setListener (const BaseListener *pBaseListener) |
static int | getDebugOutputLevel (void) |
static bool | setDebugOutputLevel (int debugLevel) |
static const LogFormatOptions & | getLogFormatOptions (void) |
static void | setLogFormatOptions (const LogFormatOptions &options) |
This is the abstract base class for the CustomType template and declares the interface, which you will have to implement, when subclassing CustomType.
For example implementations of these functions please refer to class SampleCustomType in demo_typeSupport.
|
pure virtual |
This function should be implemented to behave like an operator== would behave for the class, for which this function gets implemented.
For example for a wrapperclass around an integer it could just be implemented like this:
other | the object to compare the instance with |
|
pure virtual |
This function shall save a copy of the instance, on which it has been called on, in its return value.
pRetVal | the object, to store a copy of the instance in - has to be of the instance type or a subclass of it, otherwise the behavior will be undefined |
|
pure virtual |
This function initializes the instance, on which it has been called on, by deserializing the passed nByte-array, which has to be created by a call to serialize() on an instance of the same class before.
Previous data, stored in the instance, gets overwritten.
pData | a nByte-array, holding the deserialized payload of an object, which class has to be the same like the one of the instance, on which the function gets called |
length | the length of pData in elements |
|
pure virtual |
This function serializes the payload of the instance on which it has been called, into the passed nByte-array and returns the length of that array. It is legal to pass a NULL-pointer and in that case this function still calculates the length of the data, which would have been stored in a non-NULL-pointer, but does not store any data. The behavior for providing a too small array is undefined.
pRetVal | the nByte-array to store the serialized payload of the instance in. Has to be of at least the needed length |
toString |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
JString toString |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |