My Project
UDQToken.hpp
1 /*
2  Copyright 2020 Equinor ASA.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 
21 #ifndef UDQ_TOKEN_HPP
22 #define UDQ_TOKEN_HPP
23 
24 #include <string>
25 #include <vector>
26 #include <variant>
27 #include <opm/input/eclipse/Schedule/UDQ/UDQEnums.hpp>
28 
29 namespace Opm {
30 
31 class UDQToken {
32 public:
33  UDQToken(const std::string& string_token, UDQTokenType token_type);
34  UDQToken(const std::string& string_token, const std::vector<std::string>& selector);
35 
36  const std::vector<std::string>& selector() const;
37  const std::variant<std::string, double>& value() const;
38  UDQTokenType type() const;
39  std::string str() const;
40 private:
41  UDQTokenType token_type;
42  std::variant<std::string,double> m_value;
43  std::vector<std::string> m_selector;
44 };
45 
46 }
47 
48 
49 #endif
Definition: UDQToken.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29