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