|
CeresEngine 0.2.0
A game development framework
|
An implementation of MetaProperty that uses a getter and setter method pairs to access the property.
More...
#include <CeresEngine/Reflection/Class.define.hpp>
Public Member Functions | |
| MetaAccessorProperty (Class &owner, const StringView name, GetterType getter, SetterType setter) noexcept | |
| Creates a new property by using accessors. | |
| bool | isStatic () const noexcept override |
| bool | isReadOnly () const noexcept override |
| TypeID | getGetterReturnTypeID () const noexcept override |
| TypeID | getSetterParameterTypeID () const noexcept override |
| Box | get (const Box &target) const override |
| void | set (const Box &target, const Box &value) const override |
| void | set (const Box &target, Box &&value) const override |
Public Member Functions inherited from CeresEngine::ClassProperty | |
| ClassProperty (Class &owner, StringView name) | |
| ~ClassProperty () noexcept override | |
| MetaCategory | getCategory () const final |
| Gets the category of the item. | |
| TypeID | getTypeID () const noexcept |
| Type | getType () const |
| Type | getGetterReturnType () const |
| 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. | |
| Type | getSetterParameterType () 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, 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 |
Private Types | |
| using | GetterTraits = function_traits< GetterType > |
| A type trait for the getter function or method. | |
| using | SetterTraits = function_traits< SetterType > |
| A type trait for the setter function or method. | |
| using | T = typename GetterTraits::result_type |
| The type returned by the getter function. | |
| using | SetterArgument = typename SetterTraits::template arg< 0 > |
| The type taken by the setter function. | |
Private Attributes | |
| const GetterType | mGetter |
| The getter function. | |
| const SetterType | mSetter |
| The setter function. | |
Static Private Attributes | |
| static constexpr auto | valid |
Additional Inherited Members | |
Public Attributes inherited from CeresEngine::ClassProperty | |
| StringView | name |
| ReflectionAttributeContainer | attributes |
Static Public Attributes inherited from CeresEngine::ClassProperty | |
| static constexpr MetaCategory | kCategory = MetaCategory::Property |
| Gets the category of the item. | |
An implementation of MetaProperty that uses a getter and setter method pairs to access the property.
| GetterType | The type of the property getter. |
| SetterType | The type of the property setter. |
|
private |
A type trait for the getter function or method.
|
private |
The type taken by the setter function.
|
private |
A type trait for the setter function or method.
|
private |
The type returned by the getter function.
|
inlineexplicitnoexcept |
Creates a new property by using accessors.
| owner | The class that owns the property. |
| name | The name of the property. |
| getter | The getter to be called to get the property value. |
| setter | The setter to be called to set the property value. |
|
inlineoverridevirtual |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtualnoexcept |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtualnoexcept |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtualnoexcept |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtualnoexcept |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtual |
Implements CeresEngine::ClassProperty.
|
inlineoverridevirtual |
Implements CeresEngine::ClassProperty.
|
private |
The getter function.
|
private |
The setter function.
|
staticconstexprprivate |