Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
Component.h File Reference
#include <nlohmann/json.hpp>
#include <cstddef>
#include <string>
#include <unordered_map>
#include <memory>
+ Include dependency graph for Component.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  eng::Component
 
class  eng::ComponentCreatorBase
 
class  eng::ComponentCreator< T >
 
class  eng::ComponentFactory
 

Namespaces

namespace  eng
 

Macros

#define COMPONENT(ComponentClass)
 

Macro Definition Documentation

◆ COMPONENT

#define COMPONENT (   ComponentClass)
Value:
public: \
static size_t TypeId() { return eng::Component::StaticTypeId<ComponentClass>(); } \
size_t GetTypeId() const override { return TypeId(); } \
static void Register() { eng::ComponentFactory::GetInstance().RegisterComponent<ComponentClass>(std::string(#ComponentClass)); }
void RegisterComponent(const std::string &name)
Definition Component.h:64
static ComponentFactory & GetInstance()
Definition Component.cpp:20

Definition at line 75 of file Component.h.