CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::CopyableTypeTrait Class Referenceabstract

#include <CeresEngine/Reflection/TypeInfo.hpp>

Inheritance diagram for CeresEngine::CopyableTypeTrait:
CeresEngine::ArrayTypeInfo CeresEngine::ByteTypeInfo CeresEngine::ConstTypeInfo CeresEngine::MemberPointerTypeInfo CeresEngine::NullTypeInfo CeresEngine::PointerTypeInfo CeresEngine::PrimitiveTypeInfo CeresEngine::ReferenceTypeInfo

Public Member Functions

virtual void copy (void *target, const void *source) const =0
 Copies the object from source to target.
 

Protected Member Functions

 ~CopyableTypeTrait ()=default
 

Constructor & Destructor Documentation

◆ ~CopyableTypeTrait()

CeresEngine::CopyableTypeTrait::~CopyableTypeTrait ( )
protecteddefault

Member Function Documentation

◆ copy()

virtual void CeresEngine::CopyableTypeTrait::copy ( void target,
const void source 
) const
pure virtual

Copies the object from source to target.

Parameters
targetThe memory address to initialize a copy of the object. This must point to a memory address with at least size bytes and uninitialized.
sourceThe memory address to copy from. Must point to an initialized object of the same type.
Note
This can be nullptr if the type is not copy constructible.

Implemented in CeresEngine::ReferenceTypeInfo, CeresEngine::PointerTypeInfo, CeresEngine::ConstTypeInfo, CeresEngine::ArrayTypeInfo, CeresEngine::MemberPointerTypeInfo, CeresEngine::PrimitiveTypeInfo, CeresEngine::NullTypeInfo, and CeresEngine::ByteTypeInfo.


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