Loading...
Searching...
No Matches
ml::CustomFlaggable< void > Class Reference

No-op specialization used when no custom flags are needed. More...

#include <CustomFlaggable.h>

Public Member Functions

std::enable_if_t<!std::is_void_v< T >, bool > checkFlag (T state) const
 Return the current value of a flag.
std::enable_if_t<!std::is_void_v< T > > disableFlag (T state)
 Set a flag to false.
std::enable_if_t<!std::is_void_v< T > > enableFlag (T state)
 Set a flag to true.
std::enable_if_t<!std::is_void_v< T > > setFlag (T state, bool status)
 Set a flag to an explicit value.
std::enable_if_t<!std::is_void_v< T > > toggleFlag (T state)
 Flip a flag between true and false.

Detailed Description

No-op specialization used when no custom flags are needed.

Instantiated automatically when a manifest omits the Flags enum. Produces no storage overhead and no methods, allowing GatherFlags to safely include it in the inheritance chain without changing the public API.

Definition at line 121 of file CustomFlaggable.h.

Member Function Documentation

◆ checkFlag()

std::enable_if_t<!std::is_void_v< T >, bool > ml::CustomFlaggable< void >::checkFlag ( T state) const

Return the current value of a flag.

Returns false for any flag that has never been explicitly set.

Parameters
stateThe flag to query.
Returns
true if the flag is set; false otherwise.

◆ disableFlag()

std::enable_if_t<!std::is_void_v< T > > ml::CustomFlaggable< void >::disableFlag ( T state)

Set a flag to false.

Parameters
stateThe flag to disable.

◆ enableFlag()

std::enable_if_t<!std::is_void_v< T > > ml::CustomFlaggable< void >::enableFlag ( T state)

Set a flag to true.

Parameters
stateThe flag to enable.

◆ setFlag()

std::enable_if_t<!std::is_void_v< T > > ml::CustomFlaggable< void >::setFlag ( T state,
bool status )

Set a flag to an explicit value.

Parameters
stateThe flag to modify.
statustrue to enable the flag, false to disable it.

◆ toggleFlag()

std::enable_if_t<!std::is_void_v< T > > ml::CustomFlaggable< void >::toggleFlag ( T state)

Flip a flag between true and false.

Parameters
stateThe flag to toggle.

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