source: trunk/contrib/cppunit-1.12.2/include/cppunit/extensions/TypeInfoHelper.h @ 876

Last change on this file since 876 was 876, checked in by sam, 9 years ago

contrib: add a precompiled Win32 version of CppUnit and update build system
accordingly.

File size: 744 bytes
Line 
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
11CPPUNIT_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
29CPPUNIT_NS_END
30
31#endif  // CPPUNIT_HAVE_RTTI
32
33#endif  // CPPUNIT_TYPEINFOHELPER_H
Note: See TracBrowser for help on using the repository browser.