+XMLNode *
+GUIObjectState::get_or_add_node (XMLNode* parent, const string& id)
+{
+ XMLNode* child = get_node (parent, id);
+ if (!child) {
+ child = new XMLNode (X_("Object"));
+ child->add_property (X_("id"), id);
+ parent->add_child_nocopy (*child);
+ }
+
+ return child;
+}
+
+XMLNode *
+GUIObjectState::get_or_add_node (const string& id)
+{
+ return get_or_add_node (&_state, id);
+}
+