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

JSON primitive types mapper. More...

#include <primitiveMapper.hpp>

Inheritance diagram for anch::json::PrimitiveMapper< T >:
Collaboration diagram for anch::json::PrimitiveMapper< T >:

Public Member Functions

 PrimitiveMapper (const PrimitiveMapper &other)=delete
 PrimitiveMapper (PrimitiveMapper &&other)=delete
void serializeValue (const T &value, anch::json::WriterContext &context) const
bool deserializeValue (T &value, anch::json::ReaderContext &context) const
Public Member Functions inherited from anch::json::GenericMapper< PrimitiveMapper< T >, T >
void serialize (const T &value, anch::json::WriterContext &context) const
bool deserialize (T &value, anch::json::ReaderContext &context) const

Additional Inherited Members

Protected Member Functions inherited from anch::json::GenericMapper< PrimitiveMapper< T >, T >
 GenericMapper ()
virtual ~GenericMapper ()

Detailed Description

template<typename T>
class anch::json::PrimitiveMapper< T >

JSON primitive types mapper.

JSON primitive types does not have any fields.

Template Parameters
Tthe object type
Author
Vincent Lachenal
Since
0.1

Constructor & Destructor Documentation

◆ PrimitiveMapper() [1/2]

template<typename T>
anch::json::PrimitiveMapper< T >::PrimitiveMapper ( const PrimitiveMapper< T > & other)
delete

Forbids PrimitiveMapper copy constructor

Parameters
otherthe other mapper not to copy

◆ PrimitiveMapper() [2/2]

template<typename T>
anch::json::PrimitiveMapper< T >::PrimitiveMapper ( PrimitiveMapper< T > && other)
delete

Forbids PrimitiveMapper move constructor

Parameters
otherthe other mapper not to move

Member Function Documentation

◆ deserializeValue()

template<typename T>
bool anch::json::PrimitiveMapper< T >::deserializeValue ( T & value,
anch::json::ReaderContext & context ) const

Deserialize JSON value

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

◆ serializeValue()

template<typename T>
void anch::json::PrimitiveMapper< T >::serializeValue ( const T & value,
anch::json::WriterContext & context ) const

Serialize JSON value

Parameters
valuethe value to serialize
contextthe writer context

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