stl_exception.h

00001 /*
00002  * Copyright (c) 1998
00003  * Silicon Graphics Computer Systems, Inc.
00004  *
00005  * Permission to use, copy, modify, distribute and sell this software
00006  * and its documentation for any purpose is hereby granted without fee,
00007  * provided that the above copyright notice appear in all copies and
00008  * that both that copyright notice and this permission notice appear
00009  * in supporting documentation.  Silicon Graphics makes no
00010  * representations about the suitability of this software for any
00011  * purpose.  It is provided "as is" without express or implied warranty.
00012  */ 
00013 
00014 #ifndef __SGI_STL_EXCEPTION_H
00015 #define __SGI_STL_EXCEPTION_H
00016 
00017 // This header exists solely for portability.  Normally it just includes
00018 // the header <exception>.
00019 
00020 // The header <exception> contains low-level functions that interact
00021 // with a compiler's exception-handling mechanism.  It is assumed to
00022 // be supplied with the compiler, rather than with the library, because
00023 // it is inherently tied very closely to the compiler itself.
00024 
00025 // On platforms where <exception> does not exist, this header defines
00026 // an exception base class.  This is *not* a substitute for everything
00027 // in <exception>, but it suffices to support a bare minimum of STL
00028 // functionality.
00029 
00030 #include <stl_config.h>
00031 
00032 #ifndef __STL_NO_EXCEPTION_HEADER
00033 
00034 #include <exception>
00035 #define __STL_EXCEPTION_BASE exception
00036 
00037 #else /* __STL_NO_EXCEPTION_HEADER */
00038 
00039 __STL_BEGIN_NAMESPACE
00040 
00041 class _Exception {
00042 public:
00043   virtual ~_Exception() __STL_NOTHROW {}
00044   virtual const char* what() const __STL_NOTHROW { return ""; }
00045 };
00046 
00047 #define __STL_EXCEPTION_BASE _Exception
00048 
00049 __STL_END_NAMESPACE
00050 
00051 #endif /* __STL_NO_EXCEPTION_HEADER */
00052 
00053 #endif /* __SGI_STL_EXCEPTION_H */
00054 
00055 // Local Variables:
00056 // mode:C++
00057 // End:

Generated on Mon Jun 5 10:20:44 2006 for Intelligence.kdevelop by  doxygen 1.4.6