13
0

Add convenience ControlFlags operators

Explicit functions for operator&=~ and operator|=
This commit is contained in:
Robin Gareus 2020-03-10 20:17:40 +01:00
parent 45f5513b66
commit 2b17ded785
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 15 additions and 0 deletions

View File

@ -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)
{

View File

@ -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 ();