/* Edison Design Group, 1995. */
/*
typeinfo -- Include file for type information (18.5.1)
*/
#ifndef _TYPEINFO_H
#define _TYPEINFO_H

#include <stdexcept>

#if defined(__DECCXX)
#   ifdef __PRAGMA_ENVIRONMENT
#      pragma __environment __save
#      pragma __environment __header_defaults
#   endif
#endif

#ifndef _RWSTD_NO_NAMESPACE
namespace std {
#endif 

/* The following pragma is used so that the compiler knows that this definition
   of type_info is the one that corresponds to the type returned by typeid. */
#pragma define_type_info
  class type_info {
  public:
    virtual ~type_info();
    bool operator==(const type_info&) const;
    bool operator!=(const type_info&) const;
    bool before(const type_info&) const;
    const char* name() const;
  private:
    type_info& operator=(const type_info&);  // Not actually defined
#if 0
#else /* 0 */
  protected:
    // Protected instead of private to suppress the "no accessible
    // constructor" warning
#endif /* 0 */
    type_info(const type_info&);  // Not actually defined
  };

  class bad_cast : public exception {
  public:
    bad_cast() _RWSTD_THROW_SPEC_NULL;
    bad_cast(const bad_cast&) _RWSTD_THROW_SPEC_NULL;
    bad_cast& operator=(const bad_cast&) _RWSTD_THROW_SPEC_NULL;
    virtual ~bad_cast() _RWSTD_THROW_SPEC_NULL;
    virtual const char* what() const _RWSTD_THROW_SPEC_NULL;
  };

  class bad_typeid : public exception {
  public:
    bad_typeid() _RWSTD_THROW_SPEC_NULL;
    bad_typeid(const bad_typeid&) _RWSTD_THROW_SPEC_NULL;
    bad_typeid& operator=(const bad_typeid&) _RWSTD_THROW_SPEC_NULL;
    virtual ~bad_typeid() _RWSTD_THROW_SPEC_NULL;
    virtual const char* what() const _RWSTD_THROW_SPEC_NULL;
  };

#ifndef _RWSTD_NO_NAMESPACE
}  /* namespace std */
#endif 

#if defined(__DECCXX)
#   ifdef __PRAGMA_ENVIRONMENT
#      pragma __environment __restore
#   endif
#endif

#endif /* _TYPEINFO_H */
