A message field representable by an enum of a given type. More...
#include <info.hpp>
Public Member Functions | |
EnumField (HebiInfoPtr internal, HebiInfoEnumField field) | |
T | get () const |
If the field has a value, returns that value; otherwise, returns a default. More... | |
bool | has () const |
True if (and only if) the field has a value. More... | |
operator bool () const | |
Allows casting to a bool to check if the field has a value without directly calling has() . More... | |
Private Attributes | |
HebiInfoEnumField const | field_ |
HebiInfoPtr const | internal_ |
A message field representable by an enum of a given type.
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
Allows casting to a bool to check if the field has a value without directly calling has()
.
This can be used as in the following (assuming 'parent' is a parent message, and this field is called 'myField')
|
private |
|
private |