A class to handle flags.
More...
#include <C_flag.hpp>
|
| Flag (bool defaultValue=false) |
|
bool | check (bool input) |
| Check the input and return the flag value.
|
|
void | set (bool value) |
| Manually set the flag value.
|
|
bool | get () const |
| Get the flag value.
|
|
bool | operator= (bool value) |
| Manually set the flag value operator.
|
|
| operator bool () const |
| Get the flag value operator.
|
|
A class to handle flags.
A flag will be set to true only once, and wait for the input to be false before being set again.
◆ check()
bool fge::Flag::check |
( |
bool | input | ) |
|
|
inline |
Check the input and return the flag value.
This function will only return true once, and wait for the input to be false before being set again.
- Parameters
-
input | The boolean input to check |
- Returns
- The flag value
◆ get()
bool fge::Flag::get |
( |
| ) |
const |
|
inlinenodiscard |
Get the flag value.
- Returns
- The flag value
◆ operator bool()
fge::Flag::operator bool |
( |
| ) |
const |
|
inline |
Get the flag value operator.
- Returns
- The flag value
◆ operator=()
bool fge::Flag::operator= |
( |
bool | value | ) |
|
|
inline |
Manually set the flag value operator.
- Parameters
-
value | The boolean value to set |
- Returns
- The flag value
◆ set()
void fge::Flag::set |
( |
bool | value | ) |
|
|
inline |
Manually set the flag value.
- Parameters
-
value | The boolean value to set |
The documentation for this class was generated from the following file: