summaryrefslogtreecommitdiff
path: root/libs/pbd/stateful.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/stateful.cc')
-rw-r--r--libs/pbd/stateful.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc
index 47d1e66ef4..b2c76f452f 100644
--- a/libs/pbd/stateful.cc
+++ b/libs/pbd/stateful.cc
@@ -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