Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::TemplateJSONConverter< Base, Derived, Traits > Class Template Reference

#include <jsonconverter.h>

+ Inheritance diagram for inviwo::TemplateJSONConverter< Base, Derived, Traits >:

Public Member Functions

virtual std::string_view getClassIdentifier () const override
 
virtual void toJSON (json &j, const Base &p) const override
 
virtual void fromJSON (const json &j, Base &p) const override
 
- Public Member Functions inherited from inviwo::JSONConverter< Base >

Detailed Description

template<typename Base, typename Derived, template< typename... > typename Traits>
requires std::is_base_of_v<Base, Derived>
class inviwo::TemplateJSONConverter< Base, Derived, Traits >

Convert between JSON and Property. A TemplatePropertyJSONConverter requires implementations of to_json(json& j, const TProperty& p) and from_json(const json& j, TProperty& p).

Member Function Documentation

◆ fromJSON()

template<typename Base , typename Derived , template< typename... > typename Traits>
virtual void inviwo::TemplateJSONConverter< Base, Derived, Traits >::fromJSON ( const json & j,
Base & p ) const
inlineoverridevirtual

Converts a JSON object to a Derived to a JSON object. Requires that to_json(json& j, const Derived& p) has been implemented.

Implements inviwo::JSONConverter< Base >.

◆ getClassIdentifier()

template<typename Base , typename Derived , template< typename... > typename Traits>
virtual std::string_view inviwo::TemplateJSONConverter< Base, Derived, Traits >::getClassIdentifier ( ) const
inlineoverridevirtual

◆ toJSON()

template<typename Base , typename Derived , template< typename... > typename Traits>
virtual void inviwo::TemplateJSONConverter< Base, Derived, Traits >::toJSON ( json & j,
const Base & p ) const
inlineoverridevirtual

Converts a Derived to a JSON object. Requires that to_json(json& j, const Derived& p) has been implemented.

Implements inviwo::JSONConverter< Base >.


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