ConfigDB::PropertyConst Class Reference

Read-only access to a key/value pair stored in an object, or a simple array value. More...

#include <Property.h>

Inheritance diagram for ConfigDB::PropertyConst:
Collaboration diagram for ConfigDB::PropertyConst:

Public Member Functions

 PropertyConst ()=default
 
 PropertyConst (const Store &store, const PropertyInfo &info, const PropertyData *data)
 Create a PropertyConst instance. More...
 
String getValue () const
 Retrieve the property value as a string. More...
 
 operator bool () const
 
String getJsonValue () const
 Get property value as a valid JSON string. More...
 
const PropertyInfoinfo () const
 Access property type information. More...
 

Protected Attributes

const PropertyInfopropinfo {&PropertyInfo::empty}
 
const Storestore {}
 
const PropertyDatadata {}
 

Detailed Description

Read-only access to a key/value pair stored in an object, or a simple array value.

Constructor & Destructor Documentation

◆ PropertyConst() [1/2]

ConfigDB::PropertyConst::PropertyConst ( )
default

◆ PropertyConst() [2/2]

ConfigDB::PropertyConst::PropertyConst ( const Store store,
const PropertyInfo info,
const PropertyData data 
)
inline

Create a PropertyConst instance.

Parameters
infoProperty information
dataPointer to location where value is stored

Member Function Documentation

◆ getJsonValue()

String ConfigDB::PropertyConst::getJsonValue ( ) const

Get property value as a valid JSON string.

Return values
StringCan return "null", numeric, boolean or quoted string

◆ getValue()

String ConfigDB::PropertyConst::getValue ( ) const

Retrieve the property value as a string.

◆ info()

const PropertyInfo& ConfigDB::PropertyConst::info ( ) const
inline

Access property type information.

◆ operator bool()

ConfigDB::PropertyConst::operator bool ( ) const
inlineexplicit

Member Data Documentation

◆ data

const PropertyData* ConfigDB::PropertyConst::data {}
protected

◆ propinfo

const PropertyInfo* ConfigDB::PropertyConst::propinfo {&PropertyInfo::empty}
protected

◆ store

const Store* ConfigDB::PropertyConst::store {}
protected

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