#include <string>
Go to the source code of this file.
#define BOOSTX_DECL_TYPE_ID_DEFAULT |
( |
|
TYPEID | ) |
BOOSTX_TYPE_ID(std::string,TYPEID,type_id,get_type_id) |
#define BOOSTX_DECL_TYPE_INFO |
( |
|
NAME, |
|
|
|
TYPEID, |
|
|
|
STATIC_MEMBER, |
|
|
|
VIRTUAL_MEMBER |
|
) |
| |
Value:template<typename T>\
struct NAME\
{\
typedef TYPEID typeid_type;\
typeid_type operator()() const\
{\
return T::STATIC_MEMBER();\
}\
template<typename PTR>\
typeid_type operator()(PTR&& _ptr) const\
{\
return _ptr->VIRTUAL_MEMBER();\
}\
};
Convenience macro for declaring a type info struct.
#define BOOSTX_TYPE_ID |
( |
|
TYPEID_TYPE, |
|
|
|
TYPEID, |
|
|
|
STATIC_MEMBER, |
|
|
|
VIRTUAL_MEMBER |
|
) |
| |
Value:inline static TYPEID_TYPE STATIC_MEMBER() { return TYPEID; }\
inline virtual TYPEID_TYPE VIRTUAL_MEMBER() const { return STATIC_MEMBER(); }
Convenience macro for defining a type id for a single class.