class
#include <esp/assets/Attributes.h>
Attributes Arbitrary map type container for storing and managing various types of attribute data.
Contents
Derived classes
- class PhysicsManagerAttributes
- attributes for a single physics manager
- class PhysicsObjectAttributes
- Specific Attributes instance which is constructed with a base set of physics object required attributes.
- class PhysicsSceneAttributes
- attributes for a single physical scene
Constructors, destructors, conversion operators
- Attributes()
- constructor initializes the maps
Public functions
-
auto exists(const std::
string& key) const -> bool - return true if any container has the key
-
auto existsAs(const DataType t,
const std::
string& key) const -> bool - check if an attribute of a specific type exists
-
auto count(const std::
string& key) const -> int - count the number of containers with the key
-
void eraseAll(const std::
string& key) - erase the key from all maps
-
void eraseAs(const DataType t,
const std::
string& key) - erase the key from a particular map
- void clear()
- clear all maps
- void clearAs(const DataType t)
- clear only a particular map
-
auto getDouble(const std::
string& key) const -> double - return the queried entry in the double map will throw an exception if the key does not exist in the double map
-
void setDouble(const std::
string& key, const double val) - set a double attribute key->val
-
auto getInt(const std::
string& key) const -> int -
void setInt(const std::
string& key, const int val) -
auto getBool(const std::
string& key) const -> bool -
void setBool(const std::
string& key, const bool val) -
auto getString(const std::
string& key) const -> const std:: string& -
void setString(const std::
string& key, const std:: string& val) -
auto getMagnumVec3(const std::
string& key) const -> const Magnum:: Vector3& -
void setMagnumVec3(const std::
string& key, const Magnum:: Vector3& val) -
auto getVecStrings(const std::
string& key) const -> const std:: vector<std:: string>& -
void setVecStrings(const std::
string& key, const std:: vector<std:: string>& val) -
void appendVecStrings(const std::
string& key, const std:: string& val) - add a string to a string vector (to avoid get/set copying)
-
void removeFromVecString(const std::
string& key, const std:: string& val) - remove a string from a string vector (to avoid get/set copying)
-
auto listAttributes() -> std::
string - return a formated string exposing the current contents of the attributes maps