3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Reflection::UnknownVariable Class Referencefinal

Represents a variable of unknown type. More...

#include <UnknownVariable.hpp>

Inheritance diagram for Engine3DRadSpace.Reflection::UnknownVariable:
Collaboration diagram for Engine3DRadSpace.Reflection::UnknownVariable:

Public Member Functions

 UnknownVariable (size_t offset, size_t size, const std::string &name, const std::string &desc)
 Constructs an instance of a UnknownVariable with the given parameters.
const void * Get (void *objPtr) const override
 Does nothing.
void Set (void *objPtr, const void *value) const override
 Does nothing.
const void * DefaultValue () const override
 Returns nullptr.
FieldRepresentation Representation () const override
 Returns an empty FieldRepresentation.
std::unique_ptr< IReflectedField > Clone () const override
 Performs a deep clone of this UnknownVariable instance.
 ~UnknownVariable () 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]

Detailed Description

Represents a variable of unknown type.

Constructor & Destructor Documentation

◆ UnknownVariable()

UnknownVariable::UnknownVariable ( size_t offset,
size_t size,
const std::string & name,
const std::string & desc )

Constructs an instance of a UnknownVariable with the given parameters.

Parameters
offsetMemory offset
sizeSize in bytes
nameField name
descField description

◆ ~UnknownVariable()

Engine3DRadSpace.Reflection::UnknownVariable::~UnknownVariable ( )
overridedefault

Member Function Documentation

◆ Clone()

std::unique_ptr< IReflectedField > UnknownVariable::Clone ( ) const
overridevirtual

Performs a deep clone of this UnknownVariable instance.

Returns

Implements Engine3DRadSpace.Reflection.IReflectedField.

◆ DefaultValue()

const void * UnknownVariable::DefaultValue ( ) const
overridevirtual

Returns nullptr.

Returns
nullptr

Implements Engine3DRadSpace.Reflection.IReflectedField.

◆ Get()

const void * UnknownVariable::Get ( void * objPtr) const
overridevirtual

Does nothing.

Parameters
objPtrunused
Returns
nullptr

Implements Engine3DRadSpace.Reflection.IReflectedField.

◆ Representation()

FieldRepresentation UnknownVariable::Representation ( ) const
overridevirtual

Returns an empty FieldRepresentation.

Returns
Empty representation

Implements Engine3DRadSpace.Reflection.IReflectedField.

◆ Set()

void UnknownVariable::Set ( void * objPtr,
const void * value ) const
overridevirtual

Does nothing.

Parameters
objPtrunused
valueunused

Implements Engine3DRadSpace.Reflection.IReflectedField.


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