Tizen 2.1 base
[platform/upstream/libbullet.git] / UnitTests / cppunit / include / cppunit / extensions / TypeInfoHelper.h
1 #ifndef CPPUNIT_TYPEINFOHELPER_H
2 #define CPPUNIT_TYPEINFOHELPER_H
3
4 #include <cppunit/Portability.h>
5
6 #if CPPUNIT_HAVE_RTTI
7
8 #include <typeinfo>
9 #include <string>
10
11 CPPUNIT_NS_BEGIN
12
13
14   /**! \brief Helper to use type_info.
15    */
16   class CPPUNIT_API TypeInfoHelper
17   {
18   public:
19     /*! \brief Get the class name of the specified type_info.
20      * \param info Info which the class name is extracted from.
21      * \return The string returned by type_info::name() without
22      *         the "class" prefix. If the name is not prefixed
23      *         by "class", it is returned as this.
24      */
25     static std::string getClassName( const std::type_info &info );
26   };
27
28
29 CPPUNIT_NS_END
30
31 #endif  // CPPUNIT_HAVE_RTTI
32
33 #endif  // CPPUNIT_TYPEINFOHELPER_H