//  typeinfo : headerfile for the free standard C++ library
//  
//  Copyright (C) 1999 by the free standard C++ Library Team
//                        see AUTHORS for more details
//
//  Homepage : http://www.inf.fu-berlin.de/~mkrueger/fscl/
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Library General Public
//  License as published by the Free Software Foundation; either	
//  version 2 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Library General Public License for more details.
//  You should have received a copy of the GNU Library General Public
//  License along with this library; if not, write to the Free
//  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//  version : 0.1 last modified : 17.09.99


#ifndef __CPP_TYPEINFO
#define __CPP_TYPEINFO

#include<exception>

namespace std {
	// the STL paper says that some funcions do return : an implementation-defined value. :
	// maybe I make this header useful, but I haven't used <typeinfo> yet ... 
	static const char *implementation_defined_value = "an implementation-defined value"; 
	
	class type_info
	{
		public:
			virtual ~type_info();
			
			bool operator==(const type_info &rhs) const
			{
				return (*this == rhs);
			}
			
			bool operator!=(const type_info& rhs) const
			{
				return !(*this == rhs);
			}
			
			bool before(const type_info& rhs) const
			{
				// not implemented, because I don't know !!!
				return false;
			}
			
			const char *name() const
			{
				return implementation_defined_value;
			}
			
			type_info(const type_info &rhs)
			{
			}

			type_info &operator=(const type_info &rhs)
			{
				return *this;
			}
	};

	class bad_cast : public exception
	{
		public:
			bad_cast() throw()
			{
			}
			
			bad_cast(const bad_cast &bc) throw()
			{
				
			}
			
			bad_cast &operator=(const bad_cast &bc) throw()
			{
				return *this;
			}
			
			virtual ~bad_cast() throw()
			{
			}
			
			virtual const char* what() const throw()
			{
				return implementation_defined_value;
			}
	};
	
	class bad_typeid : public exception
	{
		public:
			bad_typeid() throw()
			{
			}
			
			bad_typeid(const bad_typeid &bt) throw()
			{
			}
			
			bad_typeid& operator=(const bad_typeid &bt) throw()
			{
				return *this;
			}
			
			virtual ~bad_typeid() throw()
			{
			}
			
			virtual const char* what() const throw()
			{
				return implementation_defined_value;
			}
	};

}
#endif
