From b1a719dd4c617767af64714c9cad69f0f301fdb2 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 12 Jun 2001 02:49:32 +0000 Subject: [PATCH] - added SGPropertyNode::Type - changed return type of SGPropertyNode::getType methods from SGValue::Type to SGPropertyNode::Type - made SGPropertyNode::getValue and SGPropertyNode::hasValue private so that applications cannot get at SGValue instances (SGValue is slated for removal) --- simgear/misc/props.hxx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/simgear/misc/props.hxx b/simgear/misc/props.hxx index b95c5296..9254e910 100644 --- a/simgear/misc/props.hxx +++ b/simgear/misc/props.hxx @@ -565,6 +565,22 @@ class SGPropertyNode public: + /** + * Property value types. + * + * Right now, this duplicates SGValue::Type, but SGValue will be + * disappearing soon. + */ + enum Type { + BOOL, + INT, + LONG, + FLOAT, + DOUBLE, + STRING, + UNKNOWN + }; + SGPropertyNode (); virtual ~SGPropertyNode (); @@ -607,7 +623,7 @@ public: const SGPropertyNode * getNode (const string &relative_path) const; // Value-related stuff. - SGValue::Type getType () const; + Type getType () const; bool getBoolValue () const; int getIntValue () const; @@ -636,11 +652,7 @@ public: bool untie (); // Values from paths. - bool hasValue (const string &relative_path) const; - SGValue * getValue (const string &relative_path, bool create = false); - const SGValue * getValue (const string &relative_path) const; - - SGValue::Type getType (const string &relative_path) const; + Type getType (const string &relative_path) const; bool getBoolValue (const string &relative_path, bool defaultValue = false) const; @@ -686,6 +698,10 @@ protected: private: + bool hasValue (const string &relative_path) const; + SGValue * getValue (const string &relative_path, bool create = false); + const SGValue * getValue (const string &relative_path) const; + SGPropertyNode (const SGPropertyNode &node) {} SGValue * _value; -- 2.39.5