bbtkRTTI.h File Reference

RTTI tools (system dependent). More...

#include "bbtkSystem.h"
#include <vector>

Include dependency graph for bbtkRTTI.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bbtk

Defines

#define BBTK_DEMANGLE_TYPE_NAME(NAME)   NAME
#define BBTK_GET_CURRENT_OBJECT_NAME   BBTK_DEMANGLE_TYPE_NAME(typeid(*this).name())
#define BBTK_GET_TYPE_NAME(A)   BBTK_DEMANGLE_TYPE_NAME(typeid(A).name())
#define BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(TYPE, NAME)
#define BBTK_DEFINE_HUMAN_READABLE_VECTOR_TYPE_NAME(TYPE)

Functions

template<class T>
std::string bbtk::TypeName ()
 Template method which returns the name of a type.
template<class T>
std::string bbtk::TypeName (const T &t)
 Template method which returns the name of the type of a variable.
template<>
std::string bbtk::TypeName< std::type_info > (const std::type_info &t)
template<class T>
std::string bbtk::HumanTypeName ()
 Template method which returns the human readable name of a type.
template<class T>
std::string bbtk::HumanTypeName (const T &t)
 Template method which returns the human readable name of the type of a variable.
template<>
std::string bbtk::HumanTypeName< std::type_info > (const std::type_info &t)
template<>
std::string bbtk::HumanTypeName< std::string > ()
template<>
std::string bbtk::HumanTypeName< std::string > (const std::string &)
template<>
std::string bbtk::HumanTypeName< signed char > ()
template<>
std::string bbtk::HumanTypeName< signed char > (const signed char &)
template<>
std::string bbtk::HumanTypeName< signed short > ()
template<>
std::string bbtk::HumanTypeName< signed short > (const signed short &)
template<>
std::string bbtk::HumanTypeName< signed int > ()
template<>
std::string bbtk::HumanTypeName< signed int > (const signed int &)
template<>
std::string bbtk::HumanTypeName< unsigned char > ()
template<>
std::string bbtk::HumanTypeName< unsigned char > (const unsigned char &)
template<>
std::string bbtk::HumanTypeName< unsigned short > ()
template<>
std::string bbtk::HumanTypeName< unsigned short > (const unsigned short &)
template<>
std::string bbtk::HumanTypeName< unsigned int > ()
template<>
std::string bbtk::HumanTypeName< unsigned int > (const unsigned int &)
template<>
std::string bbtk::HumanTypeName< float > ()
template<>
std::string bbtk::HumanTypeName< float > (const float &)
template<>
std::string bbtk::HumanTypeName< double > ()
template<>
std::string bbtk::HumanTypeName< double > (const double &)
template<>
std::string bbtk::HumanTypeName< bool > ()
template<>
std::string bbtk::HumanTypeName< bool > (const bool &)
template<>
std::string bbtk::HumanTypeName< long > ()
template<>
std::string bbtk::HumanTypeName< long > (const long &)
template<>
std::string bbtk::HumanTypeName< std::vector< int8_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< int8_t > > (const std::vector< int8_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< uint8_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< uint8_t > > (const std::vector< uint8_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< int16_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< int16_t > > (const std::vector< int16_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< uint16_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< uint16_t > > (const std::vector< uint16_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< int32_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< int32_t > > (const std::vector< int32_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< uint32_t > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< uint32_t > > (const std::vector< uint32_t > &)
template<>
std::string bbtk::HumanTypeName< std::vector< long > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< long > > (const std::vector< long > &)
template<>
std::string bbtk::HumanTypeName< std::vector< float > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< float > > (const std::vector< float > &)
template<>
std::string bbtk::HumanTypeName< std::vector< double > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< double > > (const std::vector< double > &)
template<>
std::string bbtk::HumanTypeName< std::vector< std::string > > ()
template<>
std::string bbtk::HumanTypeName< std::vector< std::string > > (const std::vector< std::string > &)
void * bbtk::run_time_up_or_down_cast (const std::type_info &target_type, const std::type_info &source_type, void *source_pointer)
void * bbtk::run_time_up_or_down_cast (const std::type_info &target_type, const std::type_info &source_type, const void *source_pointer)


Detailed Description

RTTI tools (system dependent).

Definition in file bbtkRTTI.h.


Define Documentation

#define BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME ( TYPE,
NAME   ) 

Value:

template <> inline std::string HumanTypeName< TYPE >()          \
  { return NAME; }                                                      \
    template <> inline std::string HumanTypeName< TYPE >(const TYPE&)   \
    { return NAME; }
Macro to specialise the template function TypeName for certain types (typically highly template types, such as STL types) in order to return a **really** human readable string

Definition at line 147 of file bbtkRTTI.h.

#define BBTK_DEFINE_HUMAN_READABLE_VECTOR_TYPE_NAME ( TYPE   ) 

Value:

template <> inline std::string HumanTypeName< std::vector<TYPE> >()     \
  { std::string t("Vector"); t += HumanTypeName<TYPE>(); return t;}                             \
    template <> inline std::string HumanTypeName< std::vector<TYPE> >   \
        (const std::vector<TYPE>&) \
  { std::string t("Vector"); t += HumanTypeName<TYPE>(); return t;}

Definition at line 166 of file bbtkRTTI.h.

#define BBTK_DEMANGLE_TYPE_NAME ( NAME   )     NAME

Definition at line 102 of file bbtkRTTI.h.

Referenced by bbtk::TypeName().

#define BBTK_GET_CURRENT_OBJECT_NAME   BBTK_DEMANGLE_TYPE_NAME(typeid(*this).name())

Definition at line 105 of file bbtkRTTI.h.

#define BBTK_GET_TYPE_NAME (  )     BBTK_DEMANGLE_TYPE_NAME(typeid(A).name())

Definition at line 108 of file bbtkRTTI.h.


Generated on Wed Nov 12 11:37:56 2008 for BBTK by  doxygen 1.5.6