]> git.mxchange.org Git - flightgear.git/blobdiff - JSBsim/FGEngine.h
Added initial support for native SGI compilers.
[flightgear.git] / JSBsim / FGEngine.h
index 6baaf304e1c1347bd0e97df7543ea6f1c7703053..05e6406df2e10904cb622efd588574618892e832 100644 (file)
@@ -32,9 +32,8 @@ a generic engine.
 HISTORY
 --------------------------------------------------------------------------------
 01/21/99   JSB   Created
-*******************************************************************************/
 
-/*******************************************************************************
+********************************************************************************
 SENTRY
 *******************************************************************************/
 
@@ -45,6 +44,17 @@ SENTRY
 INCLUDES
 *******************************************************************************/
 
+#ifdef FGFS
+#  include <Include/compiler.h>
+#  include STL_STRING
+   FG_USING_STD(string);
+#  ifdef FG_HAVE_NATIVE_SGI_COMPILERS
+     FG_USING_NAMESPACE(std);
+#  endif
+#else
+#  include <string>
+#endif
+
 /*******************************************************************************
 DEFINES
 *******************************************************************************/
@@ -53,32 +63,43 @@ DEFINES
 CLASS DECLARATION
 *******************************************************************************/
 
+class FGFDMExec;
+class FGState;
+class FGAtmosphere;
+class FGFCS;
+class FGAircraft;
+class FGTranslation;
+class FGRotation;
+class FGPosition;
+class FGAuxiliary;
+class FGOutput;
+
 class FGEngine
 {
 public:
-  FGEngine(void);
-  FGEngine(char*);
+  FGEngine(FGFDMExec*, string, string, int);
   ~FGEngine(void);
 
-  float GetThrust(void) {return Thrust;}
-  bool  GetStarved(void) {return Starved;}
-  bool  GetFlameout(void) {return Flameout;}
-  float GetThrottle(void) {return Throttle;}
-  char* GetName() {return Name;}
+  enum EngineType {etUnknown, etRocket, etPiston, etTurboProp, etTurboJet};
+
+  float  GetThrottle(void) {return Throttle;}
+  float  GetThrust(void) {return Thrust;}
+  bool   GetStarved(void) {return Starved;}
+  bool   GetFlameout(void) {return Flameout;}
+  int    GetType(void) {return Type;}
+  string GetName() {return Name;}
 
   void SetStarved(bool tt) {Starved = tt;}
   void SetStarved(void) {Starved = true;}
 
-  int GetType(void) {return Type;}
-
   float CalcThrust(void);
   float CalcFuelNeed(void);
   float CalcOxidizerNeed(void);
 
 private:
-  char  Name[30];
+  string Name;
+  EngineType Type;
   float X, Y, Z;
-  int   Type;
   float SLThrustMax;
   float VacThrustMax;
   float SLFuelFlowMax;
@@ -92,6 +113,18 @@ private:
   bool  Starved;
   bool  Flameout;
   float PctPower;
+  int   EngineNumber;
+
+  FGFDMExec*      FDMExec;
+  FGState*        State;
+  FGAtmosphere*   Atmosphere;
+  FGFCS*          FCS;
+  FGAircraft*     Aircraft;
+  FGTranslation*  Translation;
+  FGRotation*     Rotation;
+  FGPosition*     Position;
+  FGAuxiliary*    Auxiliary;
+  FGOutput*       Output;
 
 protected:
   float CalcRocketThrust(void);