OGS
AqueousSolution.h
Go to the documentation of this file.
1
11#pragma once
12
13// clang-format off
14#include <phreeqcpp/common/phrqtype.h>
15#include <phreeqcpp/Solution.h>
16// clang-format on
17
18#include <memory>
19
20namespace ChemistryLib
21{
22namespace PhreeqcKernelData
23{
24class AqueousSolution final : private cxxSolution
25{
26public:
27 AqueousSolution(double const temperature, double const pressure,
28 double const pe_value,
29 cxxISolution const& initial_aqueous_solution);
30
31 std::unique_ptr<cxxISolution const> getInitialAqueousSolution() const
32 {
33 return std::make_unique<cxxISolution const>(*Get_initial_data());
34 }
35
36 void setChemicalSystemID(std::size_t const chemical_system_id)
37 {
38 Set_n_user_both(chemical_system_id);
39 }
40
41 cxxSolution const* castToBaseClass() const
42 {
43 return static_cast<cxxSolution const*>(this);
44 }
45
46 std::unique_ptr<cxxSolution const> castToBaseClassNoninitialized()
47 {
48 Destroy_initial_data();
49 return std::make_unique<cxxSolution const>(*castToBaseClass());
50 }
51};
52} // namespace PhreeqcKernelData
53} // namespace ChemistryLib
std::unique_ptr< cxxSolution const > castToBaseClassNoninitialized()
std::unique_ptr< cxxISolution const > getInitialAqueousSolution() const
void setChemicalSystemID(std::size_t const chemical_system_id)
AqueousSolution(double const temperature, double const pressure, double const pe_value, cxxISolution const &initial_aqueous_solution)