Compute Graph Framework SDK Reference  5.8
dw::framework::JsonParameterProvider Class Reference

Detailed Description

A parameter provider which retrieves parameter values from JSON data.

Definition at line 44 of file JsonParameterProvider.hpp.

Inheritance diagram for dw::framework::JsonParameterProvider:
Collaboration diagram for dw::framework::JsonParameterProvider:

Public Member Functions

nlohmann::json data () const noexcept
 Get the JSON data. More...
 
 JsonParameterProvider (nlohmann::json const *const data) noexcept
 Constructor. More...
 
void registerAt (TypeBasedParameterProvider &provider) const override
 
void setJson (nlohmann::json const *const data) noexcept
 Set the JSON data. More...
 
 ~JsonParameterProvider () override=default
 Destructor. More...
 
- Public Member Functions inherited from dw::framework::ITypeBasedParameterProviderChild
 ITypeBasedParameterProviderChild ()=default
 Default constructor. More...
 
virtual void registerAt (TypeBasedParameterProvider &provider) const =0
 Register handlers implemented in this parameter provider at the passed type base parameter provider. More...
 
virtual ~ITypeBasedParameterProviderChild ()=default
 Destructor. More...
 

Protected Member Functions

bool getBool (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a bool value. More...
 
bool getBoolByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a bool value from an array by index. More...
 
bool getFloat32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a float32_t value. More...
 
bool getFloat32ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a float32_t value from an array by index. More...
 
bool getFloat64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a float64_t value. More...
 
bool getFloat64ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a float64_t value from an array by index. More...
 
bool getInt16 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a int16_t value. More...
 
bool getInt16ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a int16_t value from an array by index. More...
 
bool getInt32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a int32_t value. More...
 
bool getInt32ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a int32_t value from an array by index. More...
 
bool getInt64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a int64_t value. More...
 
bool getInt64ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a int64_t value from an array by index. More...
 
bool getInt8 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a int8_t value. More...
 
bool getInt8ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a int8_t value from an array by index. More...
 
nlohmann::json const * getJson (dw::core::StringView const &key) const
 Get JSON value for the passed key. More...
 
bool getString (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a std::string value. More...
 
bool getStringByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a std::string value from an array by index. More...
 
bool getStringView (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a dw::core::StringView value. More...
 
bool getStringViewByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a dw::core::StringView value from an array by index. More...
 
bool getUint16 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a uint16_t value. More...
 
bool getUint16ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a uint16_t value from an array by index. More...
 
bool getUint32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a uint32_t value. More...
 
bool getUint32ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a uint32_t value from an array by index. More...
 
bool getUint64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a uint64_t value. More...
 
bool getUint64ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a uint64_t value from an array by index. More...
 
bool getUint8 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a uint8_t value. More...
 
bool getUint8ByIndex (dw::core::StringView const &key, size_t const index, void *const out) const
 Handler function to retrieve a uint8_t value from an array by index. More...
 
bool getVectorBool (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of bool value. More...
 
bool getVectorFloat32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of float32_t value. More...
 
bool getVectorFloat64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of float64_t value. More...
 
bool getVectorInt16 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of int16_t value. More...
 
bool getVectorInt32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of int32_t value. More...
 
bool getVectorInt64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of int64_t value. More...
 
bool getVectorInt8 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of int8_t value. More...
 
bool getVectorString (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of std::string value. More...
 
bool getVectorStringView (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of dw::core::StringView value. More...
 
bool getVectorUint16 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of uint16_t value. More...
 
bool getVectorUint32 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of uint32_t value. More...
 
bool getVectorUint64 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of uint64_t value. More...
 
bool getVectorUint8 (dw::core::StringView const &key, void *const out) const
 Handler function to retrieve a vector of uint8_t value. More...
 
 JsonParameterProvider (JsonParameterProvider &&)=default
 Move constructor. More...
 
 JsonParameterProvider (JsonParameterProvider const &)=default
 Copy constructor. More...
 
JsonParameterProvideroperator= (JsonParameterProvider &&) &=default
 Move assignment operator. More...
 
JsonParameterProvideroperator= (JsonParameterProvider const &) &=default
 Copy assignment operator. More...
 
- Protected Member Functions inherited from dw::framework::ITypeBasedParameterProviderChild
 ITypeBasedParameterProviderChild (ITypeBasedParameterProviderChild &&)=default
 Move constructor. More...
 
 ITypeBasedParameterProviderChild (ITypeBasedParameterProviderChild const &)=default
 Copy constructor. More...
 
ITypeBasedParameterProviderChildoperator= (ITypeBasedParameterProviderChild &&) &=default
 Move assignment operator. More...
 
ITypeBasedParameterProviderChildoperator= (ITypeBasedParameterProviderChild const &) &=default
 Copy assignment operator. More...
 

Constructor & Destructor Documentation

◆ JsonParameterProvider() [1/3]

dw::framework::JsonParameterProvider::JsonParameterProvider ( JsonParameterProvider const &  )
protecteddefault

Copy constructor.

◆ JsonParameterProvider() [2/3]

dw::framework::JsonParameterProvider::JsonParameterProvider ( JsonParameterProvider &&  )
protecteddefault

Move constructor.

◆ JsonParameterProvider() [3/3]

dw::framework::JsonParameterProvider::JsonParameterProvider ( nlohmann::json const *const  data)
noexcept

Constructor.

◆ ~JsonParameterProvider()

dw::framework::JsonParameterProvider::~JsonParameterProvider ( )
overridedefault

Destructor.

Member Function Documentation

◆ data()

nlohmann::json dw::framework::JsonParameterProvider::data ( ) const
noexcept

Get the JSON data.

◆ getBool()

bool dw::framework::JsonParameterProvider::getBool ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a bool value.

◆ getBoolByIndex()

bool dw::framework::JsonParameterProvider::getBoolByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a bool value from an array by index.

◆ getFloat32()

bool dw::framework::JsonParameterProvider::getFloat32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a float32_t value.

◆ getFloat32ByIndex()

bool dw::framework::JsonParameterProvider::getFloat32ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a float32_t value from an array by index.

◆ getFloat64()

bool dw::framework::JsonParameterProvider::getFloat64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a float64_t value.

◆ getFloat64ByIndex()

bool dw::framework::JsonParameterProvider::getFloat64ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a float64_t value from an array by index.

◆ getInt16()

bool dw::framework::JsonParameterProvider::getInt16 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a int16_t value.

◆ getInt16ByIndex()

bool dw::framework::JsonParameterProvider::getInt16ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a int16_t value from an array by index.

◆ getInt32()

bool dw::framework::JsonParameterProvider::getInt32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a int32_t value.

◆ getInt32ByIndex()

bool dw::framework::JsonParameterProvider::getInt32ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a int32_t value from an array by index.

◆ getInt64()

bool dw::framework::JsonParameterProvider::getInt64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a int64_t value.

◆ getInt64ByIndex()

bool dw::framework::JsonParameterProvider::getInt64ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a int64_t value from an array by index.

◆ getInt8()

bool dw::framework::JsonParameterProvider::getInt8 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a int8_t value.

◆ getInt8ByIndex()

bool dw::framework::JsonParameterProvider::getInt8ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a int8_t value from an array by index.

◆ getJson()

nlohmann::json const * dw::framework::JsonParameterProvider::getJson ( dw::core::StringView const &  key) const
protected

Get JSON value for the passed key.

◆ getString()

bool dw::framework::JsonParameterProvider::getString ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a std::string value.

◆ getStringByIndex()

bool dw::framework::JsonParameterProvider::getStringByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a std::string value from an array by index.

◆ getStringView()

bool dw::framework::JsonParameterProvider::getStringView ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a dw::core::StringView value.

◆ getStringViewByIndex()

bool dw::framework::JsonParameterProvider::getStringViewByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a dw::core::StringView value from an array by index.

◆ getUint16()

bool dw::framework::JsonParameterProvider::getUint16 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a uint16_t value.

◆ getUint16ByIndex()

bool dw::framework::JsonParameterProvider::getUint16ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a uint16_t value from an array by index.

◆ getUint32()

bool dw::framework::JsonParameterProvider::getUint32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a uint32_t value.

◆ getUint32ByIndex()

bool dw::framework::JsonParameterProvider::getUint32ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a uint32_t value from an array by index.

◆ getUint64()

bool dw::framework::JsonParameterProvider::getUint64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a uint64_t value.

◆ getUint64ByIndex()

bool dw::framework::JsonParameterProvider::getUint64ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a uint64_t value from an array by index.

◆ getUint8()

bool dw::framework::JsonParameterProvider::getUint8 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a uint8_t value.

◆ getUint8ByIndex()

bool dw::framework::JsonParameterProvider::getUint8ByIndex ( dw::core::StringView const &  key,
size_t const  index,
void *const  out 
) const
protected

Handler function to retrieve a uint8_t value from an array by index.

◆ getVectorBool()

bool dw::framework::JsonParameterProvider::getVectorBool ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of bool value.

◆ getVectorFloat32()

bool dw::framework::JsonParameterProvider::getVectorFloat32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of float32_t value.

◆ getVectorFloat64()

bool dw::framework::JsonParameterProvider::getVectorFloat64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of float64_t value.

◆ getVectorInt16()

bool dw::framework::JsonParameterProvider::getVectorInt16 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of int16_t value.

◆ getVectorInt32()

bool dw::framework::JsonParameterProvider::getVectorInt32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of int32_t value.

◆ getVectorInt64()

bool dw::framework::JsonParameterProvider::getVectorInt64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of int64_t value.

◆ getVectorInt8()

bool dw::framework::JsonParameterProvider::getVectorInt8 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of int8_t value.

◆ getVectorString()

bool dw::framework::JsonParameterProvider::getVectorString ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of std::string value.

◆ getVectorStringView()

bool dw::framework::JsonParameterProvider::getVectorStringView ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of dw::core::StringView value.

◆ getVectorUint16()

bool dw::framework::JsonParameterProvider::getVectorUint16 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of uint16_t value.

◆ getVectorUint32()

bool dw::framework::JsonParameterProvider::getVectorUint32 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of uint32_t value.

◆ getVectorUint64()

bool dw::framework::JsonParameterProvider::getVectorUint64 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of uint64_t value.

◆ getVectorUint8()

bool dw::framework::JsonParameterProvider::getVectorUint8 ( dw::core::StringView const &  key,
void *const  out 
) const
protected

Handler function to retrieve a vector of uint8_t value.

◆ operator=() [1/2]

JsonParameterProvider & dw::framework::JsonParameterProvider::operator= ( JsonParameterProvider &&  ) &
protecteddefault

Move assignment operator.

◆ operator=() [2/2]

JsonParameterProvider & dw::framework::JsonParameterProvider::operator= ( JsonParameterProvider const &  ) &
protecteddefault

Copy assignment operator.

◆ registerAt()

void dw::framework::JsonParameterProvider::registerAt ( TypeBasedParameterProvider provider) const
overridevirtual

◆ setJson()

void dw::framework::JsonParameterProvider::setJson ( nlohmann::json const *const  data)
noexcept

Set the JSON data.


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