- /** Load serialized change history.
- * @return true if loading succeeded, false otherwise
- */
-
- bool set_changes (XMLNode const & history_node) {
-
- const XMLNodeList& children (history_node.children());
-
- for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
- const XMLProperty* prop = (*i)->property ("id");
- if (prop) {
- PBD::ID id (prop->value());
- typename Container::value_type v = lookup_id (id);
- if (!v) {
- std::cerr << "No such item, ID = " << id.to_s() << " (from " << prop->value() << ")\n";
- return false;
- }
- if ((*i)->name() == "Add") {
- _changes.added.insert (v);
- } else if ((*i)->name() == "Remove") {
- _changes.removed.insert (v);
- }
- }
- }
-
- return true;
- }
+ /* copy construction only by subclasses */
+ SequenceProperty (SequenceProperty<Container> const & p)
+ : PropertyBase (p)
+ , _val (p._val)
+ , _changes (p._changes)
+ , _update_callback (p._update_callback)
+ {}
+
+ Container _val; ///< our actual container of things
+ ChangeRecord _changes; ///< changes to the container (adds/removes) that have happened since clear_changes() was last called
+ boost::function<void(const ChangeRecord&)> _update_callback;