1
0
Fork 0

Always set useDefault to false when calling SGPropertyNode::tie()

Setting useDefault to true is equivalent to using unitialized variables we are getting whatever is currently in the memory whether it is relevant or not.
This commit is contained in:
Bertrand Coconnier 2021-01-09 18:51:50 +01:00
parent 12996087de
commit d3a11d72bb
12 changed files with 108 additions and 164 deletions

View file

@ -155,17 +155,17 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root, unsigned int* fdmctr)
Constructing = true; Constructing = true;
typedef int (FGFDMExec::*iPMF)(void) const; typedef int (FGFDMExec::*iPMF)(void) const;
instance->Tie("simulation/do_simple_trim", this, (iPMF)0, &FGFDMExec::DoTrim, false); instance->Tie("simulation/do_simple_trim", this, (iPMF)0, &FGFDMExec::DoTrim);
instance->Tie("simulation/reset", this, (iPMF)0, &FGFDMExec::ResetToInitialConditions, false); instance->Tie("simulation/reset", this, (iPMF)0, &FGFDMExec::ResetToInitialConditions);
instance->Tie("simulation/disperse", this, &FGFDMExec::GetDisperse); instance->Tie("simulation/disperse", this, &FGFDMExec::GetDisperse);
instance->Tie("simulation/randomseed", this, (iPMF)&FGFDMExec::SRand, &FGFDMExec::SRand, false); instance->Tie("simulation/randomseed", this, (iPMF)&FGFDMExec::SRand, &FGFDMExec::SRand);
instance->Tie("simulation/terminate", (int *)&Terminate); instance->Tie("simulation/terminate", (int *)&Terminate);
instance->Tie("simulation/pause", (int *)&holding); instance->Tie("simulation/pause", (int *)&holding);
instance->Tie("simulation/sim-time-sec", this, &FGFDMExec::GetSimTime); instance->Tie("simulation/sim-time-sec", this, &FGFDMExec::GetSimTime);
instance->Tie("simulation/dt", this, &FGFDMExec::GetDeltaT); instance->Tie("simulation/dt", this, &FGFDMExec::GetDeltaT);
instance->Tie("simulation/jsbsim-debug", this, &FGFDMExec::GetDebugLevel, &FGFDMExec::SetDebugLevel); instance->Tie("simulation/jsbsim-debug", this, &FGFDMExec::GetDebugLevel, &FGFDMExec::SetDebugLevel);
instance->Tie("simulation/frame", (int *)&Frame, false); instance->Tie("simulation/frame", (int *)&Frame);
instance->Tie("simulation/trim-completed", (int *)&trim_completed, false); instance->Tie("simulation/trim-completed", (int *)&trim_completed);
instance->Tie("forces/hold-down", this, &FGFDMExec::GetHoldDown, &FGFDMExec::SetHoldDown); instance->Tie("forces/hold-down", this, &FGFDMExec::GetHoldDown, &FGFDMExec::SetHoldDown);
Constructing = false; Constructing = false;

View file

