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 | addOrUpdateID (SB_ID oldID, SB_ID newID, DatabaseObject *object) |
void | addOrUpdateName (std::string_view oldName, std::string_view newName, DatabaseObject *object) |
void | remove (SB_ID id) |
void | remove (DatabaseObject *object) |
std::shared_ptr< DatabaseObject > | removeUnsafe (DatabaseObject *object) |
Removes the entry and gives ownership to the caller. | |
DatabaseObject * | tryFind (SB_ID id) const |
DatabaseObject * | tryFind (std::string_view name) const |
std::weak_ptr< DatabaseObject > | tryFindWeak (SB_ID id) const |
std::weak_ptr< DatabaseObject > | tryFindWeak (std::string_view name) const |
std::vector< std::weak_ptr< DatabaseObject > > | getAll () const |
void | clear () noexcept |
Runtime lookup of objects, using their ID or name.
|
inline |
Removes the entry and gives ownership to the caller.
object |