Uranus  1.0.1.0
Uranus is a GameEngine written in C++
Loading...
Searching...
No Matches
tson::PropertyCollection Class Reference
Collaboration diagram for tson::PropertyCollection:
[legend]

Public Member Functions

 PropertyCollection (std::string id)
 
tson::Propertyadd (const std::string &name, const std::any &value, tson::Type type)
 
tson::Propertyadd (const tson::Property &property)
 
tson::Propertyadd (IJson &json, tson::Project *project=nullptr)
 
std::vector< Property * > get ()
 
const std::string & getId () const
 
std::map< std::string, Property > & getProperties ()
 
tson::PropertygetProperty (const std::string &name)
 
size_t getSize () const
 
template<typename 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)
 

Protected Attributes

std::string m_id
 
std::map< std::string, tson::Propertym_properties
 

Member Function Documentation

◆ get()

std::vector< tson::Property * > tson::PropertyCollection::get ( )
inline

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
name
value

◆ 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
name
value

The documentation for this class was generated from the following file: