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

A deserializer for type T. More...

#include <jsonv/serialization/deserializer_for.hpp>

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

Public Member Functions

virtual const std::type_info & get_type () const noexcept override
 
virtual std::expected< void, ast_node_type > deserialize (deserialization_context &context, reader &from, void *into) const override
 

Protected Member Functions

virtual std::expected< T, ast_node_type > create (deserialization_context &context, reader &from) const =0
 Create an instance of T by reading from.
 

Detailed Description

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

A deserializer for type T.

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

See also
adapter_for

Definition at line 30 of file deserializer_for.hpp.

Member Function Documentation

◆ create()

template<typename T >
virtual std::expected< T, ast_node_type > jsonv::deserializer_for< T >::create ( deserialization_context &  context,
reader &  from 
) const
protectedpure virtual

Create an instance of T by reading from.

See also
adapter_for::create

Implemented in jsonv::function_deserializer< T, FDeserialize >.

◆ deserialize()

template<typename T >
virtual std::expected< void, ast_node_type > jsonv::deserializer_for< T >::deserialize ( deserialization_context &  context,
reader &  from,
void *  into 
) const
inlineoverridevirtual
See also
deserializer::deserialize

Implements jsonv::deserializer.

Definition at line 44 of file deserializer_for.hpp.

+ Here is the call graph for this function:

◆ get_type()

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

Implements jsonv::deserializer.

Definition at line 36 of file deserializer_for.hpp.


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