Database.hpp
The class used to store and retrieve data of chemical species.
Definition: Database.hpp:32
auto element(String const &symbol) const -> Element const &
Return an element with given symbol in the database.
auto reaction(String const &equation) const -> Reaction
Construct a reaction with given equation.
static auto embedded(String const &path) -> Database
Return a Database object constructed with a given embedded file.
Database(Vec< Element > const &elements, Vec< Species > const &species)
Construct a Database object with given elements and species.
auto addSpecies(Vec< Species > const &species) -> void
Add a list of species in the database.
auto addSpecies(Species const &species) -> void
Add a species in the database.
auto addElement(Element const &element) -> void
Add an element in the database.
static auto fromEmbeddedFile(String const &path) -> Database
Return a Database object constructed with a given embedded file.
auto speciesWithAggregateState(AggregateState option) const -> SpeciesList
Return all species in the database with given aggregate state.
auto species() const -> SpeciesList const &
Return all species in the database.
static auto fromStream(std::istream &stream) -> Database
Return a Database object constructed with given input stream containing the database text contents.
auto extend(Database const &other) -> void
Extend this database with elements, species and other contents from another database.
Database(Vec< Species > const &species)
Construct a Database object with given species (elements extracted from them).
static auto local(String const &path) -> Database
Return a Database object constructed with a given local file.
auto operator=(Database other) -> Database &
Assign another Database object to this.
auto attachedData() const -> Any const &
Return the attached data to this database whose type is known at runtime only.
auto elements() const -> ElementList const &
Return all elements in the database.
static auto fromFile(String const &path) -> Database
Return a Database object constructed with a given local file.
static auto fromContents(String const &contents) -> Database
Return a Database object constructed with given database text contents.
auto attachData(Any const &data) -> void
Attach data to this database whose type is known at runtime only.
A type used to represent a chemical species and its attributes.
Definition: Species.hpp:35
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
AggregateState
The aggregate states of substances according to IUPAC.
Definition: AggregateState.hpp:32
std::unique_ptr< T > Ptr
Convenient alias for std::unique_ptr<T>.
Definition: Types.hpp:102