Libprimis
Imprimis' 3D destroyable world engine
|
Meta information about a property. More...
#include <prop.h>
Public Member Functions | |
PropertyType | get_type () const |
Gets the type of the property definition. | |
PropertyValue | get_min () const |
Gets the minimum value of the property definition. | |
PropertyValue | get_def () const |
Gets the default value of the property definition. | |
PropertyValue | get_max () const |
Gets the maximum value of the property definition. | |
std::string | get_name () const |
Gets the name of the property definition. | |
void | changed (std::any argument) const |
template<class T > | |
PropertyMeta (std::string _name, PropertyType _type, T _min, T _def, T _max, OnChangeCallback _on_change=nullptr) | |
template<class T > | |
PropertyMeta (std::string _name, PropertyType _type, T _def, OnChangeCallback _on_change=nullptr) | |
PropertyMeta (const PropertyMeta &)=delete | |
Meta information about a property.
This class stores definition information for a property:
All properties should be statically bound to their PropertyMeta counterparts.
PropertyValue prop::PropertyMeta::get_def | ( | ) | const |
Gets the default value of the property definition.
PropertyValue prop::PropertyMeta::get_max | ( | ) | const |
Gets the maximum value of the property definition.
PropertyValue prop::PropertyMeta::get_min | ( | ) | const |
Gets the minimum value of the property definition.
std::string prop::PropertyMeta::get_name | ( | ) | const |
Gets the name of the property definition.
PropertyType prop::PropertyMeta::get_type | ( | ) | const |
Gets the type of the property definition.