epoc32/include/stdapis/stlportv5/stdexcept
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/stlportv5/stdexcept	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/stlportv5/stdexcept	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,16 +1,14 @@
     1.4  /*
     1.5 - * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.6 - *
     1.7   * Copyright (c) 1996,1997
     1.8   * Silicon Graphics Computer Systems, Inc.
     1.9   *
    1.10 - * Copyright (c) 1999 
    1.11 + * Copyright (c) 1999
    1.12   * Boris Fomitchev
    1.13   *
    1.14   * This material is provided "as is", with absolutely no warranty expressed
    1.15   * or implied. Any use is at your own risk.
    1.16   *
    1.17 - * Permission to use or copy this software for any purpose is hereby granted 
    1.18 + * Permission to use or copy this software for any purpose is hereby granted
    1.19   * without fee, provided the above notices are retained on all copies.
    1.20   * Permission to modify the code and to distribute modified code is granted,
    1.21   * provided the above notices are retained, and a notice that the code was
    1.22 @@ -18,273 +16,39 @@
    1.23   *
    1.24   */
    1.25  
    1.26 +#ifndef _STLP_STDEXCEPT
    1.27  
    1.28 -# if !defined (_STLP_OUTERMOST_HEADER_ID)
    1.29 +#if !defined (_STLP_OUTERMOST_HEADER_ID)
    1.30  #  define _STLP_OUTERMOST_HEADER_ID 0x63
    1.31  #  include <stl/_prolog.h>
    1.32 -# elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_0x63)
    1.33 -#  define _STLP_DONT_POP_0x63
    1.34 -# endif
    1.35 -
    1.36 -#ifndef _STLP_STDEXCEPT
    1.37 -#define _STLP_STDEXCEPT 1
    1.38 -
    1.39 -# ifdef _STLP_PRAGMA_ONCE
    1.40 -#  pragma once
    1.41 -# endif
    1.42 -
    1.43 -#if defined (_STLP_USE_TRAP_LEAVE)
    1.44 -
    1.45 -enum {
    1.46 -  STDEX_bad_alloc			= -10000,
    1.47 -  STDEX_logic_error			= -10001,
    1.48 -  STDEX_runtime_error		= -10002,
    1.49 -  STDEX_domain_error		= -10003,
    1.50 -  STDEX_invalid_argument	= -10004,
    1.51 -  STDEX_length_error		= -10005,
    1.52 -  STDEX_out_of_range		= -10006,
    1.53 -  STDEX_range_error			= -10007,
    1.54 -  STDEX_overflow_error		= -10008,
    1.55 -  STDEX_underflow_error		= -10009
    1.56 -};
    1.57 -
    1.58 -// User may override this
    1.59 -#ifndef STDEX_REPORT_EXCEPTION
    1.60 -# define STDEX_REPORT_EXCEPTION(x) 
    1.61 +#elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_HEADER_ID)
    1.62 +#  define _STLP_DONT_POP_HEADER_ID
    1.63 +#  define _STLP_STDEXCEPT
    1.64  #endif
    1.65  
    1.66 +#ifdef _STLP_PRAGMA_ONCE
    1.67 +#  pragma once
    1.68  #endif
    1.69  
    1.70 -# if !defined(_STLP_STDEXCEPT_SEEN) && \
    1.71 -   (!defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE))
    1.72 -
    1.73 -#  define _STLP_STDEXCEPT_SEEN 1
    1.74 -
    1.75 -#  include <exception>
    1.76 -
    1.77 -#if defined(_STLP_USE_EXCEPTIONS) || \
    1.78 -    !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32)
    1.79 -
    1.80 -# include <cstring>
    1.81 -
    1.82 -#ifndef _STLP_INTERNAL_ALLOC_H
    1.83 -# include <stl/_alloc.h>
    1.84 +#if (_STLP_OUTERMOST_HEADER_ID != 0x63) || defined (_STLP_DONT_POP_HEADER_ID)
    1.85 +#  include _STLP_NATIVE_HEADER(stdexcept)
    1.86 +#else
    1.87 +#  ifndef _STLP_INTERNAL_STDEXCEPT
    1.88 +#    include <stl/_stdexcept.h>
    1.89 +#  endif
    1.90  #endif
    1.91  
    1.92 -#ifndef _STLP_STRING_FWD_H
    1.93 -# include <stl/_string_fwd.h>
    1.94 +#if (_STLP_OUTERMOST_HEADER_ID == 0x63)
    1.95 +#  if !defined (_STLP_DONT_POP_HEADER_ID)
    1.96 +#    include <stl/_epilog.h>
    1.97 +#    undef  _STLP_OUTERMOST_HEADER_ID
    1.98 +#  else
    1.99 +#    undef  _STLP_DONT_POP_HEADER_ID
   1.100 +#  endif
   1.101  #endif
   1.102  
   1.103 -# define _STLP_OWN_STDEXCEPT 1
   1.104 -
   1.105 -_STLP_BEGIN_NAMESPACE
   1.106 -
   1.107 -# if   ! defined (_STLP_NO_EXCEPTION_HEADER)
   1.108 -# if !defined(_STLP_EXCEPTION_BASE) && !defined(_STLP_BROKEN_EXCEPTION_CLASS) && defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE)
   1.109 -using _STLP_VENDOR_EXCEPT_STD::exception;
   1.110 -# endif
   1.111 -# endif
   1.112 -#  define _STLP_EXCEPTION_BASE exception
   1.113 -
   1.114 -#ifdef __SYMBIAN32__
   1.115 -class __Named_exception : public _STLP_EXCEPTION_BASE {
   1.116 -#else
   1.117 -class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE {
   1.118 -#endif //__SYMBIAN32__
   1.119 -public:
   1.120 -  _STLP_DECLSPEC __Named_exception(const string& __str) 
   1.121 -# ifdef _STLP_OWN_IOSTREAMS
   1.122 -    ;
   1.123 -  _STLP_DECLSPEC const char* what() const _STLP_NOTHROW_INHERENTLY;
   1.124 -  _STLP_DECLSPEC ~__Named_exception() _STLP_NOTHROW_INHERENTLY;
   1.125 -# else
   1.126 -  {
   1.127 -    strncpy(_M_name, __get_c_string(__str), _S_bufsize);
   1.128 -    _M_name[_S_bufsize - 1] = '\0';
   1.129 -  }
   1.130 -  const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; }
   1.131 -# endif
   1.132 -
   1.133 -private:
   1.134 -  enum { _S_bufsize = 256 };
   1.135 -  char _M_name[_S_bufsize];
   1.136 -};
   1.137 -
   1.138 -#ifdef __SYMBIAN32__
   1.139 -class logic_error : public __Named_exception {
   1.140 -#else
   1.141 -class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception {
   1.142 -#endif
   1.143 -public:
   1.144 -  _STLP_DECLSPEC logic_error(const string& __s)
   1.145 -#ifdef __SYMBIAN32__
   1.146 -    ;
   1.147 -#else
   1.148 -   : __Named_exception(__s) {}
   1.149 -#endif
   1.150 -# ifdef _STLP_OWN_IOSTREAMS
   1.151 -  _STLP_DECLSPEC ~logic_error() _STLP_NOTHROW_INHERENTLY;
   1.152 -# endif
   1.153 -};
   1.154 -
   1.155 -#ifdef __SYMBIAN32__
   1.156 -class runtime_error : public __Named_exception {
   1.157 -#else
   1.158 -class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception {
   1.159 -#endif
   1.160 -public:
   1.161 -  _STLP_DECLSPEC runtime_error(const string& __s)
   1.162 -#ifdef __SYMBIAN32__
   1.163 -    ;
   1.164 -#else
   1.165 -   : __Named_exception(__s) {}
   1.166 -#endif
   1.167 -# ifdef _STLP_OWN_IOSTREAMS
   1.168 -  _STLP_DECLSPEC ~runtime_error() _STLP_NOTHROW_INHERENTLY;
   1.169 -# endif
   1.170 -};
   1.171 -
   1.172 -#ifdef __SYMBIAN32__
   1.173 -class domain_error : public logic_error {
   1.174 -#else
   1.175 -class _STLP_CLASS_DECLSPEC domain_error : public logic_error {
   1.176 -#endif
   1.177 -public:
   1.178 -  _STLP_DECLSPEC domain_error(const string& __arg)
   1.179 -#ifdef __SYMBIAN32__
   1.180 -    ;
   1.181 -#else
   1.182 -   : logic_error(__arg) {}
   1.183 -#endif
   1.184 -# ifdef _STLP_OWN_IOSTREAMS
   1.185 -  _STLP_DECLSPEC ~domain_error() _STLP_NOTHROW_INHERENTLY;
   1.186 -# endif
   1.187 -};
   1.188 -
   1.189 -#ifdef __SYMBIAN32__
   1.190 -class invalid_argument : public logic_error {
   1.191 -#else
   1.192 -class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error {
   1.193 -#endif
   1.194 -public:
   1.195 -  _STLP_DECLSPEC invalid_argument(const string& __arg)
   1.196 -#ifdef __SYMBIAN32__
   1.197 -    ;
   1.198 -#else
   1.199 -   : logic_error(__arg) {}
   1.200 -#endif
   1.201 -# ifdef _STLP_OWN_IOSTREAMS
   1.202 -  _STLP_DECLSPEC ~invalid_argument() _STLP_NOTHROW_INHERENTLY;
   1.203 -# endif
   1.204 -};
   1.205 -
   1.206 -#ifdef __SYMBIAN32__
   1.207 -class length_error : public logic_error {
   1.208 -#else
   1.209 -class _STLP_CLASS_DECLSPEC length_error : public logic_error {
   1.210 -#endif
   1.211 -public:
   1.212 -  _STLP_DECLSPEC length_error(const string& __arg)
   1.213 -#ifdef __SYMBIAN32__
   1.214 -    ;
   1.215 -#else
   1.216 -   : logic_error(__arg) {}
   1.217 -#endif
   1.218 -# ifdef _STLP_OWN_IOSTREAMS
   1.219 -  _STLP_DECLSPEC ~length_error() _STLP_NOTHROW_INHERENTLY;
   1.220 -# endif
   1.221 -};
   1.222 -
   1.223 -#ifdef __SYMBIAN32__
   1.224 -class out_of_range : public logic_error {
   1.225 -#else
   1.226 -class _STLP_CLASS_DECLSPEC out_of_range : public logic_error {
   1.227 -#endif
   1.228 -public:
   1.229 -  _STLP_DECLSPEC out_of_range(const string& __arg)
   1.230 -#ifdef __SYMBIAN32__
   1.231 -    ;
   1.232 -#else
   1.233 -   : logic_error(__arg) {}
   1.234 -#endif
   1.235 -# ifdef _STLP_OWN_IOSTREAMS
   1.236 -  _STLP_DECLSPEC ~out_of_range() _STLP_NOTHROW_INHERENTLY;
   1.237 -# endif
   1.238 -};
   1.239 -
   1.240 -#ifdef __SYMBIAN32__
   1.241 -class range_error : public runtime_error {
   1.242 -#else
   1.243 -class _STLP_CLASS_DECLSPEC range_error : public runtime_error {
   1.244 -#endif
   1.245 -public:
   1.246 -  _STLP_DECLSPEC range_error(const string& __arg)
   1.247 -#ifdef __SYMBIAN32__
   1.248 -    ;
   1.249 -#else
   1.250 -   : runtime_error(__arg) {}
   1.251 -#endif
   1.252 -# ifdef _STLP_OWN_IOSTREAMS
   1.253 -  _STLP_DECLSPEC ~range_error() _STLP_NOTHROW_INHERENTLY;
   1.254 -# endif
   1.255 -};
   1.256 -
   1.257 -#ifdef __SYMBIAN32__
   1.258 -class overflow_error : public runtime_error {
   1.259 -#else
   1.260 -class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error {
   1.261 -#endif
   1.262 -public:
   1.263 -  _STLP_DECLSPEC overflow_error(const string& __arg)
   1.264 -#ifdef __SYMBIAN32__
   1.265 -    ;
   1.266 -#else
   1.267 -   : runtime_error(__arg) {}
   1.268 -#endif
   1.269 -# ifdef _STLP_OWN_IOSTREAMS
   1.270 -  _STLP_DECLSPEC ~overflow_error() _STLP_NOTHROW_INHERENTLY;
   1.271 -# endif
   1.272 -};
   1.273 -
   1.274 -#ifdef __SYMBIAN32__
   1.275 -class underflow_error : public runtime_error {
   1.276 -#else
   1.277 -class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error {
   1.278 -#endif
   1.279 -public:
   1.280 -  _STLP_DECLSPEC underflow_error(const string& __arg)
   1.281 -#ifdef __SYMBIAN32__
   1.282 -    ;
   1.283 -#else
   1.284 -   : runtime_error(__arg) {}
   1.285 -#endif
   1.286 -# ifdef _STLP_OWN_IOSTREAMS
   1.287 -  _STLP_DECLSPEC ~underflow_error() _STLP_NOTHROW_INHERENTLY;
   1.288 -# endif
   1.289 -};
   1.290 -
   1.291 -_STLP_END_NAMESPACE
   1.292 -
   1.293 -#endif /* Not o32, and no exceptions */
   1.294 -# endif /* _STLP_STDEXCEPT_SEEN */
   1.295 -
   1.296 -
   1.297 -#if defined (_STLP_USE_NATIVE_STDEXCEPT)
   1.298 -#  include _STLP_NATIVE_HEADER(stdexcept)
   1.299 -# endif
   1.300 -
   1.301  #endif /* _STLP_STDEXCEPT */
   1.302  
   1.303 -# if (_STLP_OUTERMOST_HEADER_ID == 0x63)
   1.304 -#  if ! defined (_STLP_DONT_POP_0x63)
   1.305 -#   include <stl/_epilog.h>
   1.306 -#   undef  _STLP_OUTERMOST_HEADER_ID
   1.307 -#   endif
   1.308 -#   undef  _STLP_DONT_POP_0x63
   1.309 -# endif
   1.310 -
   1.311 -
   1.312  // Local Variables:
   1.313  // mode:C++
   1.314  // End:
   1.315 -