IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::ISerializer Interface Reference

Interface for helper classes that perform serialization/deserialization of objects. More...

Inheritance diagram for IG::Lib::ISerializer:

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.
Deserialize< T > (Stream deserializationStream)
 Deserializes an object from the specified stream containing JSON representation of the object. Deserialized object is instantiated and returned.
DeserializeString< T > (string strSerialized)
 Deserializes an object from JSON - serialized string representation and returns it.
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 > ( serializedObject,
Stream  serializationStream 
)

Serializes the specified object and outputs it to a stream.

Template Parameters:
TType of the object to be serialized.
Parameters:
serializedObjectObject to be serialized.
serializationStreamStream on which the serialized object is output.

Implemented in IG::Lib::SerializerBase, IG::Lib::SerializerJson, and IG::Lib::SerializerJsonBase.

void IG::Lib::ISerializer::Serialize< 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:
TType of the object to be serialized.
Parameters:
serializedObjectObject to be serialized.
filePathPath to the file that serialized object is written to.

Implemented in IG::Lib::SerializerBase.

void IG::Lib::ISerializer::Serialize< T > ( serializedObject,
string  filePath,
bool  append 
)

Serializes the specified object and outputs it to a file.

Template Parameters:
TType of the object to be serialized.
Parameters:
serializedObjectObject to be serialized.
filePathPath to the file that serialized object is written to.
appendIf true then the generated contents is appended to a file.

Implemented in IG::Lib::SerializerBase.

string IG::Lib::ISerializer::Serialize< T > ( obj)

Serializes the specified object to a string and returns it.

Template Parameters:
TType of the object to be serialized.
Parameters:
objObjejct 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:
TType of the deserialized object.
Parameters:
deserializationStreamStream 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:
TType of the deserialized object.
Parameters:
strSerializedString 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:
TType of the deserialized object.
Parameters:
filePathPath 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:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events