Libprimis
Imprimis' 3D destroyable world engine
Loading...
Searching...
No Matches
prop::PropertyMeta Class Reference

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
 

Detailed Description

Meta information about a property.

This class stores definition information for a property:

  • name (string)
  • type (PropertyType)
  • min, default and max values (PropertyValue)

All properties should be statically bound to their PropertyMeta counterparts.

Member Function Documentation

◆ get_def()

PropertyValue prop::PropertyMeta::get_def ( ) const

Gets the default value of the property definition.

Returns
PropertyValue

◆ get_max()

PropertyValue prop::PropertyMeta::get_max ( ) const

Gets the maximum value of the property definition.

Returns
PropertyValue

◆ get_min()

PropertyValue prop::PropertyMeta::get_min ( ) const

Gets the minimum value of the property definition.

Returns
PropertyValue

◆ get_name()

std::string prop::PropertyMeta::get_name ( ) const

Gets the name of the property definition.

Returns
std::string

◆ get_type()

PropertyType prop::PropertyMeta::get_type ( ) const

Gets the type of the property definition.

Returns
PropertyType

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