Rise
The Vieneo Province
Condition.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Sprite.h
"
4
#include "
Text.h
"
5
#include "../Library/Nullable.h"
6
7
class
Condition
8
{
9
public
:
10
Nullable<float>
min
;
11
Nullable<float>
max
;
12
13
std::vector<Sprite>
sprites
;
14
std::vector<Text>
text
;
15
16
bool
MeetsCondition
(
float
busValue)
const
;
17
};
18
19
inline
bool
Condition::MeetsCondition
(
float
busValue)
const
20
{
21
bool
result =
true
;
22
23
//result &= (!fault.is_set() || fault.get() == prmFault); /// @todo could do minRange maxRange out-of-range low/high
24
result &= (!
min
.
is_set
() || (busValue >=
min
.
get
()));
25
result &= (!
max
.
is_set
() || (busValue <=
max
.
get
()));
26
27
return
result;
28
}
Sprite.h
Condition::text
std::vector< Text > text
Definition:
Condition.h:14
Condition::sprites
std::vector< Sprite > sprites
Definition:
Condition.h:13
Condition::MeetsCondition
bool MeetsCondition(float busValue) const
Definition:
Condition.h:19
Nullable< float >
Text.h
Nullable::is_set
bool is_set() const
Definition:
Nullable.h:87
Condition::max
Nullable< float > max
Definition:
Condition.h:11
Nullable::get
T get() const
Definition:
Nullable.h:80
Condition::min
Nullable< float > min
Definition:
Condition.h:10
Condition
Definition:
Condition.h:7
Displays
Condition.h
Generated on Tue May 4 2021 15:18:12 for Rise by
1.8.14