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

An extractor for a type T with an extracting constructor. More...

#include <jsonv/serialization/extractor_construction.hpp>

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

Public Member Functions

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

Detailed Description

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

An extractor for a type T with an extracting constructor.

Four constructor shapes are accepted, preferred in this order: T(reader&, extraction_context&), T(reader&), T(const value&, extraction_context&) and T(const value&). The last two are the shapes which predate extraction 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 extractor_construction.hpp.

Member Function Documentation

◆ extract()

template<typename T >
virtual std::expected< void, ast_node_type > jsonv::extractor_construction< T >::extract ( extraction_context &  context,
reader &  from,
void *  into 
) const
inlineoverridevirtual
See also
extractor::extract

Implements jsonv::extractor.

Definition at line 46 of file extractor_construction.hpp.

◆ get_type()

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

Implements jsonv::extractor.

Definition at line 38 of file extractor_construction.hpp.


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