JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::serializer_for< T > Class Template Referenceabstract

A serializer for type T. More...

#include <jsonv/serialization/serializer_for.hpp>

+ Inheritance diagram for jsonv::serializer_for< T >:
+ Collaboration diagram for jsonv::serializer_for< T >:

Public Member Functions

virtual const std::type_info & get_type () const noexcept override
 
virtual void serialize (const serialization_context &context, const void *from, writer &to) const override
 

Protected Member Functions

virtual void serialize (const serialization_context &context, const T &from, writer &to) const =0
 Write from into to.
 

Detailed Description

template<typename T>
class jsonv::serializer_for< T >

A serializer for type T.

This is a utility class which converts the const void* used in the serializer interface into the more-friendly T.

See also
adapter_for
value_serializer_for

Definition at line 31 of file serializer_for.hpp.

Member Function Documentation

◆ get_type()

template<typename T >
virtual const std::type_info & jsonv::serializer_for< T >::get_type ( ) const
inlineoverridevirtualnoexcept
See also
serializer::get_type

Implements jsonv::serializer.

Definition at line 37 of file serializer_for.hpp.

◆ serialize() [1/2]

template<typename T >
virtual void jsonv::serializer_for< T >::serialize ( const serialization_context &  context,
const T &  from,
writer &  to 
) const
protectedpure virtual

◆ serialize() [2/2]

template<typename T >
virtual void jsonv::serializer_for< T >::serialize ( const serialization_context &  context,
const void *  from,
writer &  to 
) const
inlineoverridevirtual
See also
serializer::serialize

Implements jsonv::serializer.

Definition at line 43 of file serializer_for.hpp.

+ Here is the call graph for this function:

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