]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGOutput.h
JSBSim tweaks.
[flightgear.git] / src / FDM / JSBSim / FGOutput.h
index 0abf0ca5b9cd3136cff1f4efafc6fcf9d54e3f3e..6638a89bbe81a721caabc4580fee7aff17d44e06 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGOutput.h
  Author:       Jon Berndt
@@ -27,28 +27,23 @@ HISTORY
 --------------------------------------------------------------------------------
 12/02/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGOUTPUT_H
 #define FGOUTPUT_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  ifdef FG_HAVE_STD_INCLUDES
-#    include <iostream>
-#    include <fstream>
-#  else
-#    include <iostream.h>
-#    include <fstream.h>
-#  endif
+#  include STL_IOSTREAM
+#  include STL_FSTREAM
 #else
 #  include <iostream>
 #  include <fstream>
@@ -56,15 +51,17 @@ INCLUDES
 
 #include "FGfdmSocket.h"
 
-/*******************************************************************************
+#define ID_OUTPUT "$Id$"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGOutput : public FGModel
 {
 public:
   FGOutput(FGFDMExec*);
-  ~FGOutput(void);
+  ~FGOutput();
 
   bool Run(void);
 
@@ -75,18 +72,22 @@ public:
   void SetFilename(string fn) {Filename = fn;}
   void SetType(string);
   void SetSubsystems(int tt) {SubSystems = tt;}
+  inline void Enable(void) { enabled = true; }
+  inline void Disable(void) { enabled = false; }
+  inline bool Toggle(void) {enabled = !enabled; return enabled;}
 
 protected:
 
 private:
-  bool sFirstPass, dFirstPass;
+  bool sFirstPass, dFirstPass, enabled;
   int SubSystems;
   string Filename;
   enum {otNone, otCSV, otTab, otSocket, otTerminal, otUnknown} Type;
   ofstream datafile;
   FGfdmSocket* socket;
+  void Debug(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif