make Stateful::_id private and provide appropriate methods to set it, and use them...
[ardour.git] / libs / pbd / stateful.cc
index 47d1e66ef4fcf29f53da5599a73c431c688967ad..b2c76f452f4e6d03cd7b6ca012e9412396d6bf1f 100644 (file)
@@ -369,5 +369,29 @@ Stateful::clear_owned_changes ()
        }
 }
   
+bool
+Stateful::set_id (const XMLNode& node) 
+{
+       const XMLProperty* prop;
+
+       if ((prop = node.property ("id")) != 0) {
+               _id = prop->value ();
+               return true;
+       } 
+
+       return false;
+}
+
+void
+Stateful::reset_id ()
+{
+       _id = ID ();
+}
+
+void
+Stateful::set_id (const string& str)
+{
+       _id = str;
+}
 
 } // namespace PBD