- const char * att_alias = atts.getValue("alias");
- if (att_alias != 0) {
- if (!node->alias(att_alias))
- FG_LOG(FG_INPUT, FG_ALERT, "Failed to set alias to " << att_alias);
+
+ // 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);