ThirdParty
custom-opm-common
opm-common
opm
parser
eclipse
Deck
value_status.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2019 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
#ifndef VALUE_STATUS
21
#define VALUE_STATUS
22
23
namespace
Opm
{
24
25
namespace
value
{
26
27
enum class
status
:
unsigned
char
{
uninitialized
= 0,
28
deck_value
= 1,
29
empty_default
= 2,
30
valid_default
= 3 };
31
32
33
inline
bool
defaulted
(
status
st) {
34
if
(st ==
status::empty_default
)
35
return
true
;
36
37
if
(st ==
status::valid_default
)
38
return
true
;
39
40
return
false
;
41
}
42
43
44
inline
bool
has_value
(
status
st) {
45
if
(st ==
status::deck_value
)
46
return
true
;
47
48
if
(st ==
status::valid_default
)
49
return
true
;
50
51
return
false
;
52
}
53
}
54
}
55
56
#endif
Opm::value::status
status
Definition:
value_status.hpp:27
Opm::value::status::deck_value
@ deck_value
Opm::value::status::uninitialized
@ uninitialized
Opm::value::status::valid_default
@ valid_default
Opm::value::status::empty_default
@ empty_default
Opm::value::defaulted
bool defaulted(status st)
Definition:
value_status.hpp:33
Opm::value::has_value
bool has_value(status st)
Definition:
value_status.hpp:44
Opm
Definition:
A.hpp:4
exprtk::details::value
T value(details::expression_node< T > *n)
Definition:
exprtk.hpp:12955