mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Add convenience ControlFlags operators
Explicit functions for operator&=~ and operator|=
This commit is contained in:
parent
45f5513b66
commit
2b17ded785
2 changed files with 15 additions and 0 deletions
|
|
@ -100,6 +100,18 @@ Controllable::set_flags (Flag f)
|
|||
_flags = f;
|
||||
}
|
||||
|
||||
void
|
||||
Controllable::set_flag (Flag f)
|
||||
{
|
||||
_flags = Flag ((int)_flags | f);
|
||||
}
|
||||
|
||||
void
|
||||
Controllable::clear_flag (Flag f)
|
||||
{
|
||||
_flags = Flag ((int)_flags & ~f);
|
||||
}
|
||||
|
||||
void
|
||||
Controllable::add (Controllable& ctl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -163,6 +163,9 @@ public:
|
|||
Flag flags() const { return _flags; }
|
||||
void set_flags (Flag f);
|
||||
|
||||
void set_flag (Flag f); ///< _flags |= f;
|
||||
void clear_flag (Flag f); ///< _flags &= ~f;
|
||||
|
||||
static boost::shared_ptr<Controllable> by_id (const PBD::ID&);
|
||||
static void dump_registry ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue