epoc32/include/stdapis/stlportv5/exception
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(- *   * ies).
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     5  * under the terms of the License "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8  *
     9  * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    11  *
    12  * Contributors:
    13  *
    14  * Description:
    15  * Name       : exception
    16  * Part of    : standard c++ library.
    17  *
    18  */
    19 
    20 
    21 
    22 
    23 #ifndef _SYMCPP_EXCEPTION_H_
    24 #define _SYMCPP_EXCEPTION_H_
    25 
    26 #ifdef __EABI__
    27 /* EABI specific definitions */
    28 #include <e32def.h>
    29 namespace std
    30 {
    31     class exception
    32         {
    33     public:
    34         IMPORT_C exception() __NO_THROW;
    35         IMPORT_C exception(const exception&) __NO_THROW;
    36         IMPORT_C exception& operator=(const exception&) __NO_THROW;
    37         IMPORT_C virtual ~exception() __NO_THROW;
    38         IMPORT_C virtual const char* what() const __NO_THROW;
    39         };
    40 
    41     class bad_exception : public exception
    42         {
    43     public:
    44         IMPORT_C bad_exception() __NO_THROW;
    45         IMPORT_C bad_exception(const bad_exception&)  __NO_THROW;
    46         IMPORT_C bad_exception& operator=(const bad_exception&)  __NO_THROW;
    47         IMPORT_C virtual ~bad_exception()  __NO_THROW;
    48         IMPORT_C virtual const char* what() const  __NO_THROW;
    49         };
    50 
    51     typedef void (*unexpected_handler)();
    52 
    53     IMPORT_C unexpected_handler set_unexpected(unexpected_handler)  __NO_THROW;
    54     IMPORT_C void unexpected();
    55 
    56     typedef void (*terminate_handler)();
    57 
    58     IMPORT_C terminate_handler set_terminate(terminate_handler)  __NO_THROW;
    59     IMPORT_C void terminate();
    60 
    61     IMPORT_C extern bool uncaught_exception()  __NO_THROW;
    62 } 
    63 
    64 
    65 
    66 #  else
    67 
    68 /* Declarations common to all other platforms (Non-EABI) here.
    69  * WINSCW specific definitions are in exception_winscw.h
    70  */
    71 #    include <e32def.h>
    72 
    73 namespace std {
    74 
    75   class exception {
    76   public:
    77 	  exception() __NO_THROW;
    78 	  exception(const exception&) __NO_THROW;
    79       exception& operator=(const exception&) __NO_THROW;
    80       virtual ~exception() __NO_THROW;
    81       virtual const char* what() const __NO_THROW;
    82   };
    83 
    84   class bad_exception : public exception {
    85   public:
    86       bad_exception() __NO_THROW; 
    87       bad_exception(const bad_exception&) __NO_THROW; 
    88       bad_exception& operator=(const bad_exception&) __NO_THROW;
    89       virtual ~bad_exception() __NO_THROW;
    90       virtual const char* what() const __NO_THROW;
    91   };
    92 
    93   typedef void (*terminate_handler)();
    94   extern terminate_handler set_terminate(terminate_handler) __NO_THROW;
    95 
    96   typedef void (*unexpected_handler)();
    97   extern unexpected_handler set_unexpected(unexpected_handler) __NO_THROW;
    98 
    99   void terminate();
   100   void unexpected();
   101   bool uncaught_exception() __NO_THROW;
   102 
   103 }
   104 
   105 #    ifdef __WINSCW__
   106 /*
   107  * C++ Exception specific stuff required from the CW runtime.
   108  * Certain functions are implemented inline in CW headers.
   109  * We're providing the same in exception_winscw.h
   110  */
   111 #      include <stdapis/stlportv5/exception_winscw.h>
   112 #    endif //__WINSCW__
   113 
   114 #endif // __EABI__
   115 #endif //_SYMCPP_EXCEPTION_
   116