|
Reactions
0.1.2
Handling reaction trees and decays
|
Database of elements with the NuBase information. More...


Public Types | |
| using | base_type = reactions::database::database< nubase_element, nubase::name, nubase::nubase_id > |
Public Types inherited from reactions::database::database< nubase_element, nubase::name, nubase::nubase_id > | |
| using | element_type = nubase_element |
Public Member Functions | |
| std::string const & | get_database_path () const |
| Get the path to the database file. More... | |
| template<class... Args> | |
| void | register_element (Args &&...args) |
| Register a new NuBase element. More... | |
| nubase_element | operator() (int id) const override |
| Create an element accessing by ID. More... | |
| nubase_element | operator() (std::string const &str) const override |
| Create an element accessing by name. More... | |
Public Member Functions inherited from reactions::database::database< nubase_element, nubase::name, nubase::nubase_id > | |
| virtual | ~database () |
| std::vector< element_type > | all_elements () const |
| All the elements in the database file. More... | |
| void | clear_cache () |
| Clear the cache, removing also user-registered elements. More... | |
| void | disable_cache () |
| Disable the cache. More... | |
| void | enable_cache () |
| std::string const & | get_database_path () const |
| Get the path to the database file. More... | |
| void | register_element (Args &&...args) |
| Register a new element. More... | |
| void | set_database_path (std::string const &s) |
Static Public Member Functions | |
| static nubase_database & | instance () |
| Get the only instance of this class. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from reactions::database::database< nubase_element, nubase::name, nubase::nubase_id > | |
| std::ifstream | open_database () const |
| Open the database. More... | |
| std::streampos | skip_commented_lines (std::ifstream &file) const |
| Skip lines with comments (preceeded by *) More... | |
| bool | read_field (typename element_type::base_type &tuple, std::string const &line) const |
| Read a field with the given index from a line. More... | |
| bool | read_line (typename element_type::base_type &tuple, std::string const &line, std::index_sequence< I... >) const |
| Read all the fields from a line. More... | |
| bool | read_line (typename element_type::base_type &tuple, std::string const &line) const |
| Read all the fields from a line. More... | |
| element_type | read_element (std::string const &line) const |
| Advance to the next element in the file and read it. More... | |
| element_type | access (T const &v) const |
| Access an element using the field accessor. More... | |
| database (std::string &&db) | |
| database (database &&)=delete | |
| database (database const &)=delete | |
| void | operator= (database &&)=delete |
| void | operator= (database const &)=delete |
Protected Attributes inherited from reactions::database::database< nubase_element, nubase::name, nubase::nubase_id > | |
| std::string | m_db |
| Path to the database file. More... | |
| class reactions::database::database::cache | m_cache |
Database of elements with the NuBase information.
| using reactions::nubase_database::base_type = reactions::database::database<nubase_element, nubase::name, nubase::nubase_id> |
|
inline |
Get the path to the database file.
|
inlinestatic |
Get the only instance of this class.
|
inlineoverridevirtual |
Create an element accessing by ID.
Implements reactions::database::database< nubase_element, nubase::name, nubase::nubase_id >.
|
inlineoverridevirtual |
Create an element accessing by name.
Implements reactions::database::database< nubase_element, nubase::name, nubase::nubase_id >.
|
inline |
Register a new NuBase element.
The new element must have a name and a NuBase ID that does not clash with any of the database used.
For the LaTeX name to be valid (an to avoid possible exceptions thrown during its computation), the element name must follow the following convention:
1.8.13