Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
Deserializer (const nByte *data, unsigned int size, nByte protocol=SerializationProtocol::DEFAULT) | |
bool | pop (Object &object) |
virtual JString & | toString (JString &retStr, bool withTypes=false) const |
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 |
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) |
With a Deserializer instance you can retrieve the original data that has been serialized into a byte-array by a Serializer instance, by the Photon Server or by other Photon Client platforms.
Deserializer | ( | const nByte * | data, |
unsigned int | size, | ||
nByte | protocol = SerializationProtocol::DEFAULT |
||
) |
Constructor: Creates a new instance that contains the passed data as payload.
data | a byte array, that has been retrieved by a call to Serializer::getData(), an unchanged copy of such a byte array or a byte array that is otherwise guaranteed to 100% conform to the format that's used by Serializer (for example data, that has been serialized by a compatible version of the Photon Server or of other Photon Client platforms), otherwise the behavior of this class is undefined. |
size | the size in bytes of data |
bool pop | ( | Object & | object | ) |
This function will deserialize all data in the Deserializer-instance, that has been serialized via a single call to Serializer::push(). If the Deserializer instance has been created by passing a byte array that has been created by a Serializer instance on which multiple push() calls have taken place, then an equivalent amount of calls to this function will be valid.
object | an Object-instance, in which the deserialized data will be stored |
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 |
Implements ToString.
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 |