FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
FotoSHOCKcore::XmlSerializer Class Reference

Class for serializing data. More...

#include <XmlSerializer.hpp>

Public Member Functions

 XmlSerializer (const XmlNode &node)
 A constructor.
 
template<typename T >
XmlSerializeroperator<< (const NVPtype< T > &nvp)
 Serialize data. More...
 
XmlSerializeroperator<< (const XmlNode &node)
 
template<typename T >
deserialize (const char *name)
 Deserialize data. More...
 

Detailed Description

Class for serializing data.

This class provides a clean interface to seriaze and deserialize data in the ImageOperation::serialize() function.

The OperationSerializer objects can be constructed only by the GraphManager class, to ensure that the serialized data are stored at a correct place in the XML tree.

Member Function Documentation

template<typename T >
T FotoSHOCKcore::XmlSerializer::deserialize ( const char *  name)
inline

Deserialize data.

Parameters
nvpname-value pair to deserialize. The name is used to find the corresponding serialized data. These data are then deserialized and stored in the value of the nvp.
Returns
reference to the serializer object. This allows chaining of multiple operator<< similarly to what std::cout does.
template<typename T >
XmlSerializer& FotoSHOCKcore::XmlSerializer::operator<< ( const NVPtype< T > &  nvp)
inline

Serialize data.

Parameters
nvpname-value pair to store. To create such pair easily, use one of the nvp() functions
Returns
reference to the serializer object. This allows chaining of multiple operator<< similarly to what std::cin does.

The documentation for this class was generated from the following file: