|
commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
|
A builder that is also observable: combines FlagBuilderMixin's fluent mutators with a public, IHasFlags-backed read API.
More...
#include <flag.hpp>


Public Member Functions | |
| const FlagSet & | flags () const noexcept override |
| The owned flag set (insertion order preserved). | |
Public Member Functions inherited from comms::FlagBuilderMixin< Derived, Categories... > | |
| Derived & | insert_flag () |
Insert flag F (no-op if already present). | |
| Derived & | flag () |
Alias for insert_flag that reads naturally in a fluent chain (builder.flag<F>()). | |
| Derived & | set_flag (const bool on) |
Set flag F's presence: insert when on, erase otherwise. | |
| Derived & | set_flags (FlagSet flags) |
| Replace the whole set. | |
Additional Inherited Members | |
Static Public Attributes inherited from comms::FlagBuilderMixin< Derived, Categories... > | |
| static constexpr bool | flag_allowed |
True when a flag in F's category is permitted by this builder's constraint. | |
Protected Member Functions inherited from comms::FlagBuilderMixin< Derived, Categories... > | |
| const FlagSet & | flags () const noexcept |
Read access kept protected and used internally; FlagBuilderGetters publishes it through IHasFlags. | |
A builder that is also observable: combines FlagBuilderMixin's fluent mutators with a public, IHasFlags-backed read API.
Use this when a builder should be readable through IHasFlags; use the bare FlagBuilderMixin when it should keep its flags to itself.