26 std::unique_ptr<th::AnySerializable>>;
49 static auto get(
const std::string& name) -> T*
52 T*
result = boost::type_erasure::any_cast<T*>(found);
67 auto result =
static_cast<GameObject*
>(boost::type_erasure::any_cast<void*>(found));
70 result->destroyed() ==
false &&
71 "Library tried to get an object as a gameobject* but it failed when casting");
78 static auto flush() -> void;
81#pragma region helper_functions
98#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:25
A object to hold and manage meshes in opengl.
holds and manages textures for use with meshes in sprites
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:49
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:103
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:62
boost::type_erasure::any< boost::type_erasure::serializable<>, boost::type_erasure::_self > AnySerializable
Definition Any_Serializable.h:53