FD.io VPP
v21.01.1
Vector Packet Processing
|
A template base class for all enum types. More...
Public Member Functions | |
const std::string & | to_string () const |
convert to string format for debug purposes More... | |
bool | operator== (const enum_base &e) const |
Comparison operator. More... | |
enum_base & | operator= (const enum_base &e) |
Assignment. More... | |
enum_base & | operator|= (const enum_base &e) |
bitwise or assignemnt More... | |
enum_base | operator| (const enum_base &e1) const |
bitwise or More... | |
bool | operator!= (const enum_base &e) const |
Comparison operator. More... | |
operator int () const | |
integer conversion operator More... | |
int | value () const |
Return the value of the enum - same as integer conversion. More... | |
Protected Member Functions | |
enum_base (int value, const std::string desc) | |
Constructor of an enum - takes value and string description. More... | |
virtual | ~enum_base () |
Constructor. More... | |
A template base class for all enum types.
This enum type exists to associate an enum value with a string for display/debug purposes. Concrete enum types use the CRTP. Derived classes thus inherit this base's function, but are not polymorphic.
Definition at line 30 of file enum_base.hpp.
|
inlineprotected |
Constructor of an enum - takes value and string description.
Definition at line 94 of file enum_base.hpp.
|
inlineprotectedvirtual |
Constructor.
Definition at line 103 of file enum_base.hpp.
|
inline |
integer conversion operator
Definition at line 83 of file enum_base.hpp.
|
inline |
Comparison operator.
Definition at line 78 of file enum_base.hpp.
|
inline |
Assignment.
Definition at line 46 of file enum_base.hpp.
|
inline |
Comparison operator.
Definition at line 41 of file enum_base.hpp.
|
inline |
bitwise or
Definition at line 68 of file enum_base.hpp.
|
inline |
bitwise or assignemnt
Definition at line 57 of file enum_base.hpp.
|
inline |
convert to string format for debug purposes
Definition at line 36 of file enum_base.hpp.
|
inline |
Return the value of the enum - same as integer conversion.
Definition at line 88 of file enum_base.hpp.