FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::Flag Class Reference

A class to handle flags. More...

#include <C_flag.hpp>

Public Member Functions

 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.
 

Detailed Description

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.

Member Function Documentation

◆ 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
inputThe 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
valueThe boolean value to set
Returns
The flag value

◆ set()

void fge::Flag::set ( bool value)
inline

Manually set the flag value.

Parameters
valueThe boolean value to set

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