Avionics
Dropship Simulator
Condition.h
Go to the documentation of this file.
1
#include "../Nullable.h"
2
#include "
Sprite.h
"
3
#include "
Text.h
"
4
5
class
Condition
6
{
7
public
:
8
Nullable<float>
min
;
9
Nullable<float>
max
;
10
Nullable<DWORD>
fault
;
11
12
std::vector<Sprite>
sprites
;
13
std::vector<Text>
text
;
14
15
bool
MeetsCondition
(
float
busValue,
Systems::Fault
prmFault)
const
16
{
17
bool
result =
true
;
18
19
result &= (!
fault
.
is_set
() ||
fault
.
get
() == prmFault);
20
result &= (!
min
.
is_set
() || (busValue >
min
.
get
()));
21
result &= (!
max
.
is_set
() || (busValue <
max
.
get
()));
22
23
return
result;
24
}
25
};
Sprite.h
Condition::text
std::vector< Text > text
Definition:
Condition.h:13
Condition::sprites
std::vector< Sprite > sprites
Definition:
Condition.h:12
Nullable< float >
Text.h
Condition::MeetsCondition
bool MeetsCondition(float busValue, Systems::Fault prmFault) const
Definition:
Condition.h:15
Nullable::is_set
bool is_set() const
Definition:
Nullable.h:86
Systems::Fault
Fault
Definition:
Enumerations.h:57
Condition::fault
Nullable< DWORD > fault
Definition:
Condition.h:10
Condition::max
Nullable< float > max
Definition:
Condition.h:9
Nullable::get
T get() const
Definition:
Nullable.h:79
Condition::min
Nullable< float > min
Definition:
Condition.h:8
Condition
Definition:
Condition.h:5
Rendering
Condition.h
Generated on Sat Feb 13 2021 09:30:43 for Avionics by
1.8.14