@ -1450,80 +1450,61 @@ void FGInitialCondition::bind(FGPropertyManager* PropertyManager)
{ {
PropertyManager->Tie("ic/vc-kts", this, PropertyManager->Tie("ic/vc-kts", this,
&FGInitialCondition::GetVcalibratedKtsIC, &FGInitialCondition::GetVcalibratedKtsIC,
&FGInitialCondition::SetVcalibratedKtsIC, &FGInitialCondition::SetVcalibratedKtsIC);
true);
PropertyManager->Tie("ic/ve-kts", this, PropertyManager->Tie("ic/ve-kts", this,
&FGInitialCondition::GetVequivalentKtsIC, &FGInitialCondition::GetVequivalentKtsIC,
&FGInitialCondition::SetVequivalentKtsIC, &FGInitialCondition::SetVequivalentKtsIC);
true);
PropertyManager->Tie("ic/vg-kts", this, PropertyManager->Tie("ic/vg-kts", this,
&FGInitialCondition::GetVgroundKtsIC, &FGInitialCondition::GetVgroundKtsIC,
&FGInitialCondition::SetVgroundKtsIC, &FGInitialCondition::SetVgroundKtsIC);
true);
PropertyManager->Tie("ic/vt-kts", this, PropertyManager->Tie("ic/vt-kts", this,
&FGInitialCondition::GetVtrueKtsIC, &FGInitialCondition::GetVtrueKtsIC,
&FGInitialCondition::SetVtrueKtsIC, &FGInitialCondition::SetVtrueKtsIC);
true);
PropertyManager->Tie("ic/mach", this, PropertyManager->Tie("ic/mach", this,
&FGInitialCondition::GetMachIC, &FGInitialCondition::GetMachIC,
&FGInitialCondition::SetMachIC, &FGInitialCondition::SetMachIC);
true);
PropertyManager->Tie("ic/roc-fpm", this, PropertyManager->Tie("ic/roc-fpm", this,
&FGInitialCondition::GetClimbRateFpmIC, &FGInitialCondition::GetClimbRateFpmIC,
&FGInitialCondition::SetClimbRateFpmIC, &FGInitialCondition::SetClimbRateFpmIC);
true);
PropertyManager->Tie("ic/gamma-deg", this, PropertyManager->Tie("ic/gamma-deg", this,
&FGInitialCondition::GetFlightPathAngleDegIC, &FGInitialCondition::GetFlightPathAngleDegIC,
&FGInitialCondition::SetFlightPathAngleDegIC, &FGInitialCondition::SetFlightPathAngleDegIC);
true);
PropertyManager->Tie("ic/alpha-deg", this, PropertyManager->Tie("ic/alpha-deg", this,
&FGInitialCondition::GetAlphaDegIC, &FGInitialCondition::GetAlphaDegIC,
&FGInitialCondition::SetAlphaDegIC, &FGInitialCondition::SetAlphaDegIC);
true);
PropertyManager->Tie("ic/beta-deg", this, PropertyManager->Tie("ic/beta-deg", this,
&FGInitialCondition::GetBetaDegIC, &FGInitialCondition::GetBetaDegIC,
&FGInitialCondition::SetBetaDegIC, &FGInitialCondition::SetBetaDegIC);
true);
PropertyManager->Tie("ic/theta-deg", this, PropertyManager->Tie("ic/theta-deg", this,
&FGInitialCondition::GetThetaDegIC, &FGInitialCondition::GetThetaDegIC,
&FGInitialCondition::SetThetaDegIC, &FGInitialCondition::SetThetaDegIC);
true);
PropertyManager->Tie("ic/phi-deg", this, PropertyManager->Tie("ic/phi-deg", this,
&FGInitialCondition::GetPhiDegIC, &FGInitialCondition::GetPhiDegIC,
&FGInitialCondition::SetPhiDegIC, &FGInitialCondition::SetPhiDegIC);
true);
PropertyManager->Tie("ic/psi-true-deg", this, PropertyManager->Tie("ic/psi-true-deg", this,
&FGInitialCondition::GetPsiDegIC, &FGInitialCondition::GetPsiDegIC,
&FGInitialCondition::SetPsiDegIC, &FGInitialCondition::SetPsiDegIC);
true);
PropertyManager->Tie("ic/lat-gc-deg", this, PropertyManager->Tie("ic/lat-gc-deg", this,
&FGInitialCondition::GetLatitudeDegIC, &FGInitialCondition::GetLatitudeDegIC,
&FGInitialCondition::SetLatitudeDegIC, &FGInitialCondition::SetLatitudeDegIC);
true);
PropertyManager->Tie("ic/long-gc-deg", this, PropertyManager->Tie("ic/long-gc-deg", this,
&FGInitialCondition::GetLongitudeDegIC, &FGInitialCondition::GetLongitudeDegIC,
&FGInitialCondition::SetLongitudeDegIC, &FGInitialCondition::SetLongitudeDegIC);
true);
PropertyManager->Tie("ic/h-sl-ft", this, PropertyManager->Tie("ic/h-sl-ft", this,
&FGInitialCondition::GetAltitudeASLFtIC, &FGInitialCondition::GetAltitudeASLFtIC,
&FGInitialCondition::SetAltitudeASLFtIC, &FGInitialCondition::SetAltitudeASLFtIC);
true);
PropertyManager->Tie("ic/h-agl-ft", this, PropertyManager->Tie("ic/h-agl-ft", this,
&FGInitialCondition::GetAltitudeAGLFtIC, &FGInitialCondition::GetAltitudeAGLFtIC,
&FGInitialCondition::SetAltitudeAGLFtIC, &FGInitialCondition::SetAltitudeAGLFtIC);
true);
PropertyManager->Tie("ic/terrain-elevation-ft", this, PropertyManager->Tie("ic/terrain-elevation-ft", this,
&FGInitialCondition::GetTerrainElevationFtIC, &FGInitialCondition::GetTerrainElevationFtIC,
&FGInitialCondition::SetTerrainElevationFtIC, &FGInitialCondition::SetTerrainElevationFtIC);
true);
PropertyManager->Tie("ic/vg-fps", this, PropertyManager->Tie("ic/vg-fps", this,
&FGInitialCondition::GetVgroundFpsIC, &FGInitialCondition::GetVgroundFpsIC,
&FGInitialCondition::SetVgroundFpsIC, &FGInitialCondition::SetVgroundFpsIC);
true);
PropertyManager->Tie("ic/vt-fps", this, PropertyManager->Tie("ic/vt-fps", this,
&FGInitialCondition::GetVtrueFpsIC, &FGInitialCondition::GetVtrueFpsIC,
&FGInitialCondition::SetVtrueFpsIC, &FGInitialCondition::SetVtrueFpsIC);
true);
PropertyManager->Tie("ic/vw-bx-fps", this, PropertyManager->Tie("ic/vw-bx-fps", this,
&FGInitialCondition::GetWindUFpsIC); &FGInitialCondition::GetWindUFpsIC);
PropertyManager->Tie("ic/vw-by-fps", this, PropertyManager->Tie("ic/vw-by-fps", this,
@ -1540,96 +1521,74 @@ void FGInitialCondition::bind(FGPropertyManager* PropertyManager)
&FGInitialCondition::GetWindFpsIC); &FGInitialCondition::GetWindFpsIC);
PropertyManager->Tie("ic/vw-dir-deg", this, PropertyManager->Tie("ic/vw-dir-deg", this,
&FGInitialCondition::GetWindDirDegIC, &FGInitialCondition::GetWindDirDegIC,
&FGInitialCondition::SetWindDirDegIC, &FGInitialCondition::SetWindDirDegIC);
true);
PropertyManager->Tie("ic/roc-fps", this, PropertyManager->Tie("ic/roc-fps", this,
&FGInitialCondition::GetClimbRateFpsIC, &FGInitialCondition::GetClimbRateFpsIC,
&FGInitialCondition::SetClimbRateFpsIC, &FGInitialCondition::SetClimbRateFpsIC);
true);
PropertyManager->Tie("ic/u-fps", this, PropertyManager->Tie("ic/u-fps", this,
&FGInitialCondition::GetUBodyFpsIC, &FGInitialCondition::GetUBodyFpsIC,
&FGInitialCondition::SetUBodyFpsIC, &FGInitialCondition::SetUBodyFpsIC);
true);
PropertyManager->Tie("ic/v-fps", this, PropertyManager->Tie("ic/v-fps", this,
&FGInitialCondition::GetVBodyFpsIC, &FGInitialCondition::GetVBodyFpsIC,
&FGInitialCondition::SetVBodyFpsIC, &FGInitialCondition::SetVBodyFpsIC);
true);
PropertyManager->Tie("ic/w-fps", this, PropertyManager->Tie("ic/w-fps", this,
&FGInitialCondition::GetWBodyFpsIC, &FGInitialCondition::GetWBodyFpsIC,
&FGInitialCondition::SetWBodyFpsIC, &FGInitialCondition::SetWBodyFpsIC);
true);
PropertyManager->Tie("ic/vn-fps", this, PropertyManager->Tie("ic/vn-fps", this,
&FGInitialCondition::GetVNorthFpsIC, &FGInitialCondition::GetVNorthFpsIC,
&FGInitialCondition::SetVNorthFpsIC, &FGInitialCondition::SetVNorthFpsIC);
true);
PropertyManager->Tie("ic/ve-fps", this, PropertyManager->Tie("ic/ve-fps", this,
&FGInitialCondition::GetVEastFpsIC, &FGInitialCondition::GetVEastFpsIC,
&FGInitialCondition::SetVEastFpsIC, &FGInitialCondition::SetVEastFpsIC);
true);
PropertyManager->Tie("ic/vd-fps", this, PropertyManager->Tie("ic/vd-fps", this,
&FGInitialCondition::GetVDownFpsIC, &FGInitialCondition::GetVDownFpsIC,
&FGInitialCondition::SetVDownFpsIC, &FGInitialCondition::SetVDownFpsIC);
true);
PropertyManager->Tie("ic/gamma-rad", this, PropertyManager->Tie("ic/gamma-rad", this,
&FGInitialCondition::GetFlightPathAngleRadIC, &FGInitialCondition::GetFlightPathAngleRadIC,
&FGInitialCondition::SetFlightPathAngleRadIC, &FGInitialCondition::SetFlightPathAngleRadIC);
true);
PropertyManager->Tie("ic/alpha-rad", this, PropertyManager->Tie("ic/alpha-rad", this,
&FGInitialCondition::GetAlphaRadIC, &FGInitialCondition::GetAlphaRadIC,
&FGInitialCondition::SetAlphaRadIC, &FGInitialCondition::SetAlphaRadIC);
true);
PropertyManager->Tie("ic/theta-rad", this, PropertyManager->Tie("ic/theta-rad", this,
&FGInitialCondition::GetThetaRadIC, &FGInitialCondition::GetThetaRadIC,
&FGInitialCondition::SetThetaRadIC, &FGInitialCondition::SetThetaRadIC);
true);
PropertyManager->Tie("ic/beta-rad", this, PropertyManager->Tie("ic/beta-rad", this,
&FGInitialCondition::GetBetaRadIC, &FGInitialCondition::GetBetaRadIC,
&FGInitialCondition::SetBetaRadIC, &FGInitialCondition::SetBetaRadIC);
true);
PropertyManager->Tie("ic/phi-rad", this, PropertyManager->Tie("ic/phi-rad", this,
&FGInitialCondition::GetPhiRadIC, &FGInitialCondition::GetPhiRadIC,
&FGInitialCondition::SetPhiRadIC, &FGInitialCondition::SetPhiRadIC);
true);
PropertyManager->Tie("ic/psi-true-rad", this, PropertyManager->Tie("ic/psi-true-rad", this,
&FGInitialCondition::GetPsiRadIC, &FGInitialCondition::GetPsiRadIC,
&FGInitialCondition::SetPsiRadIC, &FGInitialCondition::SetPsiRadIC);
true);
PropertyManager->Tie("ic/lat-gc-rad", this, PropertyManager->Tie("ic/lat-gc-rad", this,
&FGInitialCondition::GetLatitudeRadIC, &FGInitialCondition::GetLatitudeRadIC,
&FGInitialCondition::SetLatitudeRadIC, &FGInitialCondition::SetLatitudeRadIC);
true);
PropertyManager->Tie("ic/long-gc-rad", this, PropertyManager->Tie("ic/long-gc-rad", this,
&FGInitialCondition::GetLongitudeRadIC, &FGInitialCondition::GetLongitudeRadIC,
&FGInitialCondition::SetLongitudeRadIC, &FGInitialCondition::SetLongitudeRadIC);
true);
PropertyManager->Tie("ic/p-rad_sec", this, PropertyManager->Tie("ic/p-rad_sec", this,
&FGInitialCondition::GetPRadpsIC, &FGInitialCondition::GetPRadpsIC,
&FGInitialCondition::SetPRadpsIC, &FGInitialCondition::SetPRadpsIC);
true);
PropertyManager->Tie("ic/q-rad_sec", this, PropertyManager->Tie("ic/q-rad_sec", this,
&FGInitialCondition::GetQRadpsIC, &FGInitialCondition::GetQRadpsIC,
&FGInitialCondition::SetQRadpsIC, &FGInitialCondition::SetQRadpsIC);
true);
PropertyManager->Tie("ic/r-rad_sec", this, PropertyManager->Tie("ic/r-rad_sec", this,
&FGInitialCondition::GetRRadpsIC, &FGInitialCondition::GetRRadpsIC,
&FGInitialCondition::SetRRadpsIC, &FGInitialCondition::SetRRadpsIC);
true);
PropertyManager->Tie("ic/lat-geod-rad", this, PropertyManager->Tie("ic/lat-geod-rad", this,
&FGInitialCondition::GetGeodLatitudeRadIC, &FGInitialCondition::GetGeodLatitudeRadIC,
&FGInitialCondition::SetGeodLatitudeRadIC, &FGInitialCondition::SetGeodLatitudeRadIC);
true);
PropertyManager->Tie("ic/lat-geod-deg", this, PropertyManager->Tie("ic/lat-geod-deg", this,
&FGInitialCondition::GetGeodLatitudeDegIC, &FGInitialCondition::GetGeodLatitudeDegIC,
&FGInitialCondition::SetGeodLatitudeDegIC, &FGInitialCondition::SetGeodLatitudeDegIC);
true);
PropertyManager->Tie("ic/geod-alt-ft", &position, PropertyManager->Tie("ic/geod-alt-ft", &position,
&FGLocation::GetGeodAltitude); &FGLocation::GetGeodAltitude);
PropertyManager->Tie("ic/targetNlf", this, PropertyManager->Tie("ic/targetNlf", this,
&FGInitialCondition::GetTargetNlfIC, &FGInitialCondition::GetTargetNlfIC,
&FGInitialCondition::SetTargetNlfIC, &FGInitialCondition::SetTargetNlfIC);
true);
} }
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -92,7 +92,7 @@ void FGOutputType::SetIdx(unsigned int idx)
{ {
string outputProp = CreateIndexedPropertyName("simulation/output", idx); string outputProp = CreateIndexedPropertyName("simulation/output", idx);
PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz, false); PropertyManager->Tie(outputProp + "/log_rate_hz", this, &FGOutputType::GetRateHz, &FGOutputType::SetRateHz);
PropertyManager->Tie(outputProp + "/enabled", &enabled); PropertyManager->Tie(outputProp + "/enabled", &enabled);
OutputIdx = idx; OutputIdx = idx;
} }

