|
CeresEngine 0.2.0
A game development framework
|
Represents a reflected property from metadata defined by the class. More...
#include <CeresEngine/Reflection/Class.hpp>
Public Member Functions | |
| ClassProperty (Class &owner, StringView name) | |
| ~ClassProperty () noexcept override | |
| MetaCategory | getCategory () const final |
| Gets the category of the item. | |
| virtual bool | isStatic () const noexcept=0 |
| Determines if the property is static or not. | |
| virtual bool | isReadOnly () const noexcept=0 |
| Determines if the property is read-only and cannot be set. | |
| TypeID | getTypeID () const noexcept |
| Type | getType () const |
| virtual TypeID | getGetterReturnTypeID () const noexcept=0 |
| Type | getGetterReturnType () const |
| virtual Box | get (const Box &target) const =0 |
| Gets the property value. | |
| template<typename T > requires (!std::is_same_v<std::decay_t<T>, Box> && !std::is_same_v<std::decay_t<T>, Box>) | |
| auto | get (T &target) const |
| Box | get () const |
| Gets the value of a static property. | |
| virtual TypeID | getSetterParameterTypeID () const noexcept=0 |
| Type | getSetterParameterType () const |
| virtual void | set (const Box &target, const Box &value) const =0 |
| Sets the property value. | |
| virtual void | set (const Box &target, Box &&value) const =0 |
| template<typename T , typename V > requires (!std::is_same_v<std::decay_t<T>, Box> && !std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (T &target, const V &value) const |
| template<typename T , typename V > requires (!std::is_same_v<std::decay_t<T>, Box> && !std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (T &target, V &value) const |
| template<typename T , typename V > requires (!std::is_same_v<std::decay_t<T>, Box> && !std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (T &target, V &&value) const |
| void | set (const Box &value) const |
| Sets the property value. | |
| void | set (Box &&value) const |
| template<typename V > requires (!std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (const V &value) const |
| template<typename V > requires (!std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (V &value) const |
| template<typename V > requires (!std::is_same_v<std::decay_t<V>, Box>) | |
| void | set (V &&value) const |
Public Member Functions inherited from CeresEngine::MetaItem | |
| virtual | ~MetaItem () noexcept=default |
Public Attributes | |
| StringView | name |
| ReflectionAttributeContainer | attributes |
Static Public Attributes | |
| static constexpr MetaCategory | kCategory = MetaCategory::Property |
| Gets the category of the item. | |
Represents a reflected property from metadata defined by the class.
|
explicit |
|
overridenoexcept |
| Box CeresEngine::ClassProperty::get | ( | ) | const |
Gets the value of a static property.
Gets the property value.
| target |
Implemented in CeresEngine::MetaPointerProperty< PointerType >, and CeresEngine::MetaAccessorProperty< GetterType, SetterType >.
|
inline |
|
inlinefinalvirtual |
Gets the category of the item.
Implements CeresEngine::MetaItem.
| Type CeresEngine::ClassProperty::getGetterReturnType | ( | ) | const |
| Type CeresEngine::ClassProperty::getSetterParameterType | ( | ) | const |
| Type CeresEngine::ClassProperty::getType | ( | ) | const |
|
noexcept |
Determines if the property is read-only and cannot be set.
Implemented in CeresEngine::MetaPointerProperty< PointerType >, and CeresEngine::MetaAccessorProperty< GetterType, SetterType >.
Determines if the property is static or not.
Implemented in CeresEngine::MetaPointerProperty< PointerType >, and CeresEngine::MetaAccessorProperty< GetterType, SetterType >.
|
pure virtual |
Sets the property value.
| target | The target instance to set the property on. |
| value | The value to the set the property to. |
Implemented in CeresEngine::MetaPointerProperty< PointerType >, and CeresEngine::MetaAccessorProperty< GetterType, SetterType >.
Sets the property value.
This overload is only used for static properties.
| value | The value to the set the property to. |
|
inline |
|
inline |
|
inline |
| ReflectionAttributeContainer CeresEngine::ClassProperty::attributes |
|
staticconstexpr |
Gets the category of the item.
| StringView CeresEngine::ClassProperty::name |