lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Defines | |
#define | DECLARE_OPAQUE_TYPE(NAME, OPAQUE_TYPE) |
Declares an opaque type of the given name, setting its internal opaque value type to the given opaque type. | |
#define | DEFINE_OPAQUE_TYPE(NAME, ACTUAL_TYPE) |
Defines the previously declared opaque type of the given name, setting its actual value type to the given actual type and thus changing its state from opaque to transparent. |
#define DECLARE_OPAQUE_TYPE | ( | NAME, | |
OPAQUE_TYPE | |||
) |
struct NAME##_opaque_type_wrapper \
{ \
typedef OPAQUE_TYPE type; \
}; \
\
struct NAME##_actual_type_wrapper; \
\
typedef ::lean::opaque_val< \
NAME##_actual_type_wrapper, \
NAME##_opaque_type_wrapper> NAME;
Declares an opaque type of the given name, setting its internal opaque value type to the given opaque type.
#define DEFINE_OPAQUE_TYPE | ( | NAME, | |
ACTUAL_TYPE | |||
) |
struct NAME##_actual_type_wrapper : public NAME##_opaque_type_wrapper \ { \ typedef ACTUAL_TYPE type; \ };
Defines the previously declared opaque type of the given name, setting its actual value type to the given actual type and thus changing its state from opaque to transparent.