- 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)
This commit is contained in:
curt 2001-06-12 02:49:32 +00:00
parent b4efe8f374
commit b1a719dd4c

View File

@ -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;