Interface for helper classes that perform serialization/deserialization of objects.
More...
List of all members.
Public Member Functions |
void | Serialize< T > (T serializedObject, Stream serializationStream) |
| Serializes the specified object and outputs it to a stream.
|
void | Serialize< T > (T serializedObject, string filePath) |
| Serializes the specified object and outputs it to a file. If the specified file exists then it is overwritten.
|
void | Serialize< T > (T serializedObject, string filePath, bool append) |
| Serializes the specified object and outputs it to a file.
|
string | Serialize< T > (T obj) |
| Serializes the specified object to a string and returns it.
|
T | Deserialize< T > (Stream deserializationStream) |
| Deserializes an object from the specified stream containing JSON representation of the object. Deserialized object is instantiated and returned.
|
T | DeserializeString< T > (string strSerialized) |
| Deserializes an object from JSON - serialized string representation and returns it.
|
T | DeserializeFile< T > (string filePath) |
| Deserializes an object from JSON - serialized file and returns it.
|
Detailed Description
Interface for helper classes that perform serialization/deserialization of objects.
Member Function Documentation
void IG::Lib::ISerializer::Serialize< T > |
( |
T |
serializedObject, |
|
|
Stream |
serializationStream |
|
) |
| |
void IG::Lib::ISerializer::Serialize< T > |
( |
T |
serializedObject, |
|
|
string |
filePath |
|
) |
| |
Serializes the specified object and outputs it to a file. If the specified file exists then it is overwritten.
- Template Parameters:
-
T | Type of the object to be serialized. |
- Parameters:
-
serializedObject | Object to be serialized. |
filePath | Path to the file that serialized object is written to. |
Implemented in IG::Lib::SerializerBase.
void IG::Lib::ISerializer::Serialize< T > |
( |
T |
serializedObject, |
|
|
string |
filePath, |
|
|
bool |
append |
|
) |
| |
Serializes the specified object and outputs it to a file.
- Template Parameters:
-
T | Type of the object to be serialized. |
- Parameters:
-
serializedObject | Object to be serialized. |
filePath | Path to the file that serialized object is written to. |
append | If true then the generated contents is appended to a file. |
Implemented in IG::Lib::SerializerBase.
string IG::Lib::ISerializer::Serialize< T > |
( |
T |
obj | ) |
|
Serializes the specified object to a string and returns it.
- Template Parameters:
-
T | Type of the object to be serialized. |
- Parameters:
-
obj | Objejct to be serialized. |
- Returns:
- String containing the serialized object.
Implemented in IG::Lib::SerializerBase.
T IG::Lib::ISerializer::Deserialize< T > |
( |
Stream |
deserializationStream | ) |
|
Deserializes an object from the specified stream containing JSON representation of the object. Deserialized object is instantiated and returned.
- Template Parameters:
-
T | Type of the deserialized object. |
- Parameters:
-
deserializationStream | Stream from which object is deserialized. |
- Returns:
- Object that is deserialized from the stream.
Implemented in IG::Lib::SerializerBase, and IG::Lib::SerializerJsonBase.
T IG::Lib::ISerializer::DeserializeString< T > |
( |
string |
strSerialized | ) |
|
Deserializes an object from JSON - serialized string representation and returns it.
- Template Parameters:
-
T | Type of the deserialized object. |
- Parameters:
-
strSerialized | String containing the serialized object. |
- Returns:
- Object instantiated form the serialiyed representation.
Implemented in IG::Lib::SerializerBase.
T IG::Lib::ISerializer::DeserializeFile< T > |
( |
string |
filePath | ) |
|
Deserializes an object from JSON - serialized file and returns it.
- Template Parameters:
-
T | Type of the deserialized object. |
- Parameters:
-
filePath | Path to thefile. File must contain the appropriately serialized object of the correct type. |
- Returns:
- Object deserialized from the file.
Implemented in IG::Lib::SerializerBase.
The documentation for this interface was generated from the following file: