The class used to store and retrieve data of chemical species from PHREEQC databases. More...
#include <PhreeqcDatabase.hpp>
Public Member Functions | |
PhreeqcDatabase () | |
Construct a default PhreeqcDatabase object. | |
PhreeqcDatabase (const String &name) | |
Construct a PhreeqcDatabase object using an embedded PHREEQC database. More... | |
auto | load (const String &database) -> PhreeqcDatabase & |
Extend this PhreeqcDatabase object with contents in given database file. More... | |
auto | ptr () const -> SharedPtr< PHREEQC > const & |
Return the underlying PHREEQC object. | |
Public Member Functions inherited from Database | |
Database () | |
Construct a default Database object. | |
Database (Database const &other) | |
Construct a copy of a Database object. | |
Database (Vec< Element > const &elements, Vec< Species > const &species) | |
Construct a Database object with given elements and species. | |
Database (Vec< Species > const &species) | |
Construct a Database object with given species (elements extracted from them). | |
~Database () | |
Destroy this Database object. | |
auto | operator= (Database other) -> Database & |
Assign another Database object to this. | |
auto | clear () -> void |
Remove all species and elements from the database. | |
auto | addElement (Element const &element) -> void |
Add an element in the database. More... | |
auto | addSpecies (Species const &species) -> void |
Add a species in the database. More... | |
auto | addSpecies (Vec< Species > const &species) -> void |
Add a list of species in the database. | |
auto | attachData (Any const &data) -> void |
Attach data to this database whose type is known at runtime only. | |
auto | extend (Database const &other) -> void |
Extend this database with elements, species and other contents from another database. | |
auto | elements () const -> ElementList const & |
Return all elements in the database. | |
auto | species () const -> SpeciesList const & |
Return all species in the database. | |
auto | speciesWithAggregateState (AggregateState option) const -> SpeciesList |
Return all species in the database with given aggregate state. | |
auto | element (String const &symbol) const -> Element const & |
Return an element with given symbol in the database. More... | |
auto | species (String const &name) const -> Species const & |
Return a species with given name in the database. More... | |
auto | reaction (String const &equation) const -> Reaction |
Construct a reaction with given equation. More... | |
auto | attachedData () const -> Any const & |
Return the attached data to this database whose type is known at runtime only. | |
Static Public Member Functions | |
static auto | withName (const String &name) -> PhreeqcDatabase |
Return a PhreeqcDatabase object constructed with an embedded database file. More... | |
static auto | fromFile (const String &path) -> PhreeqcDatabase |
Return a PhreeqcDatabase object constructed with a given local file. More... | |
static auto | fromContents (const String &contents) -> PhreeqcDatabase |
Return a PhreeqcDatabase object constructed with given database text contents. More... | |
static auto | contents (const String &name) -> String |
Return the contents of an embedded PHREEQC database as a string. More... | |
static auto | namesEmbeddedDatabases () -> Strings |
Return the names of the currently supported embedded PHREEQC databases. | |
Static Public Member Functions inherited from Database | |
static auto | fromFile (String const &path) -> Database |
Return a Database object constructed with a given local file. More... | |
static auto | fromEmbeddedFile (String const &path) -> Database |
Return a Database object constructed with a given embedded file. More... | |
static auto | fromContents (String const &contents) -> Database |
Return a Database object constructed with given database text contents. More... | |
static auto | fromStream (std::istream &stream) -> Database |
Return a Database object constructed with given input stream containing the database text contents. More... | |
static auto | local (String const &path) -> Database |
Return a Database object constructed with a given local file. More... | |
static auto | embedded (String const &path) -> Database |
Return a Database object constructed with a given embedded file. More... | |
Detailed Description
The class used to store and retrieve data of chemical species from PHREEQC databases.
Constructor & Destructor Documentation
◆ PhreeqcDatabase()
PhreeqcDatabase | ( | const String & | name | ) |
Construct a PhreeqcDatabase object using an embedded PHREEQC database.
If name
does not correspond to one of the following names, an exception is thrown:
- Amm.dat
- frezchem.dat
- iso.dat
- llnl.dat
- minteq.dat
- minteq.v4.dat
- phreeqc.dat
- pitzer.dat
- sit.dat
- wateq4f.dat
- Parameters
-
name The name of the embedded PHREEQC database file
Member Function Documentation
◆ load()
auto load | ( | const String & | database | ) | -> PhreeqcDatabase & |
Extend this PhreeqcDatabase object with contents in given database file.
This method supports either a path to a database file, including its file name, or a multi-line string containing the database contents.
- Parameters
-
database The path to the database file or its contents as a string
◆ withName()
|
static |
Return a PhreeqcDatabase object constructed with an embedded database file.
If name
does not correspond to one of the following names, an exception is thrown:
- Amm.dat
- frezchem.dat
- iso.dat
- llnl.dat
- minteq.dat
- minteq.v4.dat
- phreeqc.dat
- pitzer.dat
- sit.dat
- wateq4f.dat
- Parameters
-
name The name of the embedded PHREEQC database file
◆ fromFile()
|
static |
Return a PhreeqcDatabase object constructed with a given local file.
- Parameters
-
path The path, including file name, to the database file.
- Warning
- An exception is thrown if
path
does not point to a valid database file.
◆ fromContents()
|
static |
Return a PhreeqcDatabase object constructed with given database text contents.
- Parameters
-
contents The contents of the database as a string.
◆ contents()
Return the contents of an embedded PHREEQC database as a string.
- Parameters
-
name The name of the embedded PHREEQC database file
- See also
- withName
The documentation for this class was generated from the following file:
- Reaktoro/Extensions/Phreeqc/PhreeqcDatabase.hpp