Sound Bakery  v0.1.0
Open-source audio middleware for games
|
Creates, owns and tracks objects. More...
#include <object_owner.h>
Public Member Functions | |
std::shared_ptr< object > | create_runtime_object (const rttr::type &type) |
std::shared_ptr< object > | load_object (YAML::Node &node) |
std::shared_ptr< database_object > | create_database_object (const rttr::type &type, bool addToDatabase=true) |
template<typename T > | |
std::shared_ptr< T > | create_runtime_object () |
template<typename T > | |
std::shared_ptr< T > | create_database_object () |
void | remove_object (const std::shared_ptr< object > &object) |
void | destroy_all () |
std::vector< std::shared_ptr< object > > & | get_objects () |
const std::vector< std::shared_ptr< object > > & | get_objects () const |
Creates, owns and tracks objects.
This is the central location for object creation.
std::shared_ptr< sbk::core::database_object > sbk::core::object_owner::create_database_object | ( | const rttr::type & | type, |
bool | addToDatabase = true |
||
) |
addToDatabase | to automatically track the object. If set to false, the user is responsible for adding the object to the database. |