Photon C++ Client API
4.1.12.2
|
Public Member Functions | |
virtual | ~ToString (void) |
virtual JString | typeToString (void) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const =0 |
JString | toString (bool withTypes=false) const |
Detailed Description
This class provides an interface for printing the payload of an instance of any subclass to a string.
Every subclass of this class will provide an implementation for toString() in its public interface and will therefor be printable. The implementations for container classes will include the output-strings of their elements into their own output string.
Constructor & Destructor Documentation
§ ~ToString()
|
virtual |
Destructor.
Member Function Documentation
§ typeToString()
|
virtual |
- Remarks
- This function is intended for debugging purposes. For runtime type checking you should use RTTI's typeid() instead. Demangling and cutting off of namespaces will only happen on platforms, which offer a system functionality for demangling.
- Returns
- a string representation of the class name of the polymorphically correct runtime class of the instance, on which it is called on, after this class name has been demangled and eventual namespaces have been removed.
Reimplemented in Dictionary< EKeyType, EValueType >, Dictionary< nByte, Common::ExitGames::Common::Object >, Dictionary< nByte, Common::Object >, and DictionaryBase.
§ toString() [1/2]
|
pure virtual |
- Remarks
- The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
- Parameters
-
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
- Returns
- a JString representation of the instance and its contents for debugging purposes.
Implemented in JString, JVector< Etype >, JVector< Common::ExitGames::Common::JString >, JVector< nByte >, JVector< ExitGames::LoadBalancing::LobbyStatsRequest >, JVector< int >, JVector< Common::ExitGames::Common::JVector< unsigned int > >, JVector< ExitGames::LoadBalancing::Room *>, JVector< ExitGames::LoadBalancing::Player *>, JVector< Common::ExitGames::Common::Object >, JVector< ExitGames::LoadBalancing::FriendInfo >, JVector< ExitGames::Chat::Channel *>, JVector< ExitGames::Common::Object >, RoomOptions, Dictionary< EKeyType, EValueType >, Dictionary< nByte, Common::ExitGames::Common::Object >, Dictionary< nByte, Common::Object >, Hashtable, TrafficStatsGameLevel, RaiseEventOptions, Object, EGTime, TrafficStats, AuthenticationValues, AuthenticationValues, Player, LogFormatOptions, Room, Channel, Logger, WebFlags, DictionaryBase, BaseCharString, CustomTypeFactory< typeCode >, Serializer, FriendInfo, LobbyStatsRequest, LobbyStatsResponse, and DeSerializer.
§ toString() [2/2]
JString toString | ( | bool | withTypes = false | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
withTypes set to true, to include type information in the generated string
- Returns
- a JString representation of the instance and its contents for debugging purposes.
- See also
- JString