struct Database::Impl
Declaration
struct Database::Impl { /* full declaration omitted */ };
Declared at: ThermoFun/Database.cpp:27
Member Variables
- public ThermoFun::SubstancesMap substances_map
- The map of all aqueous species in the database
- public ThermoFun::ReactionsMap reactions_map
- The map of all reactions in the database
- public ThermoFun::ElementsMap elements_map
- The map of all elements in the database
- public ChemicalFun::DBElements all_elements
- Downloaded elements data for formula parser
Method Overview
- public Impl(std::string filename)
- public Impl(std::vector<std::string> jsons, std::string _label)
- public Impl()
- public auto addElement(const ThermoFun::Element & element) -> void
- public auto addMapElements(const ThermoFun::ElementsMap & elements) -> void
- public auto addMapReactions(const ThermoFun::ReactionsMap & reactions) -> void
- public auto addMapSubstances(const ThermoFun::SubstancesMap & substances) -> void
- public auto addReaction(const ThermoFun::Reaction & reaction) -> void
- public auto addRecord(json j, std::string _label) -> void
- public auto addRecords(json j, std::string _label = "unknown label") -> void
- public auto addSubstance(const ThermoFun::Substance & substance) -> void
- public template <class T>auto checkIfSymbolExists(std::map<std::string, T> map_, std::string record_type, std::string symbol) -> void
- public template <typename Key, typename Value>auto collectValues(const std::map<Key, Value> & map) const -> std::vector<Value>
- public auto containsElement(std::string symbol) const -> bool
- public auto containsReaction(std::string symbol) const -> bool
- public auto containsSubstance(std::string symbol) const -> bool
- public auto elementKeyToElement(ChemicalFun::ElementKey elementKey) -> ThermoFun::Element
- public auto fromFile(std::string filename) -> void
- public auto fromJSONs(std::vector<std::string> jsons, std::string _label) -> void
- public auto getElement(std::string symbol) -> ThermoFun::Element &
- public auto getElements() const -> std::vector<Element>
- public auto getReaction(std::string symbol) -> ThermoFun::Reaction &
- public auto getReactions() const -> std::vector<Reaction>
- public auto getSubstance(std::string symbol) -> ThermoFun::Substance &
- public auto getSubstances() const -> std::vector<Substance>
- public auto mapElements() -> ThermoFun::ElementsMap &
- public auto mapReactions() -> ThermoFun::ReactionsMap &
- public auto mapSubstances() -> ThermoFun::SubstancesMap &
- public auto numberOfElements() const -> size_t
- public auto numberOfReactions() const -> size_t
- public auto numberOfSubstances() const -> size_t
- public auto setDBElements(ThermoFun::ElementsMap elements) -> void
- public auto setElement(const ThermoFun::Element & element) -> void
- public auto setReaction(const ThermoFun::Reaction & reaction) -> void
- public auto setSubstance(const ThermoFun::Substance & substance) -> void
Methods
¶Impl(std::string filename)
Impl(std::string filename)
Declared at: ThermoFun/Database.cpp:45
Parameters
- std::string filename
¶Impl(std::vector<std::string> jsons,
std::string _label)
Impl(std::vector<std::string> jsons,
std::string _label)
Declared at: ThermoFun/Database.cpp:54
Parameters
- std::vector<std::string> jsons
- std::string _label
¶Impl()
Impl()
Declared at: ThermoFun/Database.cpp:42
¶auto addElement(const ThermoFun::Element& element)
-> void
auto addElement(const ThermoFun::Element& element)
-> void
Declared at: ThermoFun/Database.cpp:91
Parameters
- const ThermoFun::Element& element
¶auto addMapElements(
const ThermoFun::ElementsMap& elements)
-> void
auto addMapElements(
const ThermoFun::ElementsMap& elements)
-> void
Declared at: ThermoFun/Database.cpp:113
Parameters
- const ThermoFun::ElementsMap& elements
¶auto addMapReactions(
const ThermoFun::ReactionsMap& reactions)
-> void
auto addMapReactions(
const ThermoFun::ReactionsMap& reactions)
-> void
Declared at: ThermoFun/Database.cpp:134
Parameters
- const ThermoFun::ReactionsMap& reactions
¶auto addMapSubstances(
const ThermoFun::SubstancesMap& substances)
-> void
auto addMapSubstances(
const ThermoFun::SubstancesMap& substances)
-> void
Declared at: ThermoFun/Database.cpp:118
Parameters
- const ThermoFun::SubstancesMap& substances
¶auto addReaction(
const ThermoFun::Reaction& reaction) -> void
auto addReaction(
const ThermoFun::Reaction& reaction) -> void
Declared at: ThermoFun/Database.cpp:123
Parameters
- const ThermoFun::Reaction& reaction
¶auto addRecord(json j, std::string _label) -> void
auto addRecord(json j, std::string _label) -> void
Declared at: ThermoFun/Database.cpp:233
Parameters
- json j
- std::string _label
¶auto addRecords(
json j,
std::string _label = "unknown label") -> void
auto addRecords(
json j,
std::string _label = "unknown label") -> void
Declared at: ThermoFun/Database.cpp:276
Parameters
- json j
- std::string _label = "unknown label"
¶auto addSubstance(
const ThermoFun::Substance& substance) -> void
auto addSubstance(
const ThermoFun::Substance& substance) -> void
Declared at: ThermoFun/Database.cpp:102
Parameters
- const ThermoFun::Substance& substance
¶template <class T>
auto checkIfSymbolExists(
std::map<std::string, T> map_,
std::string record_type,
std::string symbol) -> void
template <class T>
auto checkIfSymbolExists(
std::map<std::string, T> map_,
std::string record_type,
std::string symbol) -> void
Declared at: ThermoFun/Database.cpp:224
Templates
- T
Parameters
- std::map<std::string, T> map_
- std::string record_type
- std::string symbol
¶template <typename Key, typename Value>
auto collectValues(
const std::map<Key, Value>& map) const
-> std::vector<Value>
template <typename Key, typename Value>
auto collectValues(
const std::map<Key, Value>& map) const
-> std::vector<Value>
Declared at: ThermoFun/Database.cpp:62
Templates
- Key
- Value
Parameters
- const std::map<Key, Value>& map
¶auto containsElement(std::string symbol) const
-> bool
auto containsElement(std::string symbol) const
-> bool
Declared at: ThermoFun/Database.cpp:208
Parameters
- std::string symbol
¶auto containsReaction(std::string symbol) const
-> bool
auto containsReaction(std::string symbol) const
-> bool
Declared at: ThermoFun/Database.cpp:218
Parameters
- std::string symbol
¶auto containsSubstance(std::string symbol) const
-> bool
auto containsSubstance(std::string symbol) const
-> bool
Declared at: ThermoFun/Database.cpp:213
Parameters
- std::string symbol
¶auto elementKeyToElement(
ChemicalFun::ElementKey elementKey)
-> ThermoFun::Element
auto elementKeyToElement(
ChemicalFun::ElementKey elementKey)
-> ThermoFun::Element
Declared at: ThermoFun/Database.cpp:83
Parameters
- ChemicalFun::ElementKey elementKey
¶auto fromFile(std::string filename) -> void
auto fromFile(std::string filename) -> void
Description
Parses the JSON file (or string) and puts the data into the internal data structure
Declared at: ThermoFun/Database.cpp:286
Parameters
- std::string filename
- name of the file (in the working directory)
¶auto fromJSONs(std::vector<std::string> jsons,
std::string _label) -> void
auto fromJSONs(std::vector<std::string> jsons,
std::string _label) -> void
Declared at: ThermoFun/Database.cpp:322
Parameters
- std::vector<std::string> jsons
- std::string _label
¶auto getElement(std::string symbol)
-> ThermoFun::Element&
auto getElement(std::string symbol)
-> ThermoFun::Element&
Declared at: ThermoFun/Database.cpp:169
Parameters
- std::string symbol
¶auto getElements() const -> std::vector<Element>
auto getElements() const -> std::vector<Element>
Declared at: ThermoFun/Database.cpp:139
¶auto getReaction(std::string symbol)
-> ThermoFun::Reaction&
auto getReaction(std::string symbol)
-> ThermoFun::Reaction&
Declared at: ThermoFun/Database.cpp:185
Parameters
- std::string symbol
¶auto getReactions() const -> std::vector<Reaction>
auto getReactions() const -> std::vector<Reaction>
Declared at: ThermoFun/Database.cpp:149
¶auto getSubstance(std::string symbol)
-> ThermoFun::Substance&
auto getSubstance(std::string symbol)
-> ThermoFun::Substance&
Declared at: ThermoFun/Database.cpp:177
Parameters
- std::string symbol
¶auto getSubstances() const
-> std::vector<Substance>
auto getSubstances() const
-> std::vector<Substance>
Declared at: ThermoFun/Database.cpp:144
¶auto mapElements() -> ThermoFun::ElementsMap&
auto mapElements() -> ThermoFun::ElementsMap&
Declared at: ThermoFun/Database.cpp:193
¶auto mapReactions() -> ThermoFun::ReactionsMap&
auto mapReactions() -> ThermoFun::ReactionsMap&
Declared at: ThermoFun/Database.cpp:203
¶auto mapSubstances() -> ThermoFun::SubstancesMap&
auto mapSubstances() -> ThermoFun::SubstancesMap&
Declared at: ThermoFun/Database.cpp:198
¶auto numberOfElements() const -> size_t
auto numberOfElements() const -> size_t
Declared at: ThermoFun/Database.cpp:154
¶auto numberOfReactions() const -> size_t
auto numberOfReactions() const -> size_t
Declared at: ThermoFun/Database.cpp:164
¶auto numberOfSubstances() const -> size_t
auto numberOfSubstances() const -> size_t
Declared at: ThermoFun/Database.cpp:159
¶auto setDBElements(
ThermoFun::ElementsMap elements) -> void
auto setDBElements(
ThermoFun::ElementsMap elements) -> void
Declared at: ThermoFun/Database.cpp:71
Parameters
- ThermoFun::ElementsMap elements
¶auto setElement(const ThermoFun::Element& element)
-> void
auto setElement(const ThermoFun::Element& element)
-> void
Declared at: ThermoFun/Database.cpp:96
Parameters
- const ThermoFun::Element& element
¶auto setReaction(
const ThermoFun::Reaction& reaction) -> void
auto setReaction(
const ThermoFun::Reaction& reaction) -> void
Declared at: ThermoFun/Database.cpp:128
Parameters
- const ThermoFun::Reaction& reaction
¶auto setSubstance(
const ThermoFun::Substance& substance) -> void
auto setSubstance(
const ThermoFun::Substance& substance) -> void
Declared at: ThermoFun/Database.cpp:107
Parameters
- const ThermoFun::Substance& substance