View file

@ -327,7 +327,7 @@ void FGPropertyManager::Untie (const string &name)
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault) void FGPropertyManager::Tie (const string &name, bool *pointer)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -335,7 +335,7 @@ void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
return; return;
} }
if (!property->tie(SGRawValuePointer<bool>(pointer), useDefault)) if (!property->tie(SGRawValuePointer<bool>(pointer), false))
cerr << "Failed to tie property " << name << " to a pointer" << endl; cerr << "Failed to tie property " << name << " to a pointer" << endl;
else { else {
tied_properties.push_back(property); tied_properties.push_back(property);
@ -345,8 +345,7 @@ void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, int *pointer, void FGPropertyManager::Tie (const string &name, int *pointer)
bool useDefault )
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -354,7 +353,7 @@ void FGPropertyManager::Tie (const string &name, int *pointer,
return; return;
} }
if (!property->tie(SGRawValuePointer<int>(pointer), useDefault)) if (!property->tie(SGRawValuePointer<int>(pointer), false))
cerr << "Failed to tie property " << name << " to a pointer" << endl; cerr << "Failed to tie property " << name << " to a pointer" << endl;
else { else {
tied_properties.push_back(property); tied_properties.push_back(property);
@ -364,8 +363,7 @@ void FGPropertyManager::Tie (const string &name, int *pointer,
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, long *pointer, void FGPropertyManager::Tie (const string &name, long *pointer)
bool useDefault )
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -373,7 +371,7 @@ void FGPropertyManager::Tie (const string &name, long *pointer,
return; return;
} }
if (!property->tie(SGRawValuePointer<long>(pointer), useDefault)) if (!property->tie(SGRawValuePointer<long>(pointer), false))
cerr << "Failed to tie property " << name << " to a pointer" << endl; cerr << "Failed to tie property " << name << " to a pointer" << endl;
else { else {
tied_properties.push_back(property); tied_properties.push_back(property);
@ -383,8 +381,7 @@ void FGPropertyManager::Tie (const string &name, long *pointer,
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, float *pointer, void FGPropertyManager::Tie (const string &name, float *pointer)
bool useDefault )
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -392,7 +389,7 @@ void FGPropertyManager::Tie (const string &name, float *pointer,
return; return;
} }
if (!property->tie(SGRawValuePointer<float>(pointer), useDefault)) if (!property->tie(SGRawValuePointer<float>(pointer), false))
cerr << "Failed to tie property " << name << " to a pointer" << endl; cerr << "Failed to tie property " << name << " to a pointer" << endl;
else { else {
tied_properties.push_back(property); tied_properties.push_back(property);
@ -402,7 +399,7 @@ void FGPropertyManager::Tie (const string &name, float *pointer,
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, double *pointer, bool useDefault) void FGPropertyManager::Tie (const string &name, double *pointer)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -410,7 +407,7 @@ void FGPropertyManager::Tie (const string &name, double *pointer, bool useDefaul
return; return;
} }
if (!property->tie(SGRawValuePointer<double>(pointer), useDefault)) if (!property->tie(SGRawValuePointer<double>(pointer), false))
cerr << "Failed to tie property " << name << " to a pointer" << endl; cerr << "Failed to tie property " << name << " to a pointer" << endl;
else { else {
tied_properties.push_back(property); tied_properties.push_back(property);

View file

@ -439,7 +439,7 @@ class FGPropertyManager
* be modified; defaults to true. * be modified; defaults to true.
*/ */
void void
Tie (const std::string &name, bool *pointer, bool useDefault = true); Tie (const std::string &name, bool *pointer);
/** /**
@ -455,7 +455,7 @@ class FGPropertyManager
* be modified; defaults to true. * be modified; defaults to true.
*/ */
void void
Tie (const std::string &name, int *pointer, bool useDefault = true); Tie (const std::string &name, int *pointer);
/** /**
@ -471,7 +471,7 @@ class FGPropertyManager
* be modified; defaults to true. * be modified; defaults to true.
*/ */
void void
Tie (const std::string &name, long *pointer, bool useDefault = true); Tie (const std::string &name, long *pointer);
/** /**
@ -487,7 +487,7 @@ class FGPropertyManager
* be modified; defaults to true. * be modified; defaults to true.
*/ */
void void
Tie (const std::string &name, float *pointer, bool useDefault = true); Tie (const std::string &name, float *pointer);
/** /**
* Tie a property to an external double variable. * Tie a property to an external double variable.
@ -502,7 +502,7 @@ class FGPropertyManager
* be modified; defaults to true. * be modified; defaults to true.
*/ */
void void
Tie (const std::string &name, double *pointer, bool useDefault = true); Tie (const std::string &name, double *pointer);
//============================================================================ //============================================================================
// //
@ -540,13 +540,10 @@ class FGPropertyManager
* @param name The property name to tie (full path). * @param name The property name to tie (full path).
* @param getter The getter function, or 0 if the value is unreadable. * @param getter The getter function, or 0 if the value is unreadable.
* @param setter The setter function, or 0 if the value is unmodifiable. * @param setter The setter function, or 0 if the value is unmodifiable.
* @param useDefault true if the setter should be invoked with any existing
* property value should be; false if the old value should be
* discarded; defaults to true.
*/ */
template <class V> inline void template <class V> inline void
Tie (const std::string &name, V (*getter)(), void (*setter)(V) = 0, bool useDefault = true) Tie (const std::string &name, V (*getter)(), void (*setter)(V) = nullptr)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -554,7 +551,7 @@ class FGPropertyManager
return; return;
} }
if (!property->tie(SGRawValueFunctions<V>(getter, setter), useDefault)) if (!property->tie(SGRawValueFunctions<V>(getter, setter), false))
std::cerr << "Failed to tie property " << name << " to functions" << std::endl; std::cerr << "Failed to tie property " << name << " to functions" << std::endl;
else { else {
if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false); if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false);
@ -579,12 +576,9 @@ class FGPropertyManager
* setter functions. * setter functions.
* @param getter The getter function, or 0 if the value is unreadable. * @param getter The getter function, or 0 if the value is unreadable.
* @param setter The setter function, or 0 if the value is unmodifiable. * @param setter The setter function, or 0 if the value is unmodifiable.
* @param useDefault true if the setter should be invoked with any existing
* property value should there be one; false if the old value should be
* discarded; defaults to true.
*/ */
template <class V> inline void Tie (const std::string &name, int index, V (*getter)(int), template <class V> inline void Tie (const std::string &name, int index, V (*getter)(int),
void (*setter)(int, V) = 0, bool useDefault = true) void (*setter)(int, V) = nullptr)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -592,7 +586,7 @@ class FGPropertyManager
return; return;
} }
if (!property->tie(SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault)) if (!property->tie(SGRawValueFunctionsIndexed<V>(index, getter, setter), false))
std::cerr << "Failed to tie property " << name << " to indexed functions" << std::endl; std::cerr << "Failed to tie property " << name << " to indexed functions" << std::endl;
else { else {
if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false); if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false);
@ -618,13 +612,10 @@ class FGPropertyManager
* unreadable. * unreadable.
* @param setter The object's setter method, or 0 if the value is * @param setter The object's setter method, or 0 if the value is
* unmodifiable. * unmodifiable.
* @param useDefault true if the setter should be invoked with any existing
* property value should there be one; false if the old value should be
* discarded; defaults to true.
*/ */
template <class T, class V> inline void template <class T, class V> inline void
Tie (const std::string &name, T * obj, V (T::*getter)() const, Tie (const std::string &name, T * obj, V (T::*getter)() const,
void (T::*setter)(V) = 0, bool useDefault = true) void (T::*setter)(V) = nullptr)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -632,7 +623,7 @@ class FGPropertyManager
return; return;
} }
if (!property->tie(SGRawValueMethods<T,V>(*obj, getter, setter), useDefault)) if (!property->tie(SGRawValueMethods<T,V>(*obj, getter, setter), false))
std::cerr << "Failed to tie property " << name << " to object methods" << std::endl; std::cerr << "Failed to tie property " << name << " to object methods" << std::endl;
else { else {
if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false); if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false);
@ -657,13 +648,10 @@ class FGPropertyManager
* setter methods. * setter methods.
* @param getter The getter method, or 0 if the value is unreadable. * @param getter The getter method, or 0 if the value is unreadable.
* @param setter The setter method, or 0 if the value is unmodifiable. * @param setter The setter method, or 0 if the value is unmodifiable.
* @param useDefault true if the setter should be invoked with any existing
* property value should be; false if the old value should be
* discarded; defaults to true.
*/ */
template <class T, class V> inline void template <class T, class V> inline void
Tie (const std::string &name, T * obj, int index, V (T::*getter)(int) const, Tie (const std::string &name, T * obj, int index, V (T::*getter)(int) const,
void (T::*setter)(int, V) = 0, bool useDefault = true) void (T::*setter)(int, V) = nullptr)
{ {
SGPropertyNode* property = root->getNode(name.c_str(), true); SGPropertyNode* property = root->getNode(name.c_str(), true);
if (!property) { if (!property) {
@ -671,7 +659,7 @@ class FGPropertyManager
return; return;
} }
if (!property->tie(SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault)) if (!property->tie(SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), false))
std::cerr << "Failed to tie property " << name << " to indexed object methods" << std::endl; std::cerr << "Failed to tie property " << name << " to indexed object methods" << std::endl;
else { else {
if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false); if (setter == 0) property->setAttribute(SGPropertyNode::WRITE, false);
@ -679,7 +667,7 @@ class FGPropertyManager
tied_properties.push_back(property); tied_properties.push_back(property);
if (FGJSBBase::debug_lvl & 0x20) std::cout << name << std::endl; if (FGJSBBase::debug_lvl & 0x20) std::cout << name << std::endl;
} }
} }
template <class T> simgear::PropertyObject<T> template <class T> simgear::PropertyObject<T>
CreatePropertyObject(const std::string &path) CreatePropertyObject(const std::string &path)

