|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents an attribute of a reflected object. More...
#include <Attribute.hpp>


Public Member Functions | |
| Attribute (const std::string &name, const std::string &value) | |
| Constructs a attribute with the given name and value. | |
| const void * | Get (void *objPtr) const override |
| Gets the value of the field from the given object pointer. | |
| void | Set (void *objPtr, const void *value) const override |
| Sets the value of the field in the given object pointer. | |
| const void * | DefaultValue () const override |
| Returns a pointer to the default value of the field's type. | |
| FieldRepresentation | Representation () const override |
| Returns the field representation type. | |
| std::unique_ptr< IReflectedField > | Clone () const override |
| Performs a deep copy of this instance. | |
| virtual | ~Attribute () override=default |
| Public Member Functions inherited from Engine3DRadSpace.Reflection.IReflectedField | |
| IntPtr | Get (IntPtr objPtr) |
| void | Set (IntPtr objPtr, IntPtr value) |
| const size_t | TypeHash () const noexcept |
| Type hash of the field's type, usually typeid(T).hash_code() for the field's type T. | |
| const std::string & | FieldName () const noexcept |
| Name of the field. | |
| const std::string & | FieldDesc () const noexcept |
| Description of the field. | |
| const size_t | TypeSize () const noexcept |
| Size of the field's type in bytes. | |
| const ptrdiff_t | FieldOffset () const noexcept |
| Offset of the field within the object, in bytes. | |
| template<typename T> | |
| const T | GetAtOffset (void *objPtr, intptr_t offset) const |
| Gets the type T with an additional offset from the field's offset within the object. | |
| virtual | ~IReflectedField ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine3DRadSpace.Reflection.IReflectedField | |
| IReflectedField ()=default | |
| IReflectedField (size_t offset, size_t size, const std::string &name, const std::string &desc, const std::type_info &info) | |
| IReflectedField (const IReflectedField &f)=default | |
| IReflectedField (IReflectedField &&)=default | |
| IReflectedField & | operator= (const IReflectedField &f)=default |
| IReflectedField & | operator= (IReflectedField &&f)=default |
| Protected Attributes inherited from Engine3DRadSpace.Reflection.IReflectedField | |
| size_t | _typeHash = 0 |
| std::type_index | _typeIndex |
| size_t | _size = 0 |
| size_t | _offset = 0 |
| std::string | _name |
| std::string | _desc |
| Properties inherited from Engine3DRadSpace.Reflection.IReflectedField | |
| ulong | TypeHash [get] |
| string | FieldName [get] |
| string | FieldDesc [get] |
| ulong | TypeSize [get] |
| ulong | FieldOffset [get] |
| IntPtr | DefaultValue [get] |
Represents an attribute of a reflected object.
Attribute is an reflected field because ReflectedObject contains a list of IReflectedField. See Reflection.hpp for supported Attribute names.
| Attribute::Attribute | ( | const std::string & | name, |
| const std::string & | value ) |
Constructs a attribute with the given name and value.
| name | The name of the attribute. |
| value | The value of the attribute. |
|
overridevirtualdefault |
|
overridevirtual |
Performs a deep copy of this instance.
Implements Engine3DRadSpace.Reflection.IReflectedField.
|
overridevirtual |
Returns a pointer to the default value of the field's type.
Implements Engine3DRadSpace.Reflection.IReflectedField.
|
overridevirtual |
Gets the value of the field from the given object pointer.
| objPtr | Pointer to the object containing the field. |
Implements Engine3DRadSpace.Reflection.IReflectedField.
|
overridevirtual |
Returns the field representation type.
Implements Engine3DRadSpace.Reflection.IReflectedField.
|
overridevirtual |
Sets the value of the field in the given object pointer.
| objPtr | Pointer to the object containing the field |
| value | value to be set |
Implements Engine3DRadSpace.Reflection.IReflectedField.