AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
anch::json::GenericMapper< M, T > Class Template Reference

Generic mapper. More...

#include <genericMapper.hpp>

Inheritance diagram for anch::json::GenericMapper< M, T >:
Collaboration diagram for anch::json::GenericMapper< M, T >:

Public Member Functions

 GenericMapper (const GenericMapper< M, T > &other)=delete
 GenericMapper (GenericMapper< M, T > &&other)=delete
bool deserialize (std::optional< T > &value, anch::json::ReaderContext &context) const
bool deserialize (T *value, anch::json::ReaderContext &context) const
bool deserialize (std::vector< T > &value, anch::json::ReaderContext &context) const
bool deserialize (std::list< T > &value, anch::json::ReaderContext &context) const
bool deserialize (std::set< T > &value, anch::json::ReaderContext &context) const
bool deserialize (std::map< std::string, T > &value, anch::json::ReaderContext &context) const

Protected Member Functions

 GenericMapper ()
virtual ~GenericMapper ()

Detailed Description

template<typename M, typename T>
class anch::json::GenericMapper< M, T >

Generic mapper.

Based on C++ CRT. It provides generic functions for collections mapping.

Parameters
Mthe inherited class type (mapper)
Tthe type to map
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ GenericMapper() [1/3]

template<typename M, typename T>
anch::json::GenericMapper< M, T >::GenericMapper ( )
protected

GenericMapper defaullt protected constructor

◆ GenericMapper() [2/3]

template<typename M, typename T>
anch::json::GenericMapper< M, T >::GenericMapper ( const GenericMapper< M, T > & other)
delete

Forbids GenericMapper copy constructor

Parameters
otherthe GenericMapper not to copy
Here is the call graph for this function:

◆ GenericMapper() [3/3]

template<typename M, typename T>
anch::json::GenericMapper< M, T >::GenericMapper ( GenericMapper< M, T > && other)
delete

Forbids GenericMapper move constructor

Parameters
otherthe GenericMapper not to move
Here is the call graph for this function:

◆ ~GenericMapper()

template<typename M, typename T>
virtual anch::json::GenericMapper< M, T >::~GenericMapper ( )
protectedvirtual

GenericMapper destructor

Member Function Documentation

◆ deserialize() [1/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( std::list< T > & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context

◆ deserialize() [2/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( std::map< std::string, T > & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context

◆ deserialize() [3/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( std::optional< T > & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context
Returns
\false when value is null , false otherwise

◆ deserialize() [4/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( std::set< T > & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context

◆ deserialize() [5/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( std::vector< T > & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context

◆ deserialize() [6/6]

template<typename M, typename T>
bool anch::json::GenericMapper< M, T >::deserialize ( T * value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

Parameters
valuethe value to set
contextthe mapping context
Returns
\false when value is null , false otherwise

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