Brunot
Loading...
Searching...
No Matches
th Namespace Reference

Classes

class  Factory
class  Library
class  MemberFunction

Typedefs

using ConstructFunction = std::function<std::unique_ptr<AnySerializable>(sys::Json&)>
using AnyAction
using AnySerializable

Variables

static const std::unordered_map< std::string, ConstructFunctioncomponent_constructors
static const std::unordered_map< gobj::Type, ConstructFunctiongameObject_contructors
static const std::unordered_map< std::string, ConstructFunctionresource_constructors

Typedef Documentation

◆ AnyAction

Initial value:
boost::type_erasure::any<
boost::type_erasure::_self>
Definition Any_Action.h:48

◆ AnySerializable

Initial value:
boost::type_erasure::any<
boost::type_erasure::_self>
Definition Any_Serializable.h:45

◆ ConstructFunction

using th::ConstructFunction = std::function<std::unique_ptr<AnySerializable>(sys::Json&)>

Variable Documentation

◆ component_constructors

const std::unordered_map<std::string, ConstructFunction> th::component_constructors
static

◆ gameObject_contructors

const std::unordered_map<gobj::Type, ConstructFunction> th::gameObject_contructors
static
Initial value:
= {
[](sys::Json& file)
{
return construct<Node>(file, std::make_unique<Entity>());
}
},
[](sys::Json& file)
{
return construct<Entity>(file);
}
},
[](sys::Json& file)
{
const std::string type = file.data().at("GameObject").at("name");
return component_constructors.at(type)(file);
}
}
}
Definition Json.h:32
@ Entity
Definition GameObject.h:53
@ Component
Definition GameObject.h:54
@ Node
Definition GameObject.h:50
static const std::unordered_map< std::string, ConstructFunction > component_constructors
Definition Factory.cpp:142

◆ resource_constructors

const std::unordered_map<std::string, ConstructFunction> th::resource_constructors
static