JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::context Class Referenceabstract

Provides extra information to routines used for extraction and serialization. More...

#include <jsonv/serialization/context.hpp>

+ Inheritance diagram for jsonv::context:

Public Member Functions

 context ()
 Create a new instance using the default formats (formats::global).
 
 context (jsonv::formats fmt, std::optional< jsonv::version > ver=std::nullopt, const void *userdata=nullptr)
 Create a new instance using the given fmt, ver and userdata.
 
const jsonv::formatsformats () const
 Get the formats object backing extraction and encoding.
 
const std::optional< jsonv::version > & version () const
 Get the version this context was created with.
 
const voiduser_data () const
 Get a pointer to arbitrary user data.
 

Detailed Description

Provides extra information to routines used for extraction and serialization.

Definition at line 25 of file context.hpp.

Member Function Documentation

◆ formats()

const jsonv::formats & jsonv::context::formats ( ) const
inline

Get the formats object backing extraction and encoding.

Definition at line 41 of file context.hpp.

◆ user_data()

const void * jsonv::context::user_data ( ) const
inline

Get a pointer to arbitrary user data.

Definition at line 56 of file context.hpp.

◆ version()

const std::optional< jsonv::version > & jsonv::context::version ( ) const
inline

Get the version this context was created with.

If no version was specified, this is std::nullopt – which means the caller did not care about versioning, not that the version is 0.0.

Definition at line 49 of file context.hpp.


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