|
| Property (IJson &json, tson::Project *project=nullptr) |
|
| Property (std::string name, std::any value, Type type) |
|
const std::string & | getName () const |
|
const std::string & | getPropertyType () const |
|
Type | getType () const |
|
const std::any & | getValue () const |
|
template<typename T > |
T | getValue () const |
|
const std::type_info & | getValueType () const |
|
std::string | getValueTypeInfo () |
|
void | setName (const std::string &name) |
|
void | setStrValue (const std::string &value) |
|
void | setValue (const std::any &value) |
|
void | setValueByType (IJson &json) |
|
|
void | setTypeByString (const std::string &str) |
|
|
std::string | m_name {} |
|
tson::Project * | m_project = nullptr |
|
std::string | m_propertyType {} |
|
Type | m_type = Type::Undefined |
|
std::any | m_value |
|
◆ 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
◆ 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
-
The documentation for this class was generated from the following file: