Reaktoro 
A unified framework for modeling chemically reactive systems
NamingUtils.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 <string>
22 #include <vector>
23 
24 namespace Reaktoro {
25 
28 auto alternativeWaterNames() -> std::vector<std::string>&;
29 
35 auto alternativeChargedSpeciesNames(std::string name) -> std::vector<std::string>&;
36 
41 auto alternativeNeutralSpeciesNames(std::string name) -> std::vector<std::string>&;
42 
44 auto conventionalWaterName() -> std::string;
45 
51 auto conventionalChargedSpeciesName(std::string name) -> std::string;
52 
58 auto conventionalNeutralSpeciesName(std::string name) -> std::string;
59 
62 auto isAlternativeWaterName(std::string trial) -> bool;
63 
67 auto isAlternativeChargedSpeciesName(std::string trial, std::string name) -> bool;
68 
72 auto isAlternativeNeutralSpeciesName(std::string trial, std::string name) -> bool;
73 
78 auto splitChargedSpeciesName(std::string name) -> std::pair<std::string, double>;
79 
84 auto baseNameChargedSpecies(std::string name) -> std::string;
85 
88 auto baseNameNeutralSpecies(std::string name) -> std::string;
89 
94 auto chargeInSpeciesName(std::string name) -> double;
95 
96 } // namespace Reaktoro
auto isAlternativeWaterName(std::string trial) -> bool
Return true if a trial name is an alternative to a water species name.
Definition: NamingUtils.cpp:109
auto chargeInSpeciesName(std::string name) -> double
Return the electrical charge in a species name.
Definition: NamingUtils.cpp:184
auto baseNameNeutralSpecies(std::string name) -> std::string
Return the name of a neutral species without suffix (aq).
Definition: NamingUtils.cpp:166
auto conventionalWaterName() -> std::string
Return the conventional water name, which is H2O(l).
Definition: NamingUtils.cpp:89
auto splitChargedSpeciesName(std::string name) -> std::pair< std::string, double >
Return a pair with the base name of a charged species and its electrical charge.
Definition: NamingUtils.cpp:124
auto isAlternativeChargedSpeciesName(std::string trial, std::string name) -> bool
Return true if a trial name is an alternative to a given charged species name.
Definition: NamingUtils.cpp:114
auto alternativeWaterNames() -> std::vector< std::string > &
Return a collection of alternative names to the given species name.
Definition: NamingUtils.cpp:41
auto alternativeNeutralSpeciesNames(std::string name) -> std::vector< std::string > &
Return a collection of alternative names to the given neutral species name.
Definition: NamingUtils.cpp:73
auto conventionalChargedSpeciesName(std::string name) -> std::string
Return the conventional charged species name adopted in Reaktoro.
Definition: NamingUtils.cpp:94
auto baseNameChargedSpecies(std::string name) -> std::string
Return the name of a charged species without charge suffix.
Definition: NamingUtils.cpp:161
auto conventionalNeutralSpeciesName(std::string name) -> std::string
Return the conventional neutral species name adopted in Reaktoro.
Definition: NamingUtils.cpp:103
auto alternativeChargedSpeciesNames(std::string name) -> std::vector< std::string > &
Return a collection of alternative names to the given charged species name.
Definition: NamingUtils.cpp:46
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto isAlternativeNeutralSpeciesName(std::string trial, std::string name) -> bool
Return true if a trial name is an alternative to a given neutral species name.
Definition: NamingUtils.cpp:119