home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / TYPEINFO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.5 KB  |  79 lines

  1. /*  typeinfo.h
  2.  
  3.     Definitions for RTTI
  4. */
  5.  
  6. /*
  7.  *      C/C++ Run Time Library - Version 6.0
  8.  *
  9.  *      Copyright (c) 1993 by Borland International
  10.  *      All Rights Reserved.
  11.  *
  12.  */
  13.  
  14. #if !defined(__cplusplus)
  15. #error Must use C++ for typeinfo.h
  16. #endif
  17.  
  18. #ifndef __TYPEINFO_H
  19. #define __TYPEINFO_H
  20.  
  21. #if !defined(___DEFS_H)
  22. #include <_defs.h>
  23. #endif
  24.  
  25. #pragma option  -Vt-                    // make sure vtable pointer is 'low'
  26. #pragma option  -RT
  27.  
  28.  
  29. #if defined(_BUILDRTLDLL) || defined(_RTLDLL)
  30. #   define _TIDIST   _EXPCLASS
  31. #else
  32. #   if defined(__FLAT__)
  33. #     define _TIDIST
  34. #   else
  35. #      if     defined(__LARGE__) || defined(__COMPACT__) || defined(__HUGE__) || defined(__DLL__)
  36. #         define _TIDIST  __huge
  37. #      else
  38. #         define _TIDIST  __huge __near
  39. #      endif
  40. #   endif
  41. #endif
  42.  
  43. class                   tpid;
  44.  
  45. class   _TIDIST  __rtti  Type_info
  46. {
  47.  
  48. public:
  49.  
  50. #if defined(__FLAT__)
  51.         tpid          *         tpp;
  52. #else
  53.         tpid    __far *         tpp;
  54. #endif
  55.  
  56. private:
  57.                 __cdecl Type_info(const Type_info _FAR &);
  58.     Type_info & __cdecl operator=(const Type_info _FAR &);
  59.  
  60. public:
  61.  
  62.     virtual     __cdecl ~Type_info();
  63.  
  64.     int         __cdecl operator==(const Type_info _FAR &) const;
  65.     int         __cdecl operator!=(const Type_info _FAR &) const;
  66.  
  67.     int         __cdecl before(const Type_info _FAR &) const;
  68.  
  69.     const char _FAR *__cdecl name() const;
  70. };
  71.  
  72. class   Bad_cast{};
  73. class   Bad_typeid{};
  74.  
  75. #pragma option  -RT.
  76. #pragma option  -Vt.
  77.  
  78. #endif
  79.