RefleX
Build DDS Applications in Modern C++ without IDL
|
RefleX macros in adapt_macros.h expand static information of user-defined types to this namespace. More...
Classes | |
struct | EnumDef |
struct | MemberInfo |
struct | MemberTraits |
struct | MemberTraits< std::pair< First, Second >, 0 > |
struct | MemberTraits< std::pair< First, Second >, 1 > |
struct | StructName |
struct | StructName< std::pair< First, Second > > |
struct | StructName< match::Sparse< Args...> > |
struct | StructName< match::Union< TagType, Cases...> > |
struct | StructName< std::tuple< Args...> > |
Functions | |
template<class T > | |
void | enum_cast (T &dst, DDS_Long src) |
Casts integers to user-defined enumeration types. More... | |
RefleX macros in adapt_macros.h expand static information of user-defined types to this namespace.
void reflex::codegen::enum_cast | ( | T & | dst, |
DDS_Long | src | ||
) |
Casts integers to user-defined enumeration types.
C++ does not directly allow casting from integers to user-defined enumerations. A static_cast must be used. The default implementation of this function uses a static_cast. It may not be sufficient in some cases.
In cases where the generated enumeration is more than the native C++ enumeration (such as a class), the enum_cast function must overloaded explicitly to support conversion from integers to the specialized implementation of enumeration types. This function must be overloaded in the namespace that declares the enumeration.
For a complete example please see $REFLEXHOME/test/osacbm/driver.cxx