SDEngine
Game Engine
Loading...
Searching...
No Matches
sd::ComponentFactory Class Reference

#include <ComponentFactory.hpp>

Public Types

using PoolCreatorFn = std::function< std::unique_ptr< SparseEntitySetBase >()>
 

Static Public Member Functions

static void register_component (u32 component_id, PoolCreatorFn creator)
 
static std::unique_ptr< SparseEntitySetBasecreate (u32 component_id)
 
static bool is_registered (u32 component_id)
 

Static Private Attributes

static std::vector< PoolCreatorFnm_creators
 

Member Typedef Documentation

◆ PoolCreatorFn

using sd::ComponentFactory::PoolCreatorFn = std::function<std::unique_ptr<SparseEntitySetBase>()>

Member Function Documentation

◆ create()

std::unique_ptr< SparseEntitySetBase > sd::ComponentFactory::create ( u32  component_id)
static

◆ is_registered()

bool sd::ComponentFactory::is_registered ( u32  component_id)
static

◆ register_component()

void sd::ComponentFactory::register_component ( u32  component_id,
PoolCreatorFn  creator 
)
static

Member Data Documentation

◆ m_creators

std::vector<PoolCreatorFn> sd::ComponentFactory::m_creators
inlinestaticprivate

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