AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
anch::rest::MapperRegistry Class Reference

#include <mapperRegistry.hpp>

Inheritance diagram for anch::rest::MapperRegistry:
Collaboration diagram for anch::rest::MapperRegistry:

Public Member Functions

 MapperRegistry ()
 ~MapperRegistry ()
template<typename T>
void registerMapper (const std::string &contentType, const T &mapper)
template<typename T>
void serialize (const std::string &contentType, T value, std::ostream &out)
template<typename T>
void deserialize (const std::string &contentType, T &value, std::istream &input)

Detailed Description

Mapper registry

Author
Vincent Lachenal
Since
0.1

Constructor & Destructor Documentation

◆ MapperRegistry()

anch::rest::MapperRegistry::MapperRegistry ( )

MapperRegistry default constructor

◆ ~MapperRegistry()

anch::rest::MapperRegistry::~MapperRegistry ( )

MapperRegistry destructor

Member Function Documentation

◆ deserialize()

template<typename T>
void anch::rest::MapperRegistry::deserialize ( const std::string & contentType,
T & value,
std::istream & input )

Deserialize object according to content type

Template Parameters
theobject type
Parameters
contentTypethe content type
valuethe object
inputthe input stream to read fomr

◆ registerMapper()

template<typename T>
void anch::rest::MapperRegistry::registerMapper ( const std::string & contentType,
const T & mapper )

Register mapper

Template Parameters
themapper type
Parameters
contentTypethe content type to register the mapper
mapperthe mapper to register

◆ serialize()

template<typename T>
void anch::rest::MapperRegistry::serialize ( const std::string & contentType,
T value,
std::ostream & out )

Serialize object according to content type

Template Parameters
theobject type
Parameters
contentTypethe content type
valuethe object
outthe output stream to write in

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