/***
*typeinfo.h - Defines the type_info structure and exceptions used for RTTI
*
*	Copyright (c) Microsoft Corporation. All rights reserved.
*	Modified January 1996 by P.J. Plauger
*
*Purpose:
*       Defines the type_info structure and exceptions used for
*       Runtime Type Identification.
*
*       [Public]
*
****/

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef _TYPEINFO_
#define _TYPEINFO_
#include <xstddef>

 #ifndef __cplusplus
  #error This header requires a C++ compiler ...
 #endif

 #if !defined(_WIN32)
  #error ERROR: Only Win32 target supported!
 #endif

 #include <typeinfo.h>

 _STD_BEGIN
 #if _HAS_EXCEPTIONS
using ::type_info;
using ::bad_cast;
using ::bad_typeid;
using ::__non_rtti_object;
 #else
		// CLASS bad_cast
class _CRTIMP2 bad_cast
	: public exception
	{	// base of all bad cast exceptions
public:
	bad_cast(const char *_Message = "bad cast") _THROW0()
		: exception(_Message)
		{	// construct from message string
		}

	virtual ~bad_cast() _THROW0()
		{	// destroy the object
		}

protected:
	virtual void _Doraise() const
		{	// perform class-specific exception handling
		_RAISE(*this);
		}
	};

		// CLASS bad_typeid
class _CRTIMP2 bad_typeid
	: public exception
	{	// base of all bad typeid exceptions
public:
	bad_typeid(const char *_Message = "bad typeid") _THROW0()
		: exception(_Message)
		{	// construct from message string
		}

	virtual ~bad_typeid() _THROW0()
		{	// destroy the object
		}

protected:
	virtual void _Doraise() const
		{	// perform class-specific exception handling
		_RAISE(*this);
		}
	};

class _CRTIMP2 __non_rtti_object
	: public bad_typeid
	{	// report a non RTTI object
public:
    __non_rtti_object(const char *_Message)
		: bad_typeid(_Message)
		{	// construct from message string
		}
	};
 #endif /* _HAS_EXCEPTIONS */

 _STD_END

#endif // _TYPEINFO_

/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Modified January 1996 by P.J. Plauger
 * Modified November 1998 by P.J. Plauger
 * Consult your license regarding permissions and restrictions.
 */
