OGS
EquilibriumReactants.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <phreeqcpp/PPassemblage.h>
14
15#include <set>
16#include <string>
17#include <vector>
18
19namespace ChemistryLib
20{
21namespace PhreeqcKernelData
22{
23class PhaseComponent final : private cxxPPassemblageComp
24{
25public:
26 PhaseComponent(std::string&& name_, double const initial_amount,
27 double const saturation_index);
28
29 cxxPPassemblageComp const* castToBaseClass() const
30 {
31 return static_cast<cxxPPassemblageComp const*>(this);
32 }
33
34 std::string const& getName() const { return Get_name(); }
35};
36
37class EquilibriumReactants final : private cxxPPassemblage
38{
39public:
40 explicit EquilibriumReactants(
41 std::vector<PhaseComponent> const& phase_components);
42
43 void setChemicalSystemID(std::size_t const chemical_system_id)
44 {
45 Set_n_user_both(chemical_system_id);
46 }
47
48 cxxPPassemblage const* castToBaseClass() const
49 {
50 return static_cast<cxxPPassemblage const*>(this);
51 }
52
53 std::map<std::string, cxxPPassemblageComp> const& getPhaseComponents() const
54 {
55 return castToBaseClass()->Get_pp_assemblage_comps();
56 }
57};
58
59} // namespace PhreeqcKernelData
60} // namespace ChemistryLib
EquilibriumReactants(std::vector< PhaseComponent > const &phase_components)
void setChemicalSystemID(std::size_t const chemical_system_id)
std::map< std::string, cxxPPassemblageComp > const & getPhaseComponents() const
PhaseComponent(std::string &&name_, double const initial_amount, double const saturation_index)
cxxPPassemblageComp const * castToBaseClass() const