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

A deserializer for a type T with a deserializing constructor. More...

#include <jsonv/serialization/deserializer_construction.hpp>

+ Inheritance diagram for jsonv::deserializer_construction< T >:
+ Collaboration diagram for jsonv::deserializer_construction< 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
 

Detailed Description

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

A deserializer for a type T with a deserializing constructor.

Four constructor shapes are accepted, preferred in this order: T(reader&, deserialization_context&), T(reader&), T(const value&, deserialization_context&) and T(const value&). The last two are the shapes which predate deserialization running off a reader; they are handed a subtree materialised by read_value, so they keep working but pay for the tree they were always paying for.

Definition at line 32 of file deserializer_construction.hpp.

Member Function Documentation

◆ deserialize()

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

Implements jsonv::deserializer.

Definition at line 46 of file deserializer_construction.hpp.

◆ get_type()

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

Implements jsonv::deserializer.

Definition at line 38 of file deserializer_construction.hpp.


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