JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::function_adapter< T, FExtract, FToJson > Class Template Reference
+ Inheritance diagram for jsonv::function_adapter< T, FExtract, FToJson >:
+ Collaboration diagram for jsonv::function_adapter< T, FExtract, FToJson >:

Public Member Functions

template<typename FUExtract , typename FUToJson >
 function_adapter (FUExtract &&extract_, FUToJson &&to_json_)
 
- Public Member Functions inherited from jsonv::adapter_for< T >
virtual const std::type_info & get_type () const override
 Get the run-time type this extractor knows how to extract.
 
virtual void extract (const extraction_context &context, const value &from, void *into) const override
 Extract a the type from a value into a region of memory.
 
virtual value to_json (const serialization_context &context, const void *from) const override
 Create a value from the value in the given region of memory.
 

Protected Member Functions

virtualcreate (const extraction_context &context, const value &from) const override
 
virtual value to_json (const serialization_context &context, const T &from) const override
 

Detailed Description

template<typename T, typename FExtract, typename FToJson>
class jsonv::function_adapter< T, FExtract, FToJson >

Definition at line 24 of file function_adapter.hpp.

Constructor & Destructor Documentation

◆ function_adapter()

jsonv::function_adapter< T, FExtract, FToJson >::function_adapter ( FUExtract &&  extract_,
FUToJson &&  to_json_ 
)
inlineexplicit

Definition at line 29 of file function_adapter.hpp.

Member Function Documentation

◆ create()

virtual T jsonv::function_adapter< T, FExtract, FToJson >::create ( const extraction_context context,
const value from 
) const
inlineoverrideprotectedvirtual

Implements jsonv::adapter_for< T >.

Definition at line 35 of file function_adapter.hpp.

◆ to_json()

virtual value jsonv::function_adapter< T, FExtract, FToJson >::to_json ( const serialization_context context,
const T &  from 
) const
inlineoverrideprotectedvirtual

Implements jsonv::adapter_for< T >.

Definition at line 40 of file function_adapter.hpp.


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