add additional methods allowing direct arithmetic operator expressions to be used with PBD::Property

This commit is contained in:
Paul Davis 2020-08-09 14:11:38 -06:00
parent 5285151d08
commit 788cd5456e

View File

@ -83,6 +83,18 @@ public:
return _current;
}
T operator- (T const other) const {
return _current - other;
}
bool operator< (T const &other) const {
return _current < other;
}
bool operator> (T const &other) const {
return _current > other;
}
bool operator==(const T& other) const {
return _current == other;
}
@ -99,6 +111,11 @@ public:
return _current;
}
/* allows calling non-const methods on _current */
T & call () {
return _current;
}
/* MANAGEMENT OF Stateful State */