Aggregates flag stores for multiple enum types into one class. More...
#include <MultiCustomFlaggable.h>
Public Member Functions | |
| bool | checkFlag (Enums flag) const |
Return true if flag is set, false if unset or never written. | |
| void | disableFlag (Enums flag) |
Set flag to false. | |
| void | enableFlag (Enums flag) |
Set flag to true. | |
| void | setFlag (Enums flag, bool value) |
Set flag to an explicit value. | |
| void | toggleFlag (Enums flag) |
Flip flag between true and false. | |
Aggregates flag stores for multiple enum types into one class.
MultiCustomFlaggable<Enums...> inherits one SingleFlaggable per enum in the pack and lifts all their methods into a single overload set via using declarations. This allows a component to call a single checkFlag overloaded on enum type rather than casting to the right base.
It is instantiated by GatherFlags, which collects all Flag enums from a component's manifest and from every trait mixed in via ComponentWith. The result is a single base class that holds all custom flag storage for the component.
| Enums | Zero or more enum class types, one per flag set. The empty specialization (MultiCustomFlaggable<>) is used when no custom flags are declared. |
Definition at line 94 of file MultiCustomFlaggable.h.
|
inlineinherited |
Return true if flag is set, false if unset or never written.
Definition at line 44 of file MultiCustomFlaggable.h.
|
inlineinherited |
Set flag to false.
Definition at line 41 of file MultiCustomFlaggable.h.
|
inlineinherited |
Set flag to true.
Definition at line 38 of file MultiCustomFlaggable.h.
|
inlineinherited |
Set flag to an explicit value.
Definition at line 47 of file MultiCustomFlaggable.h.
|
inlineinherited |
Flip flag between true and false.
Definition at line 50 of file MultiCustomFlaggable.h.