Reaktoro 
A unified framework for modeling chemically reactive systems
PhreeqcEditor.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 namespace Reaktoro {
26 
27 // Forward declarations
28 class ChemicalSystem;
29 class Phreeqc;
30 class StringList;
31 
33 {
34 public:
36  PhreeqcEditor();
37 
40  PhreeqcEditor(std::string database);
41 
43  PhreeqcEditor(const PhreeqcEditor& other);
44 
46  virtual ~PhreeqcEditor();
47 
49  auto operator=(PhreeqcEditor other) -> PhreeqcEditor&;
50 
53  auto setDatabase(std::string database) -> void;
54 
57  auto setAqueousPhase(StringList elements) -> void;
58 
61  auto setGaseousPhase(StringList gases) -> void;
62 
65  auto setMineralPhases(StringList minerals) -> void;
66 
68  operator ChemicalSystem() const;
69 
71  operator Phreeqc() const;
72 
73 private:
74  struct Impl;
75 
76  std::unique_ptr<Impl> pimpl;
77 };
78 
79 } // namespace Reaktoro
auto setMineralPhases(StringList minerals) -> void
Set the mineral phases in the system by specifying the names of the pure minerals.
Definition: PhreeqcEditor.cpp:91
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:47
Definition: Phreeqc.hpp:31
A class for representing a list of strings with special constructors.
Definition: StringList.hpp:27
PhreeqcEditor()
Construct a default PhreeqcEditor instance.
Definition: PhreeqcEditor.cpp:47
virtual ~PhreeqcEditor()
Destroy this PhreeqcEditor instance.
Definition: PhreeqcEditor.cpp:62
auto operator=(PhreeqcEditor other) -> PhreeqcEditor &
Assign another PhreeqcEditor instance to this.
Definition: PhreeqcEditor.cpp:65
auto setDatabase(std::string database) -> void
Set the PHREEQC database file to be used by the PhreeqcEditor.
Definition: PhreeqcEditor.cpp:71
auto database(std::string name) -> std::string
Return the contents of a built-in database as a string.
Definition: DatabaseUtils.cpp:65
auto setAqueousPhase(StringList elements) -> void
Set the aqueous species in the system by specifying which elements should exist.
Definition: PhreeqcEditor.cpp:76
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto elements() -> std::vector< std::string >
Return a vector of all known 116 chemical elements.
Definition: ElementUtils.cpp:155
Definition: PhreeqcEditor.hpp:32
auto setGaseousPhase(StringList gases) -> void
Set the gaseous phase in the system by specifying the end-member gases.
Definition: PhreeqcEditor.cpp:86