Menu

[r284]: / trunk / cppunit / src / cppunit / TypeInfoHelper.cpp  Maximize  Restore  History

Download this file

26 lines (16 with data), 472 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <cppunit/Portability.h>
#if CPPUNIT_USE_TYPEINFO_NAME
#include <string>
#include <cppunit/extensions/TypeInfoHelper.h>
namespace CppUnit {
std::string
TypeInfoHelper::getClassName( const std::type_info &info )
{
static std::string classPrefix( "class " );
std::string name( info.name() );
if ( name.substr( 0, classPrefix.length() ) == classPrefix )
return name.substr( classPrefix.length() );
return name;
}
} // namespace CppUnit
#endif
MongoDB Logo MongoDB