add additional methods allowing direct arithmetic operator expressions to be used with PBD::Property
This commit is contained in:
parent
5285151d08
commit
788cd5456e
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user