+
+ // Got the index, so grab the node.
+ SGPropertyNode * node = st.node->getChild(name, index, true);
+
+ // Get the access-mode attributes,
+ // but don't set yet (in case they
+ // prevent us from recording the value).
+ int mode = 0;
+
+ attval = atts.getValue("read");
+ if (checkFlag(attval, true))
+ mode |= SGPropertyNode::READ;
+ attval = atts.getValue("write");
+ if (checkFlag(attval, true))
+ mode |= SGPropertyNode::WRITE;
+ attval = atts.getValue("archive");
+ if (checkFlag(attval, false))
+ mode |= SGPropertyNode::ARCHIVE;
+
+ // Check for an alias.
+ attval = atts.getValue("alias");
+ if (attval != 0) {
+ if (!node->alias(attval))
+ SG_LOG(SG_INPUT, SG_ALERT, "Failed to set alias to " << attval);
+ }
+
+ // Check for an include.
+ attval = atts.getValue("include");
+ if (attval != 0) {
+ SGPath path(SGPath(_base).dir());
+ cerr << "Base is " << _base << endl;
+ cerr << "Dir is " << SGPath(_base).dir() << endl;
+ path.append(attval);
+ if (!readProperties(path.str(), node)) {
+ SG_LOG(SG_INPUT, SG_ALERT, "Failed to read include file "
+ << attval);
+ _ok = false;
+ }
+ }
+
+ push_state(node, atts.getValue("type"), mode);