Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
SB::Core::Database Class Reference

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< DatabaseObjectremoveUnsafe (DatabaseObject *object)
 Removes the entry and gives ownership to the caller.
 
DatabaseObjecttryFind (SB_ID id) const
 
DatabaseObjecttryFind (std::string_view name) const
 
std::weak_ptr< DatabaseObjecttryFindWeak (SB_ID id) const
 
std::weak_ptr< DatabaseObjecttryFindWeak (std::string_view name) const
 
std::vector< std::weak_ptr< DatabaseObject > > getAll () const
 
void clear () noexcept
 

Detailed Description

Runtime lookup of objects, using their ID or name.

Member Function Documentation

◆ removeUnsafe()

std::shared_ptr< DatabaseObject > SB::Core::Database::removeUnsafe ( DatabaseObject object)
inline

Removes the entry and gives ownership to the caller.

Parameters
object

The documentation for this class was generated from the following files: