OSVR-Core
|
A class that lightly wraps a bool, in order to provide easier maintenance of a "dirty" flag, for example, with sensible default initialization and no short-circuiting. More...
#include <Flag.h>
Public Member Functions | |
Flag () | |
Initialize the flag as false. | |
operator bool () const | |
Be able to test the flag in an if statement. | |
bool | get () const |
Get the value of the flag as a bool. | |
void | set () |
Set the flag to true. | |
Flag & | operator+= (bool newVal) |
Update the flag with (typically) a function call result: state is true if state was true or newVal is true. | |
Flag & | operator+= (Flag const &rhs) |
Update the flag with another flag. | |
void | reset () |
Reset the flag back to false. | |
A class that lightly wraps a bool, in order to provide easier maintenance of a "dirty" flag, for example, with sensible default initialization and no short-circuiting.