25 : PropertyManager(propertyManager), PropertyNode(nullptr),
26 PropertyName(propName), Sign(1.0)
28 if (PropertyName[0] ==
'-') {
29 PropertyName.erase(0,1);
33 if (PropertyManager->HasNode(PropertyName))
34 PropertyNode = PropertyManager->GetNode(PropertyName);
45 throw(std::string(
"FGPropertyValue::GetValue() The property " +
46 PropertyName +
" does not exist."));
58 return GetNode()->getDoubleValue()*Sign;
68 GetNode()->setDoubleValue(value);
87 if (Sign < 0.0)
name =
"-";
99 return PropertyNode->GetFullyQualifiedName();
109 return PropertyNode->GetPrintableName();
Class wrapper for property handling.
FGPropertyNode * GetNode(const std::string &path, bool create=false)
Get a property node.
const std::string & GetName(void) const
Get the name of a node.
virtual std::string GetFullyQualifiedName(void) const
double GetValue(void) const override
virtual std::string GetPrintableName(void) const
std::string GetName(void) const override
virtual std::string GetNameWithSign(void) const
FGPropertyNode * GetNode(void) const
void SetValue(double value)
FGPropertyValue(FGPropertyNode *propNode)