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