FGFactorGroup::FGFactorGroup( FGFDMExec* fdmex ) : FGCoefficient( fdmex)
{
FDMExec = fdmex;
-
+ totalValue = 0;
Debug(0);
}
double FGFactorGroup::TotalValue(void)
{
unsigned int i;
- double totalsum = 0;
SDtotal = 0.0;
+ totalValue = 0.0;
for (i=0; i<sum.size(); i++) {
- totalsum += sum[i]->TotalValue();
+ totalValue += sum[i]->TotalValue();
SDtotal += sum[i]->GetSD();
}
- totalsum *= FGCoefficient::TotalValue();
+ totalValue *= FGCoefficient::TotalValue();
SDtotal *= FGCoefficient::GetSD();
Debug(2);
- return totalsum;
+ 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();
+ }
}
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
}
if (debug_lvl & 16) { // Sanity checking
}
+ if (debug_lvl & 64) {
+ if (from == 0) { // Constructor
+ cout << IdSrc << endl;
+ cout << IdHdr << endl;
+ }
+ }
}
+