25 std::unique_ptr<th::AnySerializable>>;
48 static auto get(
const std::string& name) -> T*
51 T*
result = boost::type_erasure::any_cast<T*>(found);
66 auto result =
static_cast<GameObject*
>(boost::type_erasure::any_cast<void*>(found));
69 result->destroyed() ==
false &&
70 "Library tried to get an object as a gameobject* but it failed when casting");
77 static auto flush() -> void;
80#pragma region helper_functions
97#pragma region static_variables
static FMOD_RESULT result
Definition AudioObject.cpp:27
the base class for the engine, most things inherit from this.
std::unordered_map< std::string, std::unique_ptr< th::AnySerializable > > serializables_dictionary
Definition Library.h:24
A object to hold and manage meshes in opengl.
the base class for the engine, most things inherit from this.
Definition GameObject.h:77
auto operator=(Library &&other) noexcept -> Library &=delete
static auto get(const std::string &name) -> T *
get a pointer to an object in the library.
Definition Library.h:48
static auto findObject(const std::string &name) -> AnySerializable *
helper function, finds an object in the objects library, if it doesn't exist, it creates it
Definition Library.cpp:37
Library(const Library &other)=delete
static auto flush() -> void
remove objects from the library, this will break anything that uses its resources
Definition Library.cpp:32
static serializables_dictionary objects
a static unordered map of objects in the library
Definition Library.h:102
Library(Library &&other) noexcept=delete
auto operator=(const Library &other) -> Library &=delete
static auto addObject(const std::string &name) -> AnySerializable *
adds an object that doesn't exist to the objects library
Definition Library.cpp:61
Definition Factory.cpp:59
boost::type_erasure::any< boost::type_erasure::serializable<>, boost::type_erasure::_self > AnySerializable
Definition Any_Serializable.h:53