]> git.mxchange.org Git - flightgear.git/blobdiff - JSBsim/FGFDMExec.h
New changes to address various feedback from initial release.
[flightgear.git] / JSBsim / FGFDMExec.h
index 6a8f3a1556562157060b4834ba84ef167cbc3613..7997a1cfebd3a1539e965e9caed87dd1cc66c982 100644 (file)
@@ -26,9 +26,8 @@
 HISTORY
 --------------------------------------------------------------------------------
 11/17/98   JSB   Created
-*******************************************************************************/
 
-/*******************************************************************************
+********************************************************************************
 SENTRY
 *******************************************************************************/
 
@@ -40,45 +39,62 @@ INCLUDES
 *******************************************************************************/
 
 #include "FGModel.h"
-#include "FGAtmosphere.h"
-#include "FGFCS.h"
-#include "FGAircraft.h"
-#include "FGTranslation.h"
-#include "FGRotation.h"
-#include "FGPosition.h"
-#include "FGAuxiliary.h"
-#include "FGOutput.h"
 
 /*******************************************************************************
 CLASS DECLARATION
 *******************************************************************************/
 
+class FGState;
+class FGAtmosphere;
+class FGFCS;
+class FGAircraft;
+class FGTranslation;
+class FGRotation;
+class FGPosition;
+class FGAuxiliary;
+class FGOutput;
+
 class FGFDMExec
 {
 public:
-   FGFDMExec::FGFDMExec(void);
-   FGFDMExec::~FGFDMExec(void);
-
-   FGModel* FirstModel;
-
-   bool Initialize(void);
-   int  Schedule(FGModel* model, int rate);
-   bool Run(void);
-   bool Freeze(void);
-   bool Resume(void);
+  FGFDMExec::FGFDMExec(void);
+  FGFDMExec::~FGFDMExec(void);
+
+  FGModel* FirstModel;
+
+  bool Initialize(void);
+  int  Schedule(FGModel* model, int rate);
+  bool Run(void);
+  void Freeze(void) {frozen = true;}
+  void Resume(void) {frozen = false;}
+
+  inline FGState* GetState(void)             {return State;}
+  inline FGAtmosphere* GetAtmosphere(void)   {return Atmosphere;}
+  inline FGFCS* GetFCS(void)                 {return FCS;}
+  inline FGAircraft* GetAircraft(void)       {return Aircraft;}
+  inline FGTranslation* GetTranslation(void) {return Translation;}
+  inline FGRotation* GetRotation(void)       {return Rotation;}
+  inline FGPosition* GetPosition(void)       {return Position;}
+  inline FGAuxiliary* GetAuxiliary(void)     {return Auxiliary;}
+  inline FGOutput* GetOutput(void)           {return Output;}
 
 private:
-   bool freeze;
-   bool terminate;
+  bool frozen;
+  bool terminate;
+  int Error;
+
+  FGState*       State;
+  FGAtmosphere*  Atmosphere;
+  FGFCS*         FCS;
+  FGAircraft*    Aircraft;
+  FGTranslation* Translation;
+  FGRotation*    Rotation;
+  FGPosition*    Position;
+  FGAuxiliary*   Auxiliary;
+  FGOutput*      Output;
 
 protected:
 };
 
-#ifndef FDM_MAIN
-extern FGFDMExec* FDMExec;
-#else
-FGFDMExec* FDMExec;
-#endif
-
 /******************************************************************************/
 #endif