commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
Loading...
Searching...
No Matches
comms::FlagBuilderGetters< Derived, Categories > Class Template Reference

A builder that is also observable: combines FlagBuilderMixin's fluent mutators with a public, IHasFlags-backed read API. More...

#include <flag.hpp>

Inheritance diagram for comms::FlagBuilderGetters< Derived, Categories >:
Collaboration diagram for comms::FlagBuilderGetters< Derived, Categories >:

Public Member Functions

const FlagSetflags () 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 FlagSetflags () const noexcept
 Read access kept protected and used internally; FlagBuilderGetters publishes it through IHasFlags.
 

Detailed Description

template<typename Derived, typename... Categories>
class comms::FlagBuilderGetters< Derived, Categories >

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.


The documentation for this class was generated from the following file: