FD.io VPP
v18.01.2-1-g9b554f3
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... | |
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 73 of file enum_base.hpp.
|
inlineprotectedvirtual |
Constructor.
Definition at line 82 of file enum_base.hpp.
|
inline |
integer conversion operator
Definition at line 62 of file enum_base.hpp.
|
inline |
Comparison operator.
Definition at line 57 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 |
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 67 of file enum_base.hpp.