Boost Reflect Library 0.1.0
Classes | Defines | Functions
typeinfo.hpp File Reference
#include <boost/reflect/reflect_function_signature.hpp>

Go to the source code of this file.

Classes

struct  get_typeinfo< T >
 provides compile time access to name of a type. More...

Defines

#define BOOST_REFLECT_TYPEINFO(NAME)
 Allows the typename to be accessed via get_typename<T>() in a cross-platform, demangled way that std::typeinfo cannot do.
#define BOOST_REFLECT_TEMPLATE_TYPEINFO(NAME)
 Same as BOOST_REFLECT_TYPEINFO except works for templates with 1 paramater.
#define BOOST_REFLECT_TEMPLATE2_TYPEINFO(NAME)
 Same as BOOST_REFLECT_TYPEINFO except works for templates with 2 paramaters.

Functions

template<typename T >
const char * get_typename ()
 Removes all decorations and returns the typename.

Define Documentation

#define BOOST_REFLECT_TYPEINFO (   NAME)
Value:
namespace boost { namespace reflect { \
template<> struct get_typeinfo<NAME> { \
    enum is_defined_enum{ is_defined = 1 }; \
    static const char* name() { return BOOST_PP_STRINGIZE(NAME); } \
}; } }

Allows the typename to be accessed via get_typename<T>() in a cross-platform, demangled way that std::typeinfo cannot do.

Definition at line 59 of file typeinfo.hpp.

#define BOOST_REFLECT_TEMPLATE_TYPEINFO (   NAME)
Value:
namespace boost { namespace reflect {\
template<> struct get_typeinfo<NAME<void_t> > { \
    enum is_defined_enum{ is_defined = 1 }; \
    static const char* name() { return BOOST_PP_STRINGIZE(NAME); } \
}; } }

Same as BOOST_REFLECT_TYPEINFO except works for templates with 1 paramater.

Definition at line 70 of file typeinfo.hpp.

#define BOOST_REFLECT_TEMPLATE2_TYPEINFO (   NAME)
Value:
namespace boost { namespace reflect {\
template<> struct get_typeinfo<NAME<void_t,void_t> > { \
    enum is_defined_enum{ is_defined = 1 }; \
    static const char* name() { return BOOST_PP_STRINGIZE(NAME); } \
}; } }

Same as BOOST_REFLECT_TYPEINFO except works for templates with 2 paramaters.

Definition at line 80 of file typeinfo.hpp.


© Daniel Larimer 2010-2011 - Licensed under Boost Software License, Version 1.0 Boost Reflect Library