OpenDaVINCI  4.16.0
odcore::serialization::SerializationFactory Class Reference

#include <SerializationFactory.h>

Public Member Functions

virtual ~SerializationFactory ()
 
virtual std::shared_ptr
< Serializer
getSerializer (ostream &out) const
 
virtual std::shared_ptr
< Deserializer
getDeserializer (istream &in) const
 
std::shared_ptr< SerializergetQueryableNetstringsSerializer (ostream &out) const
 
std::shared_ptr< DeserializergetQueryableNetstringsDeserializer (istream &in) const
 

Static Public Member Functions

static SerializationFactorygetInstance ()
 

Protected Member Functions

 SerializationFactory ()
 

Static Protected Member Functions

static void setSingleton (SerializationFactory *singleton)
 

Static Protected Attributes

static SerializationFactorym_singleton = NULL
 

Friends

class SerializationFactoryTestCase
 

Detailed Description

This class is the factory for providing serializers and deserializers.

Serializable

Constructor & Destructor Documentation

odcore::serialization::SerializationFactory::SerializationFactory ( )
protected
odcore::serialization::SerializationFactory::~SerializationFactory ( )
virtual

Member Function Documentation

std::shared_ptr< Deserializer > odcore::serialization::SerializationFactory::getDeserializer ( istream &  in) const
virtual

This method returns a deserializer.

Parameters
inInput stream for deserialization.
Returns
Deserializer.

Referenced by odcore::base::KeyValueConfiguration::operator>>(), odcore::data::Container::operator>>(), and odcore::data::image::CompressedImage::operator>>().

std::shared_ptr< Deserializer > odcore::serialization::SerializationFactory::getQueryableNetstringsDeserializer ( istream &  in) const

This method returns a QueryableNetstringsDeserializer.

Parameters
inInput stream for deserialization.
Returns
Deserializer.
std::shared_ptr< Serializer > odcore::serialization::SerializationFactory::getQueryableNetstringsSerializer ( ostream &  out) const

This method returns a QueryableNetstringsSerializer.

Parameters
outOutput stream for serialization.
Returns
Serializer.
std::shared_ptr< Serializer > odcore::serialization::SerializationFactory::getSerializer ( ostream &  out) const
virtual

This method returns a serializer.

Parameters
outOutput stream for serialization.
Returns
Serializer.

Referenced by odcore::base::KeyValueConfiguration::operator<<(), odcore::data::Container::operator<<(), and odcore::data::image::CompressedImage::operator<<().

void odcore::serialization::SerializationFactory::setSingleton ( SerializationFactory singleton)
staticprotected

This method sets the singleton pointer.

Parameters
singletonSingleton to be used.

References m_singleton.

Referenced by getInstance().

Friends And Related Function Documentation

friend class SerializationFactoryTestCase
friend

Member Data Documentation

SerializationFactory * odcore::serialization::SerializationFactory::m_singleton = NULL
staticprotected

Referenced by getInstance(), and setSingleton().