Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
sbk::core::database Class Reference

Runtime lookup of objects, using their ID or name. More...

#include <database.h>

Inheritance diagram for sbk::core::database:

Public Member Functions

auto add_object_to_database (const std::shared_ptr< database_object > &object) -> void
 
auto remove_object_from_database (sbk_id objectID) -> void
 
auto try_find (sbk_id objectID) const -> std::weak_ptr< database_object >
 
auto try_find (std::string_view name) const -> std::weak_ptr< database_object >
 
auto get_all () const -> std::vector< std::weak_ptr< database_object > >
 
void clear_database () noexcept
 

Detailed Description

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.


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