+ bool operator==(const Variant& v) const {
+ if (_type != v._type) {
+ return false;
+ }
+
+ switch (_type) {
+ case NOTHING: return true;
+ case BEATS: return _beats == v._beats;
+ case BOOL: return _bool == v._bool;
+ case DOUBLE: return _double == v._double;
+ case FLOAT: return _float == v._float;
+ case INT: return _int == v._int;
+ case LONG: return _long == v._long;
+ case PATH:
+ case STRING:
+ case URI: return _string == v._string;
+ }
+
+ return false;
+ }
+
+ bool operator==(const Evoral::Beats& v) const {
+ return _type == BEATS && _beats == v;
+ }
+
+ bool operator!() const { return _type == NOTHING; }
+
+ Variant& operator=(Evoral::Beats v) {
+ _type = BEATS;
+ _beats = v;
+ return *this;
+ }
+
+ const Evoral::Beats& get_beats() const {
+ ensure_type(BEATS); return _beats;
+ }
+