#include <BDSTypeSafeEnum.hh>
Collaboration diagram for BDSTypeSafeEnum< def, inner >:
Public Member Functions | |
BDSTypeSafeEnum () | |
BDSTypeSafeEnum (type v) | |
type | underlying () const |
return underlying value (can be used in switch statement) | |
Private Types | |
typedef inner | type |
Private Attributes | |
inner | val |
Friends | |
bool | operator== (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
bool | operator!= (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
bool | operator< (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
bool | operator<= (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
bool | operator> (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
bool | operator>= (const BDSTypeSafeEnum &lhs, const BDSTypeSafeEnum &rhs) |
operators for ordering | |
std::ostream & | operator<< (std::ostream &out, const BDSTypeSafeEnum &a) |
operators for ordering |
Example: struct color_def { enum type { red, green, blue }; }; typedef BDSTypeSafeEnum<color_def,int> color; color c = color::red;
Definition at line 24 of file BDSTypeSafeEnum.hh.