Lysa  0.0
Lysa 3D Engine
TypeRegistry< T_OBJECT > Struct Template Reference

Detailed Description

template<typename T_OBJECT>
struct lysa::TypeRegistry< T_OBJECT >

Register custom nodes types used to map the node's description in JSON scene files and real classes

Static Public Member Functions

template<typename T >
static std::shared_ptr< T > makeShared (const std::string &clazz)
 
template<typename T >
static void registerType (const std::string &clazz)
 

Static Public Attributes

static std::unique_ptr< std::map< std::string, std::function< std::shared_ptr< T_OBJECT >()> > > typeMap {nullptr}
 

Member Function Documentation

static std::shared_ptr<T> makeShared ( const std::string &  clazz)
inlinestatic

Creates a new shared pointer to a new instance of type clazz with casting to the type T

static void registerType ( const std::string &  clazz)
inlinestatic

Register a new class. Use it when registering from code.

Member Data Documentation

std::unique_ptr< std::map< std::string, std::function< std::shared_ptr< T_OBJECT >()> > > typeMap {nullptr}
static