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

Classes

class  Factory
class  Library
struct  Bezier
class  MemberFunction

Typedefs

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

Functions

auto to_json (json &j, const Bezier &n) ->void
auto from_json (const json &j, Bezier &n) ->void

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

◆ 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&)>

Function Documentation

◆ from_json()

auto th::from_json ( const json & j,
Bezier & n )->void

◆ to_json()

auto th::to_json ( json & j,
const Bezier & n )->void

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:145

◆ resource_constructors

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