JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
FGModelFunctions.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 
3 Header: FGModelFunctions.h
4 Author: Jon Berndt
5 Date 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 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27 SENTRY
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
29 
30 #ifndef FGMODELFUNCTIONS_H
31 #define FGMODELFUNCTIONS_H
32 
33 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 INCLUDES
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
36 
37 #include <vector>
38 #include <map>
39 #include <list>
40 
41 #include "FGJSBBase.h"
42 #include "input_output/FGPropertyReader.h"
43 
44 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 DEFINITIONS
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
47 
48 #define ID_MODELFUNCTIONS "$Id: FGModelFunctions.h,v 1.11 2014/05/30 17:26:42 bcoconni Exp $"
49 
50 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 FORWARD DECLARATIONS
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
53 
54 namespace JSBSim {
55 
56 class FGFunction;
57 class Element;
58 class FGPropertyManager;
59 
60 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 CLASS DOCUMENTATION
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
63 
77 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78 DECLARATION: FGModelFunctions
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
80 
82 {
83 public:
84  virtual ~FGModelFunctions();
85  void RunPreFunctions(void);
86  void RunPostFunctions(void);
87  bool Load(Element* el, FGPropertyManager* PropertyManager, std::string prefix="");
88  void PreLoad(Element* el, FGPropertyManager* PropertyManager, std::string prefix="");
89  void PostLoad(Element* el, FGPropertyManager* PropertyManager, std::string prefix="");
90 
94  std::string GetFunctionStrings(const std::string& delimeter) const;
95 
100  std::string GetFunctionValues(const std::string& delimeter) const;
101 
106  FGFunction* GetPreFunction(const std::string& name);
107 
108 protected:
109  std::vector <FGFunction*> PreFunctions;
110  std::vector <FGFunction*> PostFunctions;
111  FGPropertyReader LocalProperties;
112 
113  virtual bool InitModel(void);
114 };
115 
116 } // namespace JSBSim
117 
118 #endif
std::string GetFunctionStrings(const std::string &delimeter) const
Gets the strings for the current set of functions.
FGFunction * GetPreFunction(const std::string &name)
Get one of the "pre" function.
JSBSim Base class.
Definition: FGJSBBase.h:80
Represents a mathematical function.
Definition: FGFunction.h:699
std::string GetFunctionValues(const std::string &delimeter) const
Gets the function values.
The model functions class provides the capability for loading, storing, and executing arbitrary funct...