summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/properties.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-25 17:31:33 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-25 17:31:33 +0000
commit7b2975244165b4ffd1dcf4080c1be4c8dcbc6708 (patch)
treeb3010f51f7c3fa0534c0813e51bbeef13200f6a0 /libs/pbd/pbd/properties.h
parent167c439002bde2b20399d733cd5d38d3674668c3 (diff)
Rename various things in the property system.
git-svn-id: svn://localhost/ardour2/branches/3.0@7681 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/properties.h')
-rw-r--r--libs/pbd/pbd/properties.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h
index 1e17ddafb0..13790973e2 100644
--- a/libs/pbd/pbd/properties.h
+++ b/libs/pbd/pbd/properties.h
@@ -85,20 +85,16 @@ public:
_have_old = false;
}
- void add_history_state (XMLNode* history_node) const {
+ void get_change (XMLNode* history_node) const {
/* We can get to the current state of a scalar property like this one simply
by knowing what the new state is.
*/
history_node->add_property (property_name(), to_string (_current));
}
- /** Try to set state from the property of an XML node.
- * @param node XML node.
- * @return true if the value of the property is changed
- */
- bool set_state_from_owner_state (XMLNode const& owner_state) {
+ bool set_value (XMLNode const & node) {
- XMLProperty const* p = owner_state.property (property_name());
+ XMLProperty const* p = node.property (property_name());
if (p) {
T const v = from_string (p->value ());
@@ -112,12 +108,13 @@ public:
return false;
}
- void add_state_to_owner_state (XMLNode& owner_state) const {
- owner_state.add_property (property_name(), to_string (_current));
+ void get_value (XMLNode & node) const {
+ node.add_property (property_name(), to_string (_current));
}
bool changed () const { return _have_old; }
- void set_state_from_property (PropertyBase const * p) {
+
+ void apply_change (PropertyBase const * p) {
T v = dynamic_cast<const PropertyTemplate<T>* > (p)->val ();
if (v != _current) {
set (v);