Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
DatabaseParser.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright © 2014-2024 Allan Leal
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library 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 GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // Reaktoro includes
21 #include <Reaktoro/Core/ElementList.hpp>
22 #include <Reaktoro/Core/SpeciesList.hpp>
23 
24 namespace Reaktoro {
25 
26 // Forward declarations
27 class Database;
28 class Data;
29 
32 {
33 public:
36 
39 
41  explicit DatabaseParser(const Data& node);
42 
45 
48 
50  auto elements() const -> const ElementList&;
51 
53  auto species() const -> const SpeciesList&;
54 
56  operator Database() const;
57 
58 private:
59  struct Impl;
60 
61  Ptr<Impl> pimpl;
62 };
63 
64 } // namespace Reaktoro
The class used to store and retrieve data for assemblying chemical systems.
Definition: Data.hpp:30
Used to handle the parsing of YAML or JSON files to construct a Database object.
Definition: DatabaseParser.hpp:32
auto elements() const -> const ElementList &
Return the parsed Element objects in the database file.
DatabaseParser(const Data &node)
Construct a DatabaseParser object with given Data object.
DatabaseParser(const DatabaseParser &other)
Construct a copy of a DatabaseParser object.
auto species() const -> const SpeciesList &
Return the parsed Species objects in the database file.
auto operator=(DatabaseParser other) -> DatabaseParser &
Assign another DatabaseParser object to this.
DatabaseParser()
Construct a default DatabaseParser object.
~DatabaseParser()
Destroy this DatabaseParser object.
The class used to store and retrieve data of chemical species.
Definition: Database.hpp:32
A type used as a collection of elements.
Definition: ElementList.hpp:28
A type used as a collection of species.
Definition: SpeciesList.hpp:29
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
std::unique_ptr< T > Ptr
Convenient alias for std::unique_ptr<T>.
Definition: Types.hpp:102