home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / TYPEINFO.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  2KB  |  90 lines

  1. /*  typeinfo.h
  2.  
  3.     Definitions for RTTI
  4. */
  5.  
  6. /*
  7.  *      C/C++ Run Time Library - Version 1.5
  8.  *
  9.  *      Copyright (c) 1993, 1994 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. #if defined(__TINY__)
  19. #error Cannot use Runtime Type Information in tiny model
  20. #endif
  21.  
  22. #ifndef __TYPEINFO_H
  23. #define __TYPEINFO_H
  24.  
  25. #if !defined(___DEFS_H)
  26. #include <_defs.h>
  27. #endif
  28.  
  29.  
  30. #if !defined(RC_INVOKED)
  31.  
  32. #if defined(__STDC__)
  33. #pragma warn -nak
  34. #endif
  35.  
  36. #pragma option  -Vt-                    // make sure vtable pointer is 'low'
  37. #pragma option  -RT
  38.  
  39. #endif  /* !RC_INVOKED */
  40.  
  41.  
  42. #if defined(_BUILDRTLDLL) || defined(_RTLDLL)
  43. #   define _TIDIST   _EXPCLASS
  44. #else
  45. #     define _TIDIST
  46. #endif
  47.  
  48. class                   tpid;
  49.  
  50. class   _TIDIST  __rtti  Type_info
  51. {
  52.  
  53. public:
  54.  
  55.         tpid          *         tpp;
  56.  
  57. private:
  58.                 __cdecl Type_info(const Type_info _FAR &);
  59.     Type_info & __cdecl operator=(const Type_info _FAR &);
  60.  
  61. public:
  62.  
  63.     virtual     __cdecl ~Type_info();
  64.  
  65.     int         __cdecl operator==(const Type_info _FAR &) const;
  66.     int         __cdecl operator!=(const Type_info _FAR &) const;
  67.  
  68.     int         __cdecl before(const Type_info _FAR &) const;
  69.  
  70.     const char _FAR *__cdecl name() const;
  71. };
  72.  
  73. class   Bad_cast{};
  74. class   Bad_typeid{};
  75.  
  76.  
  77. #if !defined(RC_INVOKED)
  78.  
  79. #pragma option  -RT.
  80. #pragma option  -Vt.
  81.  
  82. #if defined(__STDC__)
  83. #pragma warn .nak
  84. #endif
  85.  
  86. #endif  /* !RC_INVOKED */
  87.  
  88.  
  89. #endif
  90.