A two-state message field (either set/true or cleared/false). More...
#include <command.hpp>
Public Member Functions | |
void | clear () |
Clears this flag (e.g., sets it to false/off). More... | |
FlagField (HebiCommandPtr internal, HebiCommandFlagField field) | |
bool | has () const |
Returns true if the flag is set, false if it is cleared. More... | |
operator bool () const | |
Allows casting to a bool to check if the flag is set without directly calling has() . More... | |
void | set () |
Sets this flag. More... | |
Private Attributes | |
HebiCommandFlagField const | field_ |
HebiCommandPtr const | internal_ |
A two-state message field (either set/true or cleared/false).
Definition at line 252 of file command.hpp.
hebi::Command::FlagField::FlagField | ( | HebiCommandPtr | internal, |
HebiCommandFlagField | field | ||
) |
Definition at line 210 of file command.cpp.
void hebi::Command::FlagField::clear | ( | ) |
Clears this flag (e.g., sets it to false/off).
Definition at line 230 of file command.cpp.
bool hebi::Command::FlagField::has | ( | ) | const |
Returns true
if the flag is set, false if it is cleared.
Definition at line 220 of file command.cpp.
|
explicit |
Allows casting to a bool to check if the flag is set without directly calling has()
.
This can be used as in the following (assuming 'parent' is a parent message, and this field is called 'myField')
Definition at line 215 of file command.cpp.
void hebi::Command::FlagField::set | ( | ) |
Sets this flag.
Definition at line 225 of file command.cpp.
|
private |
Definition at line 280 of file command.hpp.
|
private |
Definition at line 279 of file command.hpp.