]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFactorGroup.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGFactorGroup.cpp
index 796bcb94e4212b23711e99fbdc17b03051dc08d0..dce8f32dc08324be803f79d1b331e6400933b623 100644 (file)
@@ -51,7 +51,7 @@ INCLUDES
 #include "FGFDMExec.h"
 
 #ifndef FGFS
-#  if defined(sgi) && !defined(__GNUC__)
+#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
 #    include <iomanip.h>
 #  else
 #    include <iomanip>
@@ -60,6 +60,8 @@ INCLUDES
 #  include STL_IOMANIP
 #endif
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_FACTORGROUP;
 
@@ -71,6 +73,7 @@ FGFactorGroup::FGFactorGroup( FGFDMExec* fdmex ) : FGCoefficient( fdmex)
 {
   FDMExec = fdmex;
   totalValue = 0;
+  IsFactor = true;
   Debug(0);
 }  
 
@@ -121,13 +124,38 @@ double FGFactorGroup::TotalValue(void)
      totalValue += sum[i]->TotalValue();
      SDtotal += sum[i]->GetSD();
   }
-  //cout << totalValue << "  " << FGCoefficient::TotalValue() << endl;
   totalValue *= FGCoefficient::TotalValue();
   SDtotal *= FGCoefficient::GetSD();
   Debug(2);
   return totalValue;
 }
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+void FGFactorGroup::bind(FGPropertyManager* parent)
+{
+  unsigned i;
+  node=parent->GetNode(name,true);
+  node->SetString("description",description);
+  FGCoefficient::bind(node);
+  for (i=0; i < sum.size(); i++) { 
+    sum[i]->bind(node);
+  } 
+  node=(FGPropertyManager*)node->getParent();                                         
+
+}
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+  
+void FGFactorGroup::unbind(void)
+{
+  unsigned i;
+  FGCoefficient::unbind();
+  for (i=0; i < sum.size(); i++) { 
+    sum[i]->unbind();
+  } 
+}
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 //    The bitmasked value choices are as follows:
 //    unset: In this case (the default) JSBSim would only print
@@ -175,3 +203,4 @@ void FGFactorGroup::Debug(int from)
   }
 }
 
+}