-SGPropertyList::untie (const string &name)
-{
- FG_LOG(FG_GENERAL, FG_DEBUG, "Untying property '" << name << '\'');
- return getValue(name, true)->untie();
-}
-
-
-\f
-////////////////////////////////////////////////////////////////////////
-// Implementation of SGPropertyNode.
-////////////////////////////////////////////////////////////////////////
-
-
-/**
- * Extract the base name of the next level down from the parent.
- *
- * The parent must have a '/' appended. Note that basename may
- * be modified even if the test fails.
- */
-static bool
-get_base (const string &parent, const string &child,
- string &basename)
-{
- // First, check that the parent name
- // is a prefix of the child name, and
- // extract the remainder
- if (child.find(parent) != 0)
- return false;
-
- basename = child.substr(parent.size());
-
- string::size_type pos = basename.find('/');
- if (pos != string::npos) {
- basename.resize(pos);
- }
-
- if (basename.size() == 0)
- return false;
- else
- return true;
-}
-
-
-/**
- * Constructor.
- */
-SGPropertyNode::SGPropertyNode (const string &path,
- SGPropertyList * props)
- : _props(props), _node(0)
-{
- setPath(path);
-}
-
-
-/**
- * Destructor.
- */
-SGPropertyNode::~SGPropertyNode ()
-{
- delete _node;
- _node = 0;
-}
-
-
-/**
- * Set the path.
- *
- * Strip the trailing '/', if any.
- */
-void
-SGPropertyNode::setPath (const string &path)
-{
- _path = path;
-
- // Chop the final '/', if present.
- if (_path.size() > 0 && _path[_path.size()-1] == '/')
- _path.resize(_path.size()-1);
-}
-
-
-/**
- * Return the local name of the property.
- *
- * The local name is just everything after the last slash.
- */
-const string &
-SGPropertyNode::getName () const
-{
- string::size_type pos = _path.rfind('/');
- if (pos != string::npos) {
- _name = _path.substr(pos+1);
- return _name;
- } else {
- return empty_string;
- }
-}
-
-
-/**
- * Return the number of children for the current node.
- */
-int
-SGPropertyNode::size () const