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

An adapter for "wrapper" types. More...

#include <jsonv/serialization/wrapper_adapter.hpp>

+ Inheritance diagram for jsonv::wrapper_adapter< TWrapper >:
+ Collaboration diagram for jsonv::wrapper_adapter< TWrapper >:

Protected Member Functions

virtual TWrapper create (const extraction_context &context, const value &from) const override
 
virtual value to_json (const serialization_context &context, const TWrapper &from) const override
 

Additional Inherited Members

- Public Member Functions inherited from jsonv::adapter_for< TWrapper >
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.
 

Detailed Description

template<typename TWrapper>
class jsonv::wrapper_adapter< TWrapper >

An adapter for "wrapper" types.

Template Parameters
TWrapperA wrapper type with a member value_type which represents the underlying wrapped type. This must be explicitly convertible to and from the value_type.

Definition at line 28 of file wrapper_adapter.hpp.

Member Function Documentation

◆ create()

template<typename TWrapper >
virtual TWrapper jsonv::wrapper_adapter< TWrapper >::create ( const extraction_context context,
const value from 
) const
inlineoverrideprotectedvirtual

Implements jsonv::adapter_for< TWrapper >.

Definition at line 34 of file wrapper_adapter.hpp.

◆ to_json()

template<typename TWrapper >
virtual value jsonv::wrapper_adapter< TWrapper >::to_json ( const serialization_context context,
const TWrapper from 
) const
inlineoverrideprotectedvirtual

Implements jsonv::adapter_for< TWrapper >.

Definition at line 39 of file wrapper_adapter.hpp.


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