+ return *_node;
+}
+
+
+/**
+ * Return a node for an arbitrary subpath.
+ *
+ * Never returns 0.
+ */
+SGPropertyNode &
+SGPropertyNode::getSubNode (const string &subpath) const
+{
+ if (_node == 0)
+ _node = new SGPropertyNode();
+
+ _node->setPropertyList(_props);
+ _node->setPath(_path + string("/") + subpath);
+ return *_node;
+}
+
+
+/**
+ * Test whether the specified subpath has a value.
+ */
+bool
+SGPropertyNode::hasValue (const string &subpath) const
+{
+ if (_props == 0)
+ return false;
+
+ if (subpath.size() == 0)
+ return _props->hasValue(_path);
+ else
+ return _props->hasValue(_path + string("/") + subpath);
+}
+
+
+/**
+ * Return the value of the current node.
+ *
+ * Currently, this does a lookup each time, but we could cache the
+ * value safely as long as it's non-zero.
+ *
+ * Note that this will not create the value if it doesn't already exist.
+ */
+SGValue *
+SGPropertyNode::getValue (const string &subpath)
+{
+ if (_props == 0)
+ return 0;
+
+ if (subpath.size() == 0)
+ return _props->getValue(_path);
+ else
+ return _props->getValue(_path + string("/") + subpath);
+}
+
+
+/**
+ * Return a bool value.
+ */
+bool
+SGPropertyNode::getBoolValue (const string &subpath, bool defaultValue) const
+{
+ if (_props == 0)
+ return defaultValue;
+
+ if (subpath == "")
+ return _props->getBoolValue(_path, defaultValue);
+ else
+ return _props->getBoolValue(_path + string("/") + subpath,
+ defaultValue);