#include <Property.hpp>
◆ Property() [1/3]
tson::Property::Property |
( |
| ) |
|
|
inline |
◆ Property() [2/3]
◆ Property() [3/3]
tson::Property::Property |
( |
std::string |
name, |
|
|
std::any |
value, |
|
|
Type |
type |
|
) |
| |
|
inline |
◆ getName()
const std::string & tson::Property::getName |
( |
| ) |
const |
|
inline |
◆ getPropertyType()
const std::string & tson::Property::getPropertyType |
( |
| ) |
const |
|
inline |
◆ getType()
◆ getValue() [1/2]
const std::any & tson::Property::getValue |
( |
| ) |
const |
|
inline |
◆ getValue() [2/2]
template<typename T >
T tson::Property::getValue |
( |
| ) |
const |
|
inline |
◆ getValueType()
const std::type_info & tson::Property::getValueType |
( |
| ) |
const |
|
inline |
Gets the value type as std::value_info. This can easily be compared to types like this: Check if int: getValueType() == typeid(int)
- Returns
◆ getValueTypeInfo()
std::string tson::Property::getValueTypeInfo |
( |
| ) |
|
|
inline |
Gets the value type as std::string Examples of known types: "i" = int "f" = float "b" = bool
- Returns
◆ setName()
void tson::Property::setName |
( |
const std::string & |
name | ) |
|
|
inline |
◆ setStrValue()
void tson::Property::setStrValue |
( |
const std::string & |
value | ) |
|
|
inline |
Sets the value specifically as string. When not specified as std::string, the default is that the value will be set as char * when adding a value like "test" This function is to make sure the value is added as string.
- Parameters
-
◆ setTypeByString()
void tson::Property::setTypeByString |
( |
const std::string & |
str | ) |
|
|
inlineprotected |
◆ setValue()
void tson::Property::setValue |
( |
const std::any & |
value | ) |
|
|
inline |
◆ setValueByType()
void tson::Property::setValueByType |
( |
IJson & |
json | ) |
|
|
inline |
◆ m_name
std::string tson::Property::m_name {} |
|
protected |
◆ m_project
◆ m_propertyType
std::string tson::Property::m_propertyType {} |
|
protected |
◆ m_type
◆ m_value
std::any tson::Property::m_value |
|
protected |
The documentation for this class was generated from the following files: