Generic mapper. More...
#include <genericMapper.hpp>
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 () |
Generic mapper.
Based on C++ CRT. It provides generic functions for collections mapping.
M | the inherited class type (mapper) |
T | the type to map |
|
protected |
GenericMapper defaullt protected constructor
|
delete |
Forbids GenericMapper copy constructor
other | the GenericMapper not to copy |
|
delete |
Forbids GenericMapper move constructor
other | the GenericMapper not to move |
|
protectedvirtual |
GenericMapper destructor
bool anch::json::GenericMapper< M, T >::deserialize | ( | std::list< T > & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
bool anch::json::GenericMapper< M, T >::deserialize | ( | std::map< std::string, T > & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
bool anch::json::GenericMapper< M, T >::deserialize | ( | std::optional< T > & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
null
, false
otherwise bool anch::json::GenericMapper< M, T >::deserialize | ( | std::set< T > & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
bool anch::json::GenericMapper< M, T >::deserialize | ( | std::vector< T > & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
bool anch::json::GenericMapper< M, T >::deserialize | ( | T * | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the mapping context |
null
, false
otherwise