|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Metadata interface for a reflected field. More...
#include <IReflectedField.hpp>

Public Member Functions | |
| 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. | |
| virtual const void * | Get (void *objPtr) const =0 |
| Gets the value of the field from the given object pointer. | |
| virtual void | Set (void *objPtr, const void *value) const =0 |
| Sets the value of the field in the given object pointer. | |
| 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 const void * | DefaultValue () const =0 |
| Returns a pointer to the default value of the field's type. | |
| virtual FieldRepresentation | Representation () const =0 |
| Returns the field representation type. | |
| virtual std::unique_ptr< IReflectedField > | Clone () const =0 |
| Performs a deep copy of this instance. | |
| virtual | ~IReflectedField ()=default |
Protected Member Functions | |
| 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 | |
| size_t | _typeHash = 0 |
| std::type_index | _typeIndex |
| size_t | _size = 0 |
| size_t | _offset = 0 |
| std::string | _name |
| std::string | _desc |
Properties | |
| ulong | TypeHash [get] |
| string | FieldName [get] |
| string | FieldDesc [get] |
| ulong | TypeSize [get] |
| ulong | FieldOffset [get] |
| IntPtr | DefaultValue [get] |
Metadata interface for a reflected field.
|
protecteddefault |
|
protected |
|
protecteddefault |
|
protecteddefault |
|
virtualdefault |
|
pure virtual |
Performs a deep copy of this instance.
Implemented in Engine3DRadSpace.Graphics::ShaderVariable, Engine3DRadSpace.Reflection::Attribute, Engine3DRadSpace.Reflection::ReflectedEnumField< E >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< void >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, Engine3DRadSpace.Reflection::ReflectedFunction< R, Args >, Engine3DRadSpace.Reflection::ReflectedMemberFunction< R, O, Args >, and Engine3DRadSpace.Reflection::UnknownVariable.
|
pure virtual |
Returns a pointer to the default value of the field's type.
Implemented in Engine3DRadSpace.Graphics::ShaderVariable, Engine3DRadSpace.Reflection::Attribute, Engine3DRadSpace.Reflection::IReflectedFunction, Engine3DRadSpace.Reflection::ReflectedEnumField< E >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< void >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, and Engine3DRadSpace.Reflection::UnknownVariable.
|
noexcept |
Description of the field.
|
noexcept |
Name of the field.
|
noexcept |
Offset of the field within the object, in bytes.
| IntPtr Engine3DRadSpace.Reflection.IReflectedField.Get | ( | IntPtr | objPtr | ) |
|
pure virtual |
Gets the value of the field from the given object pointer.
| objPtr | Pointer to the object containing the field. |
Implemented in Engine3DRadSpace.Graphics::ShaderVariable, Engine3DRadSpace.Reflection::Attribute, Engine3DRadSpace.Reflection::IReflectedFunction, Engine3DRadSpace.Reflection::ReflectedEnumField< E >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< void >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, Engine3DRadSpace.Reflection::ReflectedFunction< R, Args >, Engine3DRadSpace.Reflection::ReflectedMemberFunction< R, O, Args >, and Engine3DRadSpace.Reflection::UnknownVariable.
|
inline |
Gets the type T with an additional offset from the field's offset within the object.
| T | Type |
| objPtr | Object containing this field |
| offset | additional offset in bytes |
|
protecteddefault |
|
protecteddefault |
|
pure virtual |
Returns the field representation type.
Implemented in Engine3DRadSpace.Graphics::ShaderVariable, Engine3DRadSpace.Reflection::Attribute, Engine3DRadSpace.Reflection::IReflectedFunction, Engine3DRadSpace.Reflection::ReflectedEnumField< E >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< void >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, and Engine3DRadSpace.Reflection::UnknownVariable.
| void Engine3DRadSpace.Reflection.IReflectedField.Set | ( | IntPtr | objPtr, |
| IntPtr | value ) |
|
pure virtual |
Sets the value of the field in the given object pointer.
| objPtr | Pointer to the object containing the field |
| value | value to be set |
Implemented in Engine3DRadSpace.Graphics::ShaderVariable, Engine3DRadSpace.Reflection::Attribute, Engine3DRadSpace.Reflection::IReflectedFunction, Engine3DRadSpace.Reflection::ReflectedEnumField< E >, Engine3DRadSpace.Reflection::ReflectedField< std::optional< T > >, Engine3DRadSpace.Reflection::ReflectedField< T >, Engine3DRadSpace.Reflection::ReflectedField< void >, Engine3DRadSpace.Reflection::ReflectedFieldGS< T, C >, and Engine3DRadSpace.Reflection::UnknownVariable.
|
noexcept |
Type hash of the field's type, usually typeid(T).hash_code() for the field's type T.
|
noexcept |
Size of the field's type in bytes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |