mal-packet-weaver
C++20 packet serialization/deserialization library.
Loading...
Searching...
No Matches
mal_toolkit::enableable Class Reference

A class that can be enabled or disabled. More...

#include "common-structures.hpp"

Collaboration diagram for mal_toolkit::enableable:
[legend]

Public Member Functions

 enableable ()=default
 
 ~enableable ()=default
 
constexpr void enable ()
 
constexpr void disable ()
 
constexpr bool is_enabled () const
 
constexpr bool is_disabled () const
 
constexpr bool enabled () const
 

Private Attributes

bool enabled_ = true
 

Detailed Description

A class that can be enabled or disabled.

Note
This class is constexpr compatible

Definition at line 87 of file common-structures.hpp.

Constructor & Destructor Documentation

◆ enableable()

mal_toolkit::enableable::enableable ( )
default

◆ ~enableable()

mal_toolkit::enableable::~enableable ( )
default

Member Function Documentation

◆ disable()

void mal_toolkit::enableable::disable ( )
inlineconstexpr

Definition at line 94 of file common-structures.hpp.

◆ enable()

void mal_toolkit::enableable::enable ( )
inlineconstexpr

Definition at line 93 of file common-structures.hpp.

◆ enabled()

bool mal_toolkit::enableable::enabled ( ) const
inlineconstexpr

Definition at line 98 of file common-structures.hpp.

◆ is_disabled()

bool mal_toolkit::enableable::is_disabled ( ) const
inlineconstexpr

Definition at line 96 of file common-structures.hpp.

◆ is_enabled()

bool mal_toolkit::enableable::is_enabled ( ) const
inlineconstexpr

Definition at line 95 of file common-structures.hpp.

Member Data Documentation

◆ enabled_

bool mal_toolkit::enableable::enabled_ = true
private

Definition at line 101 of file common-structures.hpp.


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