FlightGear
next
FGCondition.h
Go to the documentation of this file.
1
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3
Header: FGCondition.h
4
Author: Jon S. Berndt
5
Date started: 1/02/2003
6
7
------------- Copyright (C) -------------
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; either version 2 of the License, or (at your option) any later
12
version.
13
14
This program is distributed in the hope that it will be useful, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
details.
18
19
You should have received a copy of the GNU Lesser General Public License along with
20
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21
Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
Further information about the GNU Lesser General Public License can also be found on
24
the world wide web at http://www.gnu.org.
25
26
HISTORY
27
--------------------------------------------------------------------------------
28
29
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30
SENTRY
31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
32
33
#ifndef FGCONDITION_H
34
#define FGCONDITION_H
35
36
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
INCLUDES
38
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
39
40
#include <map>
41
42
#include "
FGJSBBase.h
"
43
#include "
math/FGPropertyValue.h
"
44
45
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46
FORWARD DECLARATIONS
47
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
48
49
namespace
JSBSim
{
50
51
class
FGPropertyManager
;
52
class
FGPropertyValue
;
53
class
Element
;
54
55
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56
CLASS DOCUMENTATION
57
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
58
61
62
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63
CLASS DECLARATION
64
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
65
66
class
FGCondition
:
public
FGJSBBase
67
{
68
public
:
69
FGCondition
(
Element
* element,
FGPropertyManager
* PropertyManager);
70
~FGCondition
(
void
);
71
72
bool
Evaluate
(
void
);
73
void
PrintCondition
(std::string indent=
" "
);
74
75
private
:
76
FGCondition
(
const
std::string& test,
FGPropertyManager
* PropertyManager,
77
Element
* el);
78
79
enum
eComparison {ecUndef=0, eEQ, eNE, eGT, eGE, eLT, eLE};
80
enum
eLogic {elUndef=0, eAND, eOR};
81
std::map <std::string, eComparison> mComparison;
82
eLogic Logic;
83
84
FGPropertyValue_ptr
TestParam1;
85
FGParameter_ptr
TestParam2;
86
eComparison Comparison;
87
std::string conditional;
88
89
std::vector <FGCondition*> conditions;
90
void
InitializeConditionals(
void
);
91
92
void
Debug(
int
from);
93
};
94
}
95
#endif
FGJSBBase.h
FGPropertyValue.h
JSBSim::Element
Definition
FGXMLElement.h:143
JSBSim::FGCondition::FGCondition
FGCondition(Element *element, FGPropertyManager *PropertyManager)
Definition
FGCondition.cpp:56
JSBSim::FGCondition::PrintCondition
void PrintCondition(std::string indent=" ")
Definition
FGCondition.cpp:225
JSBSim::FGCondition::~FGCondition
~FGCondition(void)
Definition
FGCondition.cpp:158
JSBSim::FGCondition::Evaluate
bool Evaluate(void)
Definition
FGCondition.cpp:167
JSBSim::FGJSBBase::FGJSBBase
FGJSBBase()
Constructor for FGJSBBase.
Definition
FGJSBBase.h:81
JSBSim::FGPropertyManager
Definition
FGPropertyManager.h:355
JSBSim::FGPropertyValue
Represents a property value which can use late binding.
Definition
FGPropertyValue.h:60
JSBSim
Definition
FGFDMExec.cpp:67
JSBSim::FGPropertyValue_ptr
SGSharedPtr< FGPropertyValue > FGPropertyValue_ptr
Definition
FGPropertyValue.h:92
JSBSim::FGParameter_ptr
SGSharedPtr< FGParameter > FGParameter_ptr
Definition
FGParameter.h:70
src
FDM
JSBSim
math
FGCondition.h
Generated on Tue Jun 3 2025 12:58:38 for FlightGear by
1.13.2