Sound Bakery  v0.1.0
Open-source audio middleware for games
|
Runtime lookup of objects, using their ID or name. More...
#include <database.h>
Public Member Functions | |
void | add_object_to_database (const std::shared_ptr< database_object > &object) |
void | remove_object_from_database (sbk_id objectID) |
std::weak_ptr< database_object > | try_find (sbk_id objectID) const |
std::weak_ptr< database_object > | try_find (std::string_view name) const |
std::vector< std::weak_ptr< database_object > > | get_all () const |
void | clear_database () noexcept |
Runtime lookup of objects, using their ID or name.
The database holds weak pointers to objects.
Another object should own the shared_ptr objects to the database_object.