00001 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00002 00003 Header: FGModel.h 00004 Author: Jon Berndt 00005 Date started: 11/21/98 00006 00007 ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------- 00008 00009 This program is free software; you can redistribute it and/or modify it under 00010 the terms of the GNU Lesser General Public License as published by the Free Software 00011 Foundation; either version 2 of the License, or (at your option) any later 00012 version. 00013 00014 This program is distributed in the hope that it will be useful, but WITHOUT 00015 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00016 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00017 details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA. 00022 00023 Further information about the GNU Lesser General Public License can also be found on 00024 the world wide web at http://www.gnu.org. 00025 00026 HISTORY 00027 -------------------------------------------------------------------------------- 00028 11/22/98 JSB Created 00029 00030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00031 SENTRY 00032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00033 00034 #ifndef FGMODEL_H 00035 #define FGMODEL_H 00036 00037 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00038 INCLUDES 00039 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00040 00041 #include <FGJSBBase.h> 00042 #include <input_output/FGPropertyManager.h> 00043 #include <input_output/FGXMLElement.h> 00044 00045 #include <iostream> 00046 #include <string> 00047 00048 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00049 DEFINITIONS 00050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00051 00052 #define ID_MODEL "$Id: FGModel.h,v 1.9 2009/05/09 13:28:33 jberndt Exp $" 00053 00054 using namespace std; 00055 00056 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00057 FORWARD DECLARATIONS 00058 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00059 00060 namespace JSBSim { 00061 00062 class FGFDMExec; 00063 class FGState; 00064 class FGAtmosphere; 00065 class FGFCS; 00066 class FGPropulsion; 00067 class FGMassBalance; 00068 class FGAerodynamics; 00069 class FGInertial; 00070 class FGGroundReactions; 00071 class FGExternalReactions; 00072 class FGBuoyantForces; 00073 class FGAircraft; 00074 class FGPropagate; 00075 class FGAuxiliary; 00076 00077 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00078 CLASS DOCUMENTATION 00079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00080 00085 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00086 CLASS DECLARATION 00087 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ 00088 00089 class FGModel : public FGJSBBase 00090 { 00091 public: 00092 00094 FGModel(FGFDMExec*); 00096 virtual ~FGModel(); 00097 00101 virtual bool Load(Element* el) {return true;} 00102 00103 FGModel* NextModel; 00104 string Name; 00105 00109 virtual bool Run(void); 00110 virtual bool InitModel(void); 00111 virtual void SetRate(int tt) {rate = tt;} 00112 virtual int GetRate(void) {return rate;} 00113 FGFDMExec* GetExec(void) {return FDMExec;} 00114 00115 void SetPropertyManager(FGPropertyManager *fgpm) { PropertyManager=fgpm;} 00116 00117 protected: 00118 int exe_ctr; 00119 int rate; 00120 00121 virtual void Debug(int from); 00122 00123 FGFDMExec* FDMExec; 00124 FGState* State; 00125 FGAtmosphere* Atmosphere; 00126 FGFCS* FCS; 00127 FGPropulsion* Propulsion; 00128 FGMassBalance* MassBalance; 00129 FGAerodynamics* Aerodynamics; 00130 FGInertial* Inertial; 00131 FGGroundReactions* GroundReactions; 00132 FGExternalReactions* ExternalReactions; 00133 FGBuoyantForces* BuoyantForces; 00134 FGAircraft* Aircraft; 00135 FGPropagate* Propagate; 00136 FGAuxiliary* Auxiliary; 00137 FGPropertyManager* PropertyManager; 00138 }; 00139 } 00140 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00141 #endif 00142
1.5.5