Skip to content

cvedia::rt::CValue

Class for objects used to store values and transfer information inside CVEDIA-RT.

#include <cvalue.h>

Public Functions

Name
CValue()
Constructor for CValue object.
~CValue()
Constructor for CValue object.
CValue(CValueType cvalueType)
Constructor for CValue object.
CValue(bool x)
Constructor for CValue object.
CValue(char * x)
Constructor for CValue object.
CValue(char const x[])
Constructor for CValue object.
CValue(int const & x)
Constructor for CValue object.
CValue(float const & x)
Constructor for CValue object.
CValue(double const & x)
Constructor for CValue object.
CValue(std::vector< std::string > const & x)
Constructor for CValue object.
CValue(std::vector< float > const & x)
Constructor for CValue object.
CValue(std::vector< int > const & x)
Constructor for CValue object.
CValue(std::vector< Point2f > const & x)
Constructor for CValue object.
CValue(std::map< std::string, std::string > const & x)
Constructor for CValue object.
CValue(cmem const & x)
Constructor for CValue object.
CValue(Rect2f const & x)
Constructor for CValue object.
CValue(Point2f const & x)
Constructor for CValue object.
CValue(Color4f const & x)
Constructor for CValue object.
CValue(cbuffer const & x)
Constructor for CValue object.
CValue(CValue const & x)
Constructor for CValue object.
CValue deepCopy() const
Constructor for CValue object.
void operator=(bool x)
Set a CValue object to the specified value.
void operator=(int x)
Set a CValue object to the specified value.
void operator=(float x)
Set a CValue object to the specified value.
void operator=(double x)
Set a CValue object to the specified value.
void operator=(char *const & x)
Set a CValue object to the specified value.
void operator=(std::vector< float > const & x)
Set a CValue object to the specified value.
void operator=(std::vector< int > const & x)
Set a CValue object to the specified value.
void operator=(Rect2f const & x)
Set a CValue object to the specified value.
void operator=(cbuffer const & x)
Set a CValue object to the specified value.
void operator=(cmem const & x)
Set a CValue object to the specified value.
template <typename T >
T
getValueOr(T const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
int getValueOr(int const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
float getValueOr(float const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
double getValueOr(double const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
bool getValueOr(bool const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
string getValueOr(string const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
cvec getValueOr(cvec const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
cmap getValueOr(cmap const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
expected< Rect2f > getValue() const
Gets the value present on a CValue object, in case of failure return another object.
Rect getValueOr(Rect const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
Rect2f getValueOr(Rect2f const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
vector< float > getValueOr(vector< float > const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
vector< string > getValueOr(vector< string > const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
vector< Point2f > getValueOr(vector< Point2f > const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
vector< vector< float > > getValueOr(vector< vector< float > > const & alt) const
Gets the value present on a CValue object, in case of failure return another object.
template <typename T >
bool
checkValueHasChanged(std::string const & key, T const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, bool const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, string const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, int const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, float const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, cvec const & value) const
Check if the value on key is accessible and has changed.
bool checkValueHasChanged(std::string const & key, cmap const & value) const
Check if the value on key is accessible and has changed.
bool setValue(bool x)
Sets the value of a CValue object present on the specified key.
bool setValue(int x)
Sets the value of a CValue object present on the specified key.
bool setValue(float x)
Sets the value of a CValue object present on the specified key.
bool setValue(double x)
Sets the value of a CValue object present on the specified key.
bool setValue(char * x)
Sets the value of a CValue object present on the specified key.
bool setValue(char const x[])
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< std::string > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< float > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< int > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< Point2f > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::map< std::string, std::string > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::map< std::string, pCValue > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::map< std::string, pCValue > && x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::shared_ptr< std::vector< unsigned char > > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(Rect2f const & r)
Sets the value of a CValue object present on the specified key.
bool setValue(Point2f const & r)
Sets the value of a CValue object present on the specified key.
bool setValue(Color4f const & r)
Sets the value of a CValue object present on the specified key.
bool setValue(cbuffer const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< pCValue > const & x)
Sets the value of a CValue object present on the specified key.
bool setValue(std::vector< pCValue > && x)
Sets the value of a CValue object present on the specified key.
bool setValue(CValue const & x)
Sets the value of a CValue object present on the specified key.
template <typename T >
bool
getValueIfSet(string const & key, T & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, bool & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, string & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, int & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, float & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, double & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, cvec & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
bool getValueIfSet(string const & key, cmap & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
template <typename T >
bool
_getValueIfSet(string const & key, T & dest) const
Set the dest parameter reference to the value present on a corresponding key inside a CValue object.
template <typename T >
T
getValueOr(string const & key, T const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
bool getValueOr(string const & key, bool const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
string getValueOr(string const & key, string const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
cbuffer getValueOr(string const & key, cbuffer const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
int getValueOr(string const & key, int const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
float getValueOr(string const & key, float const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
double getValueOr(string const & key, double const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
cvec getValueOr(string const & key, cvec const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
cmap getValueOr(string const & key, cmap const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
template <typename T >
T
_getValueOr(string const & key, T const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
vector< float > getValueOr(string const & key, vector< float > const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
vector< Point2f > getValueOr(string const & key, vector< Point2f > const & alt) const
Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.
CValue(int * x) =delete
CValue(float * x) =delete
CValue(double * x) =delete
CValue(std::string const & x)
CValue(std::string && x)
CValue(std::map< std::string, pCValue > const & x)
CValue(std::map< std::string, pCValue > && x)
CValue(std::vector< pCValue > const & x)
CValue(std::vector< pCValue > && x)
pCValue operator[](std::string const & key)
String subscript operator, only to be used in CValue's of map type_ to return a CValue on the specified key.
pCValue operator[](std::vector< std::string > const & keys)
Gets CValue object present on the specified key.
pCValue operator[](size_t x)
Integer subscript operator, only to be used in CValue's of vector type_.
void operator=(std::string const & x)
void operator=(std::vector< std::string > const & x)
void operator=(std::map< std::string, std::string > const & x)
std::ostream & operator<<(std::ostream & out) const
bool pushBack(pCValue const & val)
Adds aCValue object to the current vector.
bool pushBackCircular(pCValue const & val, size_t maxBufferSize)
Adds a CValue object to the current circular vector buffer. A maximum number of items for the buffer is supplied, if that value is reached, the oldest item is removed.
bool removeAt(size_t index)
Removes an element from a CValue vector object at the specified index.
pCValue at(size_t index)
Get an element from a CValue vector object at the specified index.
void clear()
Clear a CValue object, keep its type_.
expected< void > addValue(double val)
expected< void > subValue(double val)
expected< void > addValue(std::string const & key, double val)
expected< void > subValue(std::string const & key, double val)
template <typename T >
expected< T >
getValue() const
template <typename T >
T const &
getValueRef() const
template <typename T >
expected< T >
_getValue(std::string const & key) const
template <typename T >
expected< T >
getValue(std::string const & key) const
template <typename T >
T
getValueOr(std::string const & key, T const & alt) const
template <typename T >
bool
getValueIfSet(std::string const & key, T & dest) const
bool setValue(std::string const & key, bool x)
bool setValue(std::string const & key, int x)
bool setValue(std::string const & key, float x)
bool setValue(std::string const & key, double x)
bool setValue(std::string const & key, std::string const & x)
bool setValue(std::string const & key, char *const & x)
bool setValue(std::string const & key, Rect2f const & x)
bool setValue(std::string const & key, cbuffer const & x)
bool setValue(std::string const & key, std::vector< float > const & x)
bool setValue(std::string const & key, CValue const & x)
bool setValue(std::string const & key, cvec const & x)
bool setValue(std::string const & key, cmap const & x)
bool setValue(std::string const & x)
bool setValue(std::string && x)
bool setValue(CValue * )
bool setValue(CValue const * )
bool setValue(std::string const & , CValue * )
bool setValue(std::string const & , CValue const * )
void unsetValue(std::string const & key)
Remove a key from a map type_ CValue object.
std::vector< std::string > getKeyNames() const
Get a list with all the key names on a map.
int removeEmptyEntries()
Remove all empty entries from a map.
void removeRunTimeVars()
Filter a map and remove all entries with runtime property enabled *.
pCValue getChild(std::string const & x) const
pCValue getChild(std::vector< std::string > const & x) const
Gets CValue object present on the specified key path.
pCValue getChildOrCreate(std::string const & x)
Gets CValue object present on the specified key, if the key does not exist, create a new one.
std::vector< std::string > getKeys()
expected< pCValue > getChildIfSet(std::string const & x) const
expected< pCValue > findChild(std::string const & path) const
expected< pCValue > findChild(std::vector< std::string > const & path) const
expected< void > deleteChild(std::string const & path)
pCValue getChild(size_t x) const
Gets CValue object present on the specified vector index.
bool hasChild(std::string const & key) const
bool hasChild(std::vector< std::string > const & keys)
cmap::iterator begin()
Get a map iterator to the begin of a map type_ CValue object.
cmap::iterator end()
Get a map iterator to the end of a map type_ CValue object.
size_t size() const
Set the CValueType of a CValue object.
bool isEmpty() const
Get id CValue is an Empty object.
std::string str(int numberPrecision =4) const
Get a CValue as string.
CValueType const & getType() const
Get the CValueType of a CValue object.
void enableTracking(bool recursive =false)
void disableTracking(bool recursive =false)
bool isTrackingEnabled() const
CValueTracker * getTracker() const
void dumpHolders() const
CValue(CValue && src)
CValue & operator=(CValue const & val)
expected< int > getValue() const
expected< bool > getValue() const
expected< float > getValue() const
expected< double > getValue() const
expected< string > getValue() const
expected< cvec > getValue() const
expected< cmap > getValue() const
expected< cbuffer > getValue() const
expected< cmem > getValue() const
template <typename T >
T const &
getValueRef() const
bool const & getValueRef() const
double const & getValueRef() const
string const & getValueRef() const
cvec const & getValueRef() const
cmap const & getValueRef() const
cbuffer const & getValueRef() const
cmem const & getValueRef() const
template <typename T >
expected< T >
_getValue(string const & key) const
template <typename T >
expected< T >
getValue(string const & key) const
expected< int > getValue(string const & key) const
expected< float > getValue(string const & key) const
expected< double > getValue(string const & key) const
expected< bool > getValue(string const & key) const
expected< string > getValue(string const & key) const
expected< Rect2f > getValue(string const & key) const
expected< cvec > getValue(string const & key) const
expected< cmap > getValue(string const & key) const
expected< cbuffer > getValue(string const & key) const
template <typename T >
bool
_setKeyValue(string const & key, T const & x)
template <typename T >
bool
_setVecValue(vector< T > const & x)
pCValue findChildOrCreate(pCValue root, std::string const & path)
pCValue diff(pCValue const & first, pCValue const & second, bool symmetricDiff)
pCValue merge(pCValue const & first, pCValue const & second)
pCValue override(pCValue const & first, pCValue const & second)
int64_t getTypeCount(CValueType t)
int64_t getTotalAlive()
void publishStats()

Public Attributes

Name
bool runtimeVar_
bool bVal
double dVal
std::string sVal
std::vector< pCValue > vVal
std::map< std::string, pCValue > mVal
cbuffer bufferVal
std::shared_ptr< std::vector< unsigned char > > memVal

Friends

Name
class TrackedCValuePtr

Public Functions Documentation

function CValue

CValue()

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function ~CValue

~CValue()

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    CValueType cvalueType
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    bool x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    char * x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    char const x[]
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    int const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    float const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    double const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    std::vector< std::string > const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    std::vector< float > const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    std::vector< int > const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    std::vector< Point2f > const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    std::map< std::string, std::string > const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    cmem const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    Rect2f const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    Point2f const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    Color4f const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    cbuffer const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function CValue

explicit CValue(
    CValue const & x
)

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function deepCopy

CValue deepCopy() const

Constructor for CValue object.

CValue is a generic object used to store data from different types and allowing conversion to/from LUA and Json

function operator=

void operator=(
    bool x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    int x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    float x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    double x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    char *const & x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    std::vector< float > const & x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    std::vector< int > const & x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    Rect2f const & x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    cbuffer const & x
)

Set a CValue object to the specified value.

function operator=

void operator=(
    cmem const & x
)

Set a CValue object to the specified value.

function getValueOr

template <typename T >
T getValueOr(
    T const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

int getValueOr(
    int const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

float getValueOr(
    float const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

double getValueOr(
    double const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

bool getValueOr(
    bool const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

string getValueOr(
    string const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

cvec getValueOr(
    cvec const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

cmap getValueOr(
    cmap const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValue

expected< Rect2f > getValue() const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

Rect getValueOr(
    Rect const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

Rect2f getValueOr(
    Rect2f const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< float > getValueOr(
    vector< float > const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< string > getValueOr(
    vector< string > const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< Point2f > getValueOr(
    vector< Point2f > const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< vector< float > > getValueOr(
    vector< vector< float > > const & alt
) const

Gets the value present on a CValue object, in case of failure return another object.

Parameters:

  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function checkValueHasChanged

template <typename T >
bool checkValueHasChanged(
    std::string const & key,
    T const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    bool const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    string const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    int const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    float const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    cvec const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function checkValueHasChanged

bool checkValueHasChanged(
    std::string const & key,
    cmap const & value
) const

Check if the value on key is accessible and has changed.

Parameters:

  • key const string reference key name to read from
  • value const reference to the object with current value

Return: bool if key is accessible and has changed (value != CValue[key])

function setValue

bool setValue(
    bool x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    int x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    float x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    double x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    char * x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    char const x[]
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< std::string > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< float > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< int > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< Point2f > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::map< std::string, std::string > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::map< std::string, pCValue > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::map< std::string, pCValue > && x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::shared_ptr< std::vector< unsigned char > > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    Rect2f const & r
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    Point2f const & r
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    Color4f const & r
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    cbuffer const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< pCValue > const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    std::vector< pCValue > && x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function setValue

bool setValue(
    CValue const & x
)

Sets the value of a CValue object present on the specified key.

Parameters:

  • x string const& key name to set value
  • x reference to the destination value

Return: pCValue pointer to the output CValue object

If the parent object has type_ NONE, its type_ will be overwritten to MAP

function getValueIfSet

template <typename T >
bool getValueIfSet(
    string const & key,
    T & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    bool & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    string & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    int & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    float & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    double & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    cvec & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueIfSet

bool getValueIfSet(
    string const & key,
    cmap & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function _getValueIfSet

template <typename T >
bool _getValueIfSet(
    string const & key,
    T & dest
) const

Set the dest parameter reference to the value present on a corresponding key inside a CValue object.

Parameters:

  • key string const& key name to read from
  • dest reference to the destination object of the specified type_

Return: bool indicating if the operation was successful

The return data type_ must be specified on the method, if the CValue object is of a different type_ (with the exception of int and float, where the conversion is done automatically), the method returns false *

function getValueOr

template <typename T >
T getValueOr(
    string const & key,
    T const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

bool getValueOr(
    string const & key,
    bool const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

string getValueOr(
    string const & key,
    string const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

cbuffer getValueOr(
    string const & key,
    cbuffer const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

int getValueOr(
    string const & key,
    int const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

float getValueOr(
    string const & key,
    float const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

double getValueOr(
    string const & key,
    double const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

cvec getValueOr(
    string const & key,
    cvec const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

cmap getValueOr(
    string const & key,
    cmap const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function _getValueOr

template <typename T >
T _getValueOr(
    string const & key,
    T const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< float > getValueOr(
    string const & key,
    vector< float > const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function getValueOr

vector< Point2f > getValueOr(
    string const & key,
    vector< Point2f > const & alt
) const

Gets the value present on a corresponding key inside a CValue object, in case of failure return another object.

Parameters:

  • key string const& key name to read from
  • alt reference to alternative response of the same type_ as the desired value

Return: Object of the specified type_ or alt parameter if the CValue object is not of the same type_

The return data type_ must be specified on the method, the return value will be an object of the specified type_ or the specified alternative if the CValue object is of a different type_, with the exception of int and float, where the conversion is done automatically

function CValue

explicit CValue(
    int * x
) =delete

function CValue

explicit CValue(
    float * x
) =delete

function CValue

explicit CValue(
    double * x
) =delete

function CValue

explicit CValue(
    std::string const & x
)

function CValue

explicit CValue(
    std::string && x
)

function CValue

explicit CValue(
    std::map< std::string, pCValue > const & x
)

function CValue

explicit CValue(
    std::map< std::string, pCValue > && x
)

function CValue

explicit CValue(
    std::vector< pCValue > const & x
)

function CValue

explicit CValue(
    std::vector< pCValue > && x
)

function operator[]

pCValue operator[](
    std::string const & key
)

String subscript operator, only to be used in CValue's of map type_ to return a CValue on the specified key.

function operator[]

pCValue operator[](
    std::vector< std::string > const & keys
)

Gets CValue object present on the specified key.

Parameters:

  • keys key names to read from

Return: pCValue pointer to the output CValue object

If the parent object is not a map or the key is not present, a pointer to an empty object is returned

function operator[]

pCValue operator[](
    size_t x
)

Integer subscript operator, only to be used in CValue's of vector type_.

function operator=

void operator=(
    std::string const & x
)

function operator=

void operator=(
    std::vector< std::string > const & x
)

function operator=

void operator=(
    std::map< std::string, std::string > const & x
)

function operator<<

std::ostream & operator<<(
    std::ostream & out
) const

function pushBack

bool pushBack(
    pCValue const & val
)

Adds aCValue object to the current vector.

Parameters:

  • val pCValue pointer to the CValue object to be added

Return: bool indicating success

Parent object must have type_ VECTOR or it will return false

function pushBackCircular

bool pushBackCircular(
    pCValue const & val,
    size_t maxBufferSize
)

Adds a CValue object to the current circular vector buffer. A maximum number of items for the buffer is supplied, if that value is reached, the oldest item is removed.

Parameters:

  • val pCValue pointer to the CValue object to be added
  • maxBufferSize Max size for vector

Return: bool indicating success

Parent object must have type_ VECTOR or it will return false

function removeAt

bool removeAt(
    size_t index
)

Removes an element from a CValue vector object at the specified index.

Parameters:

  • index integer with the index of the element to be removed

Return: bool indicating success

function at

pCValue at(
    size_t index
)

Get an element from a CValue vector object at the specified index.

Parameters:

  • index integer with the index of the element to be removed

Return: pCValue object at index

function clear

void clear()

Clear a CValue object, keep its type_.

function addValue

expected< void > addValue(
    double val
)

function subValue

expected< void > subValue(
    double val
)

function addValue

expected< void > addValue(
    std::string const & key,
    double val
)

function subValue

expected< void > subValue(
    std::string const & key,
    double val
)

function getValue

template <typename T >
expected< T > getValue() const

function getValueRef

template <typename T >
T const & getValueRef() const

function _getValue

template <typename T >
expected< T > _getValue(
    std::string const & key
) const

function getValue

template <typename T >
expected< T > getValue(
    std::string const & key
) const

function getValueOr

template <typename T >
T getValueOr(
    std::string const & key,
    T const & alt
) const

function getValueIfSet

template <typename T >
bool getValueIfSet(
    std::string const & key,
    T & dest
) const

function setValue

bool setValue(
    std::string const & key,
    bool x
)

function setValue

bool setValue(
    std::string const & key,
    int x
)

function setValue

bool setValue(
    std::string const & key,
    float x
)

function setValue

bool setValue(
    std::string const & key,
    double x
)

function setValue

bool setValue(
    std::string const & key,
    std::string const & x
)

function setValue

bool setValue(
    std::string const & key,
    char *const & x
)

function setValue

bool setValue(
    std::string const & key,
    Rect2f const & x
)

function setValue

bool setValue(
    std::string const & key,
    cbuffer const & x
)

function setValue

bool setValue(
    std::string const & key,
    std::vector< float > const & x
)

function setValue

bool setValue(
    std::string const & key,
    CValue const & x
)

function setValue

bool setValue(
    std::string const & key,
    cvec const & x
)

function setValue

bool setValue(
    std::string const & key,
    cmap const & x
)

function setValue

bool setValue(
    std::string const & x
)

function setValue

bool setValue(
    std::string && x
)

function setValue

inline bool setValue(
    CValue * 
)

function setValue

inline bool setValue(
    CValue const * 
)

function setValue

inline bool setValue(
    std::string const & ,
    CValue * 
)

function setValue

inline bool setValue(
    std::string const & ,
    CValue const * 
)

function unsetValue

void unsetValue(
    std::string const & key
)

Remove a key from a map type_ CValue object.

Parameters:

  • key string const& name of key to remove

function getKeyNames

std::vector< std::string > getKeyNames() const

Get a list with all the key names on a map.

Return: vector List with all the key names on a map

function removeEmptyEntries

int removeEmptyEntries()

Remove all empty entries from a map.

Return: int Number of entries removed

function removeRunTimeVars

void removeRunTimeVars()

Filter a map and remove all entries with runtime property enabled *.

function getChild

pCValue getChild(
    std::string const & x
) const

function getChild

pCValue getChild(
    std::vector< std::string > const & x
) const

Gets CValue object present on the specified key path.

Parameters:

  • x vector const& key names to read from

Return: pCValue pointer to the output CValue object

If the parent object is not a map or the key is not present, a null pointer is returned

function getChildOrCreate

pCValue getChildOrCreate(
    std::string const & x
)

Gets CValue object present on the specified key, if the key does not exist, create a new one.

Parameters:

  • x string const& key name to read from

Return: pCValue pointer to the output CValue object

If the parent object is not a map or the key is not present, an empty object is created at the specified key

function getKeys

std::vector< std::string > getKeys()

function getChildIfSet

expected< pCValue > getChildIfSet(
    std::string const & x
) const

function findChild

expected< pCValue > findChild(
    std::string const & path
) const

function findChild

expected< pCValue > findChild(
    std::vector< std::string > const & path
) const

function deleteChild

expected< void > deleteChild(
    std::string const & path
)

function getChild

pCValue getChild(
    size_t x
) const

Gets CValue object present on the specified vector index.

Parameters:

  • x int representing the vector index

Return: pCValue pointer to the output CValue object

If the parent object is not a vector, a pointer to an empty object is returned

function hasChild

bool hasChild(
    std::string const & key
) const

function hasChild

bool hasChild(
    std::vector< std::string > const & keys
)

function begin

cmap::iterator begin()

Get a map iterator to the begin of a map type_ CValue object.

function end

cmap::iterator end()

Get a map iterator to the end of a map type_ CValue object.

function size

size_t size() const

Set the CValueType of a CValue object.

CValueType:

  • NONE = -1,
  • NUMBER = 0,
  • BOOL = 1,
  • STRING = 2,
  • VECTOR = 3,
  • MAP = 4,
  • BUFFER = 5,
  • MEM = 6 Get the CValue size corresponding to its type_

function isEmpty

bool isEmpty() const

Get id CValue is an Empty object.

function str

std::string str(
    int numberPrecision =4
) const

Get a CValue as string.

Parameters:

  • numberPrecision For any floating point number, specifies the number of decimal digits to use in the representation

Return: std::string containing the string representation of the object

Converts any CValue object to a string representation.

function getType

CValueType const & getType() const

Get the CValueType of a CValue object.

Return: CValueType enum with the type_ of the CValue object

CValueType:

  • NONE = -1
  • INT = 0
  • FLOAT = 1
  • BOOL = 2
  • STRING = 3
  • VECTOR = 4
  • MAP = 5
  • VEC4F = 6

function enableTracking

void enableTracking(
    bool recursive =false
)

function disableTracking

void disableTracking(
    bool recursive =false
)

function isTrackingEnabled

bool isTrackingEnabled() const

function getTracker

CValueTracker * getTracker() const

function dumpHolders

void dumpHolders() const

function CValue

CValue(
    CValue && src
)

function operator=

CValue & operator=(
    CValue const & val
)

function getValue

expected< int > getValue() const

function getValue

expected< bool > getValue() const

function getValue

expected< float > getValue() const

function getValue

expected< double > getValue() const

function getValue

expected< string > getValue() const

function getValue

expected< cvec > getValue() const

function getValue

expected< cmap > getValue() const

function getValue

expected< cbuffer > getValue() const

function getValue

expected< cmem > getValue() const

function getValueRef

template <typename T >
T const & getValueRef() const

function getValueRef

bool const & getValueRef() const

function getValueRef

double const & getValueRef() const

function getValueRef

string const & getValueRef() const

function getValueRef

cvec const & getValueRef() const

function getValueRef

cmap const & getValueRef() const

function getValueRef

cbuffer const & getValueRef() const

function getValueRef

cmem const & getValueRef() const

function _getValue

template <typename T >
expected< T > _getValue(
    string const & key
) const

function getValue

template <typename T >
expected< T > getValue(
    string const & key
) const

function getValue

expected< int > getValue(
    string const & key
) const

function getValue

expected< float > getValue(
    string const & key
) const

function getValue

expected< double > getValue(
    string const & key
) const

function getValue

expected< bool > getValue(
    string const & key
) const

function getValue

expected< string > getValue(
    string const & key
) const

function getValue

expected< Rect2f > getValue(
    string const & key
) const

function getValue

expected< cvec > getValue(
    string const & key
) const

function getValue

expected< cmap > getValue(
    string const & key
) const

function getValue

expected< cbuffer > getValue(
    string const & key
) const

function _setKeyValue

template <typename T >
bool _setKeyValue(
    string const & key,
    T const & x
)

function _setVecValue

template <typename T >
bool _setVecValue(
    vector< T > const & x
)

function findChildOrCreate

static pCValue findChildOrCreate(
    pCValue root,
    std::string const & path
)

function diff

static pCValue diff(
    pCValue const & first,
    pCValue const & second,
    bool symmetricDiff
)

function merge

static pCValue merge(
    pCValue const & first,
    pCValue const & second
)

function override

static pCValue override(
    pCValue const & first,
    pCValue const & second
)

function getTypeCount

static int64_t getTypeCount(
    CValueType t
)

function getTotalAlive

static int64_t getTotalAlive()

function publishStats

static void publishStats()

Public Attributes Documentation

variable runtimeVar_

bool runtimeVar_ = false;

variable bVal

bool bVal;

variable dVal

double dVal;

variable sVal

std::string sVal;

variable vVal

std::vector< pCValue > vVal;

variable mVal

std::map< std::string, pCValue > mVal;

variable bufferVal

cbuffer bufferVal;

variable memVal

std::shared_ptr< std::vector< unsigned char > > memVal;

Friends

friend TrackedCValuePtr

friend class TrackedCValuePtr(
    TrackedCValuePtr 
);