CSEngine
Loading...
Searching...
No Matches
CSE::ReflectionMgr::DefineWrapper Class Reference

Public Member Functions

 DefineWrapper (const DefineWrapper &other)
 

Static Public Member Functions

static unsigned char * SetDefine (std::string &&type, std::function< ReflectionObject *()> &&func)
 
static void ReleaseDefine ()
 

Public Attributes

friend ReflectionMgr
 

Detailed Description

Definition at line 15 of file ReflectionMgr.h.

Constructor & Destructor Documentation

◆ DefineWrapper()

CSE::ReflectionMgr::DefineWrapper::DefineWrapper ( const DefineWrapper & other)
inline

Definition at line 31 of file ReflectionMgr.h.

31: m_defined(other.m_defined), m_node(other.m_node) {}

Member Function Documentation

◆ ReleaseDefine()

static void CSE::ReflectionMgr::DefineWrapper::ReleaseDefine ( )
inlinestatic

Definition at line 47 of file ReflectionMgr.h.

47 {
48 for (auto* node = ReflectionMgr::m_defineWrapper.m_defined;;) {
49 if (node == nullptr) break;
50 auto* node_next = node->m_next;
51 delete node;
52 node = node_next;
53 }
54 }

◆ SetDefine()

static unsigned char * CSE::ReflectionMgr::DefineWrapper::SetDefine ( std::string && type,
std::function< ReflectionObject *()> && func )
inlinestatic

Definition at line 33 of file ReflectionMgr.h.

33 {
34 if (ReflectionMgr::m_defineWrapper.m_defined == nullptr) {
35 ReflectionMgr::m_defineWrapper.m_defined = new DefineWrapperNode(type, func);
36 ReflectionMgr::m_defineWrapper.m_node = ReflectionMgr::m_defineWrapper.m_defined;
37 return nullptr;
38 }
39 auto& src = ReflectionMgr::m_defineWrapper.m_node;
40 auto* new_obj = new DefineWrapperNode(type, func);
41 src->m_next = new_obj;
42 ReflectionMgr::m_defineWrapper.m_node = new_obj;
43 ReflectionMgr::m_defineWrapper_prev = m_defineWrapper;
44 return nullptr;
45 }

Member Data Documentation

◆ ReflectionMgr

friend CSE::ReflectionMgr::DefineWrapper::ReflectionMgr

Definition at line 61 of file ReflectionMgr.h.


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