#include <PropertyCollection.hpp>
◆ PropertyCollection() [1/2]
tson::PropertyCollection::PropertyCollection |
( |
| ) |
|
|
inlinedefault |
◆ PropertyCollection() [2/2]
tson::PropertyCollection::PropertyCollection |
( |
std::string |
id | ) |
|
|
inlineexplicit |
◆ add() [1/3]
◆ add() [2/3]
◆ add() [3/3]
◆ get()
Gets vector of pointers to all the existing properties
- Returns
◆ getId()
const std::string & tson::PropertyCollection::getId |
( |
| ) |
const |
|
inline |
◆ getProperties()
std::map< std::string, tson::Property > & tson::PropertyCollection::getProperties |
( |
| ) |
|
|
inline |
◆ getProperty()
tson::Property * tson::PropertyCollection::getProperty |
( |
const std::string & |
name | ) |
|
|
inline |
◆ getSize()
size_t tson::PropertyCollection::getSize |
( |
| ) |
const |
|
inline |
◆ getValue()
template<typename T >
T tson::PropertyCollection::getValue |
( |
const std::string & |
name | ) |
|
|
inline |
◆ hasProperty()
bool tson::PropertyCollection::hasProperty |
( |
const std::string & |
name | ) |
|
|
inline |
◆ remove()
void tson::PropertyCollection::remove |
( |
const std::string & |
name | ) |
|
|
inline |
◆ setId()
void tson::PropertyCollection::setId |
( |
const std::string & |
id | ) |
|
|
inline |
◆ 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
-
◆ m_id
std::string tson::PropertyCollection::m_id |
|
protected |
◆ m_properties
std::map<std::string, tson::Property> tson::PropertyCollection::m_properties |
|
protected |
The documentation for this class was generated from the following file: