virtual XMLNode& get_state (void) = 0;
virtual int set_state (const XMLNode&, int version) = 0;
- /* derived types do not have to implement this, but probably should
- give it serious attention.
- */
- virtual bool set_property (const PropertyBase&) { return false; }
- PropertyChange set_properties (const PropertyList&);
+ virtual bool apply_changes (PropertyBase const &);
+ PropertyChange apply_changes (PropertyList const &);
+
const OwnedPropertyList& properties() const { return *_properties; }
void add_property (PropertyBase& s);
/* history management */
- void clear_history ();
- void diff (PropertyList&, PropertyList&) const;
+ void clear_changes ();
+ virtual void clear_owned_changes ();
+ PropertyList* get_changes_as_properties (Command *) const;
+ virtual void rdiff (std::vector<StatefulDiffCommand*> &) const;
bool changed() const;
/* create a property list from an XMLNode
*/
- virtual PropertyList* property_factory(const XMLNode&) const { return 0; }
+ virtual PropertyList* property_factory (const XMLNode&) const;
/* How stateful's notify of changes to their properties
*/
void add_instant_xml (XMLNode&, const sys::path& directory_path);
XMLNode *instant_xml (const std::string& str, const sys::path& directory_path);
void add_properties (XMLNode &);
- /* derived types can call this from ::set_state() (or elsewhere)
- to get basic property setting done.
- */
- PropertyChange set_properties (XMLNode const &);
+
+ PropertyChange set_values (XMLNode const &);
/* derived classes can implement this to do cross-checking
of property values after either a PropertyList or XML