![]() |
NDEVR
API Documentation
|
Provides access to a set of named database tables. More...
Public Member Functions | |
| virtual void | addTable (DynamicPointer< Table > &table) |
| Adds a table to the database. | |
| virtual DynamicPointer< Table > & | getTable (const String &name) |
| Retrieves a table by name from the database. | |
| virtual Dictionary< String, DynamicPointer< Table > > & | tables () |
| Returns a mutable reference to the dictionary of all tables. | |
| virtual const Dictionary< String, DynamicPointer< Table > > & | tables () const |
| Returns a const reference to the dictionary of all tables. | |
Protected Attributes | |
| Dictionary< String, DynamicPointer< Table > > | m_tables |
| Maps table names to their corresponding Table pointers. | |
Provides access to a set of named database tables.
Definition at line 43 of file Database.h.
|
virtual |
Adds a table to the database.
The table is registered using the name it already carries internally.
| [in] | table | A reference to the DynamicPointer<Table> to add. |
|
inlinevirtual |
Retrieves a table by name from the database.
If the table does not already exist in the dictionary, this will default-construct an entry for the given name and return a reference to it.
| [in] | name | The unique name identifying the table. |
Definition at line 54 of file Database.h.
|
inlinevirtual |
Returns a mutable reference to the dictionary of all tables.
Definition at line 71 of file Database.h.
References m_tables.
|
inlinevirtual |
Returns a const reference to the dictionary of all tables.
Definition at line 80 of file Database.h.
References m_tables.