CSEngine
Loading...
Searching...
No Matches
CSE::ReflectionMgr Class Reference
Inheritance diagram for CSE::ReflectionMgr:
CSE::CoreBase

Classes

class  DefineWrapper
 

Public Member Functions

void Init () override
 
ReflectionObjectCreateObject (const std::string &type)
 
- Public Member Functions inherited from CSE::CoreBase
virtual void Update (float elapsedTime)
 

Detailed Description

Definition at line 13 of file ReflectionMgr.h.

Member Function Documentation

◆ CreateObject()

ReflectionObject * ReflectionMgr::CreateObject ( const std::string & type)

Definition at line 19 of file ReflectionMgr.cpp.

19 {
20 const auto& func = m_reflected.find(type);
21 if(func == m_reflected.end()) return nullptr;
22 return func->second();
23}

◆ Init()

void ReflectionMgr::Init ( )
overridevirtual

Implements CSE::CoreBase.

Definition at line 10 of file ReflectionMgr.cpp.

10 {
11 for (auto* node = ReflectionMgr::m_defineWrapper.m_defined;;) {
12 if (node == nullptr) break;
13 auto* node_next = node->m_next;
14 m_reflected[node->m_name] = node->m_func;
15 node = node_next;
16 }
17}

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