|
| | DataItem () |
| | Create an invalid DataItem.
|
| |
| | DataItem (const DataItem &other) |
| | Copy constructor.
|
| |
| | DataItem (const std::string &name) |
| | Initialize a DataItem, it requires the name of the DataItem to match the metadata.
|
| |
| bool | isValid () const |
| | return true if the data item contains a valid type&value
|
| |
| const std::string & | name () const |
| | return name of dataitem
|
| |
|
Type | type () const |
| |
|
DataItem & | operator= (const DataItem &other)=default |
| |
| template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, DataItem> && !std::is_same_v<std::decay_t<T>, nlohmann::json> >> |
| DataItem & | operator= (T &&value) |
| | for usage like DataItem x = 5
|
| |
| template<typename T> |
| | operator T& () |
| | for usage like double val = DataItem
|
| |
| template<typename T> |
| | operator const T & () const |
| | for usage like double val = DataItem
|
| |
| template<typename T> |
| T & | as () |
| | for usage like double DataItem.as<std::vector<int64_t>>().push_back( ... )
|
| |
| template<typename T> |
| const T & | as () const |
| | for usage like double DataItem.as<std::vector<int64_t>>().push_back( ... )
|
| |
| template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, DataItem> && !std::is_same_v<std::decay_t<T>, nlohmann::json> >> |
| bool | operator== (const T &value) const |
| | for usage like if ( DataItem == 5 )
|
| |
| template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, DataItem> && !std::is_same_v<std::decay_t<T>, nlohmann::json> >> |
| bool | operator!= (const T &value) const |
| | for usage like if ( DataItem != 5 )
|
| |
|
bool | operator!= (const DataItem &other) const |
| |
|
bool | operator== (const DataItem &other) const |
| |
| template<typename T> |
| T * | accessPtr () |
| | get a pointer to the data
|
| |
|
DataItem & | operator+= (const DataItem &other) |
| |
|
template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, DataItem> && !std::is_same_v<std::decay_t<T>, nlohmann::json> >> |
| DataItem & | operator+= (const T &value) |
| |
| DataItem & | operator= (const nlohmann::json &JSON) |
| | set data item value from JSON
|
| |
| DataItemVariant & | raw () |
| | get the raw std::variant inside
|
| |