FlightGear next
FGModelFunctions.h
Go to the documentation of this file.
1/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3Header: FGModelFunctions.h
4Author: Jon Berndt
5Date started: August 2010
6
7 ------------- Copyright (C) 2010 Jon S. Berndt (jon@jsbsim.org) -------------
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
11 Software Foundation; either version 2 of the License, or (at your option) any
12 later 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
20 with this program; if not, write to the Free Software Foundation, Inc., 59
21 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 Further information about the GNU Lesser General Public License can also be
24 found on the world wide web at http://www.gnu.org.
25
26%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27SENTRY
28%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
29
30#ifndef FGMODELFUNCTIONS_H
31#define FGMODELFUNCTIONS_H
32
33/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34INCLUDES
35%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
36
37#include "FGJSBBase.h"
39
40/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41FORWARD DECLARATIONS
42%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
43
44namespace JSBSim {
45
46class FGFunction;
47class Element;
49class FGFDMExec;
50
51/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52CLASS DOCUMENTATION
53%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
54
67
68/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69DECLARATION: FGModelFunctions
70%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
71
73{
74public:
75 virtual ~FGModelFunctions();
76 void RunPreFunctions(void);
77 void RunPostFunctions(void);
78 bool Load(Element* el, FGFDMExec* fdmex, std::string prefix="");
79 void PreLoad(Element* el, FGFDMExec* fdmex, std::string prefix="");
80 void PostLoad(Element* el, FGFDMExec* fdmex, std::string prefix="");
81
85 std::string GetFunctionStrings(const std::string& delimeter) const;
86
91 std::string GetFunctionValues(const std::string& delimeter) const;
92
97 FGFunction* GetPreFunction(const std::string& name);
98
99protected:
100 std::vector <FGFunction*> PreFunctions;
101 std::vector <FGFunction*> PostFunctions;
103
104 virtual bool InitModel(void);
105};
106
107} // namespace JSBSim
108
109#endif
Represents a mathematical function.
Definition FGFunction.h:753
FGJSBBase()
Constructor for FGJSBBase.
Definition FGJSBBase.h:81
The model functions class provides the capability for loading, storing, and executing arbitrary funct...
std::vector< FGFunction * > PreFunctions
std::string GetFunctionValues(const std::string &delimeter) const
Gets the function values.
std::vector< FGFunction * > PostFunctions
std::string GetFunctionStrings(const std::string &delimeter) const
Gets the strings for the current set of functions.
FGPropertyReader LocalProperties
void PostLoad(Element *el, FGFDMExec *fdmex, std::string prefix="")
bool Load(Element *el, FGFDMExec *fdmex, std::string prefix="")
virtual bool InitModel(void)
FGFunction * GetPreFunction(const std::string &name)
Get one of the "pre" function.
void PreLoad(Element *el, FGFDMExec *fdmex, std::string prefix="")
const char * name