32 #include "FGPropertyValue.h" 33 #include "input_output/FGPropertyManager.h" 37 IDENT(IdSrc,
"$Id: FGPropertyValue.cpp,v 1.11 2014/01/13 10:46:03 ehofman Exp $");
38 IDENT(IdHdr,ID_PROPERTYVALUE);
44 FGPropertyValue::FGPropertyValue(FGPropertyNode* propNode)
45 : PropertyManager(0L), PropertyNode(propNode)
52 FGPropertyValue::FGPropertyValue(std::string propName, FGPropertyManager* propertyManager)
53 : PropertyManager(propertyManager), PropertyNode(0L)
56 if (propName[0] ==
'-') {
60 PropertyName = propName;
65 double FGPropertyValue::GetValue(
void)
const 67 FGPropertyNode* node = PropertyNode;
71 node = PropertyManager->GetNode(PropertyName);
74 throw(std::string(
"FGPropertyValue::GetValue() The property " +
75 PropertyName +
" does not exist."));
79 return node->getDoubleValue()*Sign;
84 std::string FGPropertyValue::GetName(
void)
const 87 return PropertyNode->GetName();