View file

@ -585,8 +585,8 @@ void FGAerodynamics::bind(void)
PropertyManager->Tie("forces/lod-norm", this, &FGAerodynamics::GetLoD); PropertyManager->Tie("forces/lod-norm", this, &FGAerodynamics::GetLoD);
PropertyManager->Tie("aero/cl-squared", this, &FGAerodynamics::GetClSquared); PropertyManager->Tie("aero/cl-squared", this, &FGAerodynamics::GetClSquared);
PropertyManager->Tie("aero/qbar-area", &qbar_area); PropertyManager->Tie("aero/qbar-area", &qbar_area);
PropertyManager->Tie("aero/alpha-max-rad", this, &FGAerodynamics::GetAlphaCLMax, &FGAerodynamics::SetAlphaCLMax, true); PropertyManager->Tie("aero/alpha-max-rad", this, &FGAerodynamics::GetAlphaCLMax, &FGAerodynamics::SetAlphaCLMax);
PropertyManager->Tie("aero/alpha-min-rad", this, &FGAerodynamics::GetAlphaCLMin, &FGAerodynamics::SetAlphaCLMin, true); PropertyManager->Tie("aero/alpha-min-rad", this, &FGAerodynamics::GetAlphaCLMin, &FGAerodynamics::SetAlphaCLMin);
PropertyManager->Tie("aero/bi2vel", this, &FGAerodynamics::GetBI2Vel); PropertyManager->Tie("aero/bi2vel", this, &FGAerodynamics::GetBI2Vel);
PropertyManager->Tie("aero/ci2vel", this, &FGAerodynamics::GetCI2Vel); PropertyManager->Tie("aero/ci2vel", this, &FGAerodynamics::GetCI2Vel);
PropertyManager->Tie("aero/alpha-wing-rad", this, &FGAerodynamics::GetAlphaW); PropertyManager->Tie("aero/alpha-wing-rad", this, &FGAerodynamics::GetAlphaW);

View file

@ -244,17 +244,17 @@ void FGBuoyantForces::bind(void)
typedef double (FGBuoyantForces::*PGF)(int) const; typedef double (FGBuoyantForces::*PGF)(int) const;
typedef void (FGBuoyantForces::*PSF)(int, double); typedef void (FGBuoyantForces::*PSF)(int, double);
PropertyManager->Tie("moments/l-buoyancy-lbsft", this, eL, PropertyManager->Tie("moments/l-buoyancy-lbsft", this, eL,
(PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); (PGF)&FGBuoyantForces::GetMoments, (PSF)nullptr);
PropertyManager->Tie("moments/m-buoyancy-lbsft", this, eM, PropertyManager->Tie("moments/m-buoyancy-lbsft", this, eM,
(PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); (PGF)&FGBuoyantForces::GetMoments, (PSF)nullptr);
PropertyManager->Tie("moments/n-buoyancy-lbsft", this, eN, PropertyManager->Tie("moments/n-buoyancy-lbsft", this, eN,
(PGF)&FGBuoyantForces::GetMoments, (PSF)0, false); (PGF)&FGBuoyantForces::GetMoments, (PSF)nullptr);
PropertyManager->Tie("forces/fbx-buoyancy-lbs", this, eX, PropertyManager->Tie("forces/fbx-buoyancy-lbs", this, eX,
(PGF)&FGBuoyantForces::GetForces, (PSF)0, false); (PGF)&FGBuoyantForces::GetForces, (PSF)nullptr);
PropertyManager->Tie("forces/fby-buoyancy-lbs", this, eY, PropertyManager->Tie("forces/fby-buoyancy-lbs", this, eY,
(PGF)&FGBuoyantForces::GetForces, (PSF)0, false); (PGF)&FGBuoyantForces::GetForces, (PSF)nullptr);
PropertyManager->Tie("forces/fbz-buoyancy-lbs", this, eZ, PropertyManager->Tie("forces/fbz-buoyancy-lbs", this, eZ,
(PGF)&FGBuoyantForces::GetForces, (PSF)0, false); (PGF)&FGBuoyantForces::GetForces, (PSF)nullptr);
} }
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -194,20 +194,20 @@ FGGasCell::FGGasCell(FGFDMExec* exec, Element* el, unsigned int num,
base_property_name = CreateIndexedPropertyName("buoyant_forces/gas-cell", CellNum); base_property_name = CreateIndexedPropertyName("buoyant_forces/gas-cell", CellNum);
property_name = base_property_name + "/max_volume-ft3"; property_name = base_property_name + "/max_volume-ft3";
PropertyManager->Tie( property_name.c_str(), &MaxVolume, false ); PropertyManager->Tie( property_name.c_str(), &MaxVolume);
PropertyManager->GetNode()->SetWritable( property_name, false ); PropertyManager->GetNode()->SetWritable( property_name);
property_name = base_property_name + "/temp-R"; property_name = base_property_name + "/temp-R";
PropertyManager->Tie( property_name.c_str(), &Temperature, false ); PropertyManager->Tie( property_name.c_str(), &Temperature);
property_name = base_property_name + "/pressure-psf"; property_name = base_property_name + "/pressure-psf";
PropertyManager->Tie( property_name.c_str(), &Pressure, false ); PropertyManager->Tie( property_name.c_str(), &Pressure);
property_name = base_property_name + "/volume-ft3"; property_name = base_property_name + "/volume-ft3";
PropertyManager->Tie( property_name.c_str(), &Volume, false ); PropertyManager->Tie( property_name.c_str(), &Volume);
property_name = base_property_name + "/buoyancy-lbs"; property_name = base_property_name + "/buoyancy-lbs";
PropertyManager->Tie( property_name.c_str(), &Buoyancy, false ); PropertyManager->Tie( property_name.c_str(), &Buoyancy);
property_name = base_property_name + "/contents-mol"; property_name = base_property_name + "/contents-mol";
PropertyManager->Tie( property_name.c_str(), &Contents, false ); PropertyManager->Tie( property_name.c_str(), &Contents);
property_name = base_property_name + "/valve_open"; property_name = base_property_name + "/valve_open";
PropertyManager->Tie( property_name.c_str(), &ValveOpen, false ); PropertyManager->Tie( property_name.c_str(), &ValveOpen);
Debug(0); Debug(0);
@ -622,23 +622,23 @@ FGBallonet::FGBallonet(FGFDMExec* exec, Element* el, unsigned int num,
base_property_name = CreateIndexedPropertyName(base_property_name + "/ballonet", CellNum); base_property_name = CreateIndexedPropertyName(base_property_name + "/ballonet", CellNum);
property_name = base_property_name + "/max_volume-ft3"; property_name = base_property_name + "/max_volume-ft3";
PropertyManager->Tie( property_name, &MaxVolume, false ); PropertyManager->Tie( property_name, &MaxVolume);
PropertyManager->GetNode()->SetWritable( property_name, false ); PropertyManager->GetNode()->SetWritable( property_name);
property_name = base_property_name + "/temp-R"; property_name = base_property_name + "/temp-R";
PropertyManager->Tie( property_name, &Temperature, false ); PropertyManager->Tie( property_name, &Temperature);
property_name = base_property_name + "/pressure-psf"; property_name = base_property_name + "/pressure-psf";
PropertyManager->Tie( property_name, &Pressure, false ); PropertyManager->Tie( property_name, &Pressure);
property_name = base_property_name + "/volume-ft3"; property_name = base_property_name + "/volume-ft3";
PropertyManager->Tie( property_name, &Volume, false ); PropertyManager->Tie( property_name, &Volume);
property_name = base_property_name + "/contents-mol"; property_name = base_property_name + "/contents-mol";
PropertyManager->Tie( property_name, &Contents, false ); PropertyManager->Tie( property_name, &Contents);
property_name = base_property_name + "/valve_open"; property_name = base_property_name + "/valve_open";
PropertyManager->Tie( property_name, &ValveOpen, false ); PropertyManager->Tie( property_name, &ValveOpen);
Debug(0); Debug(0);

View file

@ -418,7 +418,7 @@ void FGMassBalance::bind(void)
&FGMassBalance::GetIyz); &FGMassBalance::GetIyz);
typedef int (FGMassBalance::*iOPV)() const; typedef int (FGMassBalance::*iOPV)() const;
PropertyManager->Tie("inertia/print-mass-properties", this, (iOPV)0, PropertyManager->Tie("inertia/print-mass-properties", this, (iOPV)0,
&FGMassBalance::GetMassPropertiesReport, false); &FGMassBalance::GetMassPropertiesReport);
} }
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -60,7 +60,7 @@ FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
Name = "FGOutput"; Name = "FGOutput";
enabled = true; enabled = true;
PropertyManager->Tie("simulation/force-output", this, (iOPV)0, &FGOutput::ForceOutput, false); PropertyManager->Tie("simulation/force-output", this, (iOPV)0, &FGOutput::ForceOutput);
Debug(0); Debug(0);
} }

View file

@ -792,22 +792,22 @@ void FGPropagate::bind(void)
PropertyManager->Tie("velocities/eci-velocity-mag-fps", this, &FGPropagate::GetInertialVelocityMagnitude); PropertyManager->Tie("velocities/eci-velocity-mag-fps", this, &FGPropagate::GetInertialVelocityMagnitude);
PropertyManager->Tie("velocities/ned-velocity-mag-fps", this, &FGPropagate::GetNEDVelocityMagnitude); PropertyManager->Tie("velocities/ned-velocity-mag-fps", this, &FGPropagate::GetNEDVelocityMagnitude);
PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::GetAltitudeASL, &FGPropagate::SetAltitudeASL, false); PropertyManager->Tie("position/h-sl-ft", this, &FGPropagate::GetAltitudeASL, &FGPropagate::SetAltitudeASL);
PropertyManager->Tie("position/h-sl-meters", this, &FGPropagate::GetAltitudeASLmeters, &FGPropagate::SetAltitudeASLmeters, false); PropertyManager->Tie("position/h-sl-meters", this, &FGPropagate::GetAltitudeASLmeters, &FGPropagate::SetAltitudeASLmeters);
PropertyManager->Tie("position/lat-gc-rad", this, &FGPropagate::GetLatitude, &FGPropagate::SetLatitude, false); PropertyManager->Tie("position/lat-gc-rad", this, &FGPropagate::GetLatitude, &FGPropagate::SetLatitude);
PropertyManager->Tie("position/long-gc-rad", this, &FGPropagate::GetLongitude, &FGPropagate::SetLongitude, false); PropertyManager->Tie("position/long-gc-rad", this, &FGPropagate::GetLongitude, &FGPropagate::SetLongitude);
PropertyManager->Tie("position/lat-gc-deg", this, &FGPropagate::GetLatitudeDeg, &FGPropagate::SetLatitudeDeg, false); PropertyManager->Tie("position/lat-gc-deg", this, &FGPropagate::GetLatitudeDeg, &FGPropagate::SetLatitudeDeg);
PropertyManager->Tie("position/long-gc-deg", this, &FGPropagate::GetLongitudeDeg, &FGPropagate::SetLongitudeDeg, false); PropertyManager->Tie("position/long-gc-deg", this, &FGPropagate::GetLongitudeDeg, &FGPropagate::SetLongitudeDeg);
PropertyManager->Tie("position/lat-geod-rad", this, &FGPropagate::GetGeodLatitudeRad); PropertyManager->Tie("position/lat-geod-rad", this, &FGPropagate::GetGeodLatitudeRad);
PropertyManager->Tie("position/lat-geod-deg", this, &FGPropagate::GetGeodLatitudeDeg); PropertyManager->Tie("position/lat-geod-deg", this, &FGPropagate::GetGeodLatitudeDeg);
PropertyManager->Tie("position/geod-alt-ft", this, &FGPropagate::GetGeodeticAltitude); PropertyManager->Tie("position/geod-alt-ft", this, &FGPropagate::GetGeodeticAltitude);
PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL, false); PropertyManager->Tie("position/h-agl-ft", this, &FGPropagate::GetDistanceAGL, &FGPropagate::SetDistanceAGL);
PropertyManager->Tie("position/geod-alt-km", this, &FGPropagate::GetGeodeticAltitudeKm); PropertyManager->Tie("position/geod-alt-km", this, &FGPropagate::GetGeodeticAltitudeKm);
PropertyManager->Tie("position/h-agl-km", this, &FGPropagate::GetDistanceAGLKm, &FGPropagate::SetDistanceAGLKm, false); PropertyManager->Tie("position/h-agl-km", this, &FGPropagate::GetDistanceAGLKm, &FGPropagate::SetDistanceAGLKm);
PropertyManager->Tie("position/radius-to-vehicle-ft", this, &FGPropagate::GetRadius); PropertyManager->Tie("position/radius-to-vehicle-ft", this, &FGPropagate::GetRadius);
PropertyManager->Tie("position/terrain-elevation-asl-ft", this, PropertyManager->Tie("position/terrain-elevation-asl-ft", this,
&FGPropagate::GetTerrainElevation, &FGPropagate::GetTerrainElevation,
&FGPropagate::SetTerrainElevation, false); &FGPropagate::SetTerrainElevation);
PropertyManager->Tie("position/eci-x-ft", this, eX, (PMF)&FGPropagate::GetInertialPosition); PropertyManager->Tie("position/eci-x-ft", this, eX, (PMF)&FGPropagate::GetInertialPosition);
PropertyManager->Tie("position/eci-y-ft", this, eY, (PMF)&FGPropagate::GetInertialPosition); PropertyManager->Tie("position/eci-y-ft", this, eY, (PMF)&FGPropagate::GetInertialPosition);

View file

@ -804,7 +804,7 @@ void FGPropulsion::bind(void)
typedef int (FGPropulsion::*iPMF)(void) const; typedef int (FGPropulsion::*iPMF)(void) const;
IsBound = true; IsBound = true;
PropertyManager->Tie("propulsion/set-running", this, (iPMF)0, &FGPropulsion::InitRunning, false); PropertyManager->Tie("propulsion/set-running", this, (iPMF)0, &FGPropulsion::InitRunning);
if (HaveTurbineEngine || HaveTurboPropEngine) { if (HaveTurbineEngine || HaveTurboPropEngine) {
PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter); PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter);
PropertyManager->Tie("propulsion/cutoff_cmd", this, &FGPropulsion::GetCutoff, &FGPropulsion::SetCutoff); PropertyManager->Tie("propulsion/cutoff_cmd", this, &FGPropulsion::GetCutoff, &FGPropulsion::SetCutoff);
@ -812,11 +812,11 @@ void FGPropulsion::bind(void)
if (HavePistonEngine) { if (HavePistonEngine) {
PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter); PropertyManager->Tie("propulsion/starter_cmd", this, &FGPropulsion::GetStarter, &FGPropulsion::SetStarter);
PropertyManager->Tie("propulsion/magneto_cmd", this, (iPMF)0, &FGPropulsion::SetMagnetos, false); PropertyManager->Tie("propulsion/magneto_cmd", this, (iPMF)0, &FGPropulsion::SetMagnetos);
} }
PropertyManager->Tie("propulsion/active_engine", this, (iPMF)&FGPropulsion::GetActiveEngine, PropertyManager->Tie("propulsion/active_engine", this, (iPMF)&FGPropulsion::GetActiveEngine,
&FGPropulsion::SetActiveEngine, true); &FGPropulsion::SetActiveEngine);
PropertyManager->Tie("forces/fbx-prop-lbs", this, eX, (PMF)&FGPropulsion::GetForces); PropertyManager->Tie("forces/fbx-prop-lbs", this, eX, (PMF)&FGPropulsion::GetForces);
PropertyManager->Tie("forces/fby-prop-lbs", this, eY, (PMF)&FGPropulsion::GetForces); PropertyManager->Tie("forces/fby-prop-lbs", this, eY, (PMF)&FGPropulsion::GetForces);
PropertyManager->Tie("forces/fbz-prop-lbs", this, eZ, (PMF)&FGPropulsion::GetForces); PropertyManager->Tie("forces/fbz-prop-lbs", this, eZ, (PMF)&FGPropulsion::GetForces);