Base database class.
More...
#include <database.hpp>
template<class Element, class NameField, class IdField>
class reactions::database::database< Element, NameField, IdField >
Base database class.
◆ element_type
template<class Element, class NameField, class IdField>
◆ ~database()
template<class Element, class NameField, class IdField>
◆ database() [1/3]
template<class Element, class NameField, class IdField>
◆ database() [2/3]
template<class Element, class NameField, class IdField>
◆ database() [3/3]
template<class Element, class NameField, class IdField>
◆ access()
template<class Element, class NameField, class IdField>
template<class Field , class T >
Access an element using the field accessor.
◆ all_elements()
template<class Element, class NameField, class IdField>
All the elements in the database file.
Calling this function does not alter the cache. If the cache is enabled a copy of its content is returned. If not, elements are read from the database file.
This function returns the elements in the database and those registered by the user.
◆ clear_cache()
template<class Element, class NameField, class IdField>
Clear the cache, removing also user-registered elements.
◆ disable_cache()
template<class Element, class NameField, class IdField>
◆ enable_cache()
template<class Element, class NameField, class IdField>
◆ get_database_path()
template<class Element, class NameField, class IdField>
Get the path to the database file.
◆ open_database()
template<class Element, class NameField, class IdField>
Open the database.
Cache for elements loaded from the database or registered by the user
◆ operator()() [1/2]
template<class Element, class NameField, class IdField>
◆ operator()() [2/2]
template<class Element, class NameField, class IdField>
◆ operator=() [1/2]
template<class Element, class NameField, class IdField>
◆ operator=() [2/2]
template<class Element, class NameField, class IdField>
◆ read_element()
template<class Element, class NameField, class IdField>
Advance to the next element in the file and read it.
◆ read_field()
template<class Element, class NameField, class IdField>
template<std::size_t I>
Read a field with the given index from a line.
◆ read_line() [1/2]
template<class Element, class NameField, class IdField>
template<std::size_t... I>
Read all the fields from a line.
◆ read_line() [2/2]
template<class Element, class NameField, class IdField>
Read all the fields from a line.
◆ register_element()
template<class Element, class NameField, class IdField>
template<class... Args>
Register a new element.
The new element must have a name and a ID that does not clash with any of the database used.
◆ set_database_path()
template<class Element, class NameField, class IdField>
◆ skip_commented_lines()
template<class Element, class NameField, class IdField>
Skip lines with comments (preceeded by *)
◆ m_cache
template<class Element, class NameField, class IdField>
◆ m_db
template<class Element, class NameField, class IdField>
Path to the database file.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/reactions/checkouts/v0.1.1/include/reactions/database.hpp