|
| PropertyCollection (std::string id) |
|
tson::Property * | add (const std::string &name, const std::any &value, tson::Type type) |
|
tson::Property * | add (const tson::Property &property) |
|
tson::Property * | add (IJson &json, tson::Project *project=nullptr) |
|
std::vector< Property * > | get () |
|
const std::string & | getId () const |
|
std::map< std::string, Property > & | getProperties () |
|
tson::Property * | getProperty (const std::string &name) |
|
size_t | getSize () const |
|
template<typename T > |
T | getValue (const std::string &name) |
|
bool | hasProperty (const std::string &name) |
|
void | remove (const std::string &name) |
|
void | setId (const std::string &id) |
|
void | setProperty (const std::string &name, const tson::Property &value) |
|
void | setValue (const std::string &name, const std::any &value) |
|
◆ get()
Gets vector of pointers to all the existing properties
- Returns
◆ setProperty()
void tson::PropertyCollection::setProperty |
( |
const std::string & |
name, |
|
|
const tson::Property & |
value |
|
) |
| |
|
inline |
Overwrites the current property if it exists, or adds it if it doesn't.
- Parameters
-
◆ setValue()
void tson::PropertyCollection::setValue |
( |
const std::string & |
name, |
|
|
const std::any & |
value |
|
) |
| |
|
inline |
Sets a value IF the property already exists. Does nothing otherwise. See add() for adding new properties
- Parameters
-
The documentation for this class was generated from the following file: