This file is indexed.

/usr/share/doc/libtbb-doc/html/a00593.html is in libtbb-doc 4.0+r233-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>tbb_exception.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
  </ul></div>
<h1>tbb_exception.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright 2005-2011 Intel Corporation.  All Rights Reserved.</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    The source code contained or described herein and all documents related</span>
<a name="l00005"></a>00005 <span class="comment">    to the source code ("Material") are owned by Intel Corporation or its</span>
<a name="l00006"></a>00006 <span class="comment">    suppliers or licensors.  Title to the Material remains with Intel</span>
<a name="l00007"></a>00007 <span class="comment">    Corporation or its suppliers and licensors.  The Material is protected</span>
<a name="l00008"></a>00008 <span class="comment">    by worldwide copyright laws and treaty provisions.  No part of the</span>
<a name="l00009"></a>00009 <span class="comment">    Material may be used, copied, reproduced, modified, published, uploaded,</span>
<a name="l00010"></a>00010 <span class="comment">    posted, transmitted, distributed, or disclosed in any way without</span>
<a name="l00011"></a>00011 <span class="comment">    Intel's prior express written permission.</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">    No license under any patent, copyright, trade secret or other</span>
<a name="l00014"></a>00014 <span class="comment">    intellectual property right is granted to or conferred upon you by</span>
<a name="l00015"></a>00015 <span class="comment">    disclosure or delivery of the Materials, either expressly, by</span>
<a name="l00016"></a>00016 <span class="comment">    implication, inducement, estoppel or otherwise.  Any license under such</span>
<a name="l00017"></a>00017 <span class="comment">    intellectual property rights must be express and approved by Intel in</span>
<a name="l00018"></a>00018 <span class="comment">    writing.</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __TBB_exception_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __TBB_exception_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "tbb_stddef.h"</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#if !TBB_USE_EXCEPTIONS &amp;&amp; _MSC_VER</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>    <span class="comment">// Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers</span>
<a name="l00028"></a>00028 <span class="preprocessor">    #pragma warning (push)</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (disable: 4530)</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;string&gt;</span> <span class="comment">// required to construct std exception classes</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#if !TBB_USE_EXCEPTIONS &amp;&amp; _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">    #pragma warning (pop)</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="keyword">namespace </span>tbb {
<a name="l00040"></a>00040 
<a name="l00042"></a><a class="code" href="a00232.html">00042</a> <span class="keyword">class </span><a class="code" href="a00232.html">bad_last_alloc</a> : <span class="keyword">public</span> std::bad_alloc {
<a name="l00043"></a>00043 <span class="keyword">public</span>:
<a name="l00044"></a>00044     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>();
<a name="l00045"></a>00045 <span class="preprocessor">#if __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>    <span class="comment">/*override*/</span> ~<a class="code" href="a00232.html">bad_last_alloc</a>() <span class="keywordflow">throw</span>() {}
<a name="l00047"></a>00047 <span class="preprocessor">#endif</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>};
<a name="l00049"></a>00049 
<a name="l00051"></a><a class="code" href="a00264.html">00051</a> <span class="keyword">class </span><a class="code" href="a00264.html">improper_lock</a> : <span class="keyword">public</span> std::exception {
<a name="l00052"></a>00052 <span class="keyword">public</span>:
<a name="l00053"></a>00053     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>();
<a name="l00054"></a>00054 };
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="a00272.html">00057</a> <span class="keyword">class </span><a class="code" href="a00272.html">missing_wait</a> : <span class="keyword">public</span> std::exception {
<a name="l00058"></a>00058 <span class="keyword">public</span>:
<a name="l00059"></a>00059     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>();
<a name="l00060"></a>00060 };
<a name="l00061"></a>00061 
<a name="l00063"></a><a class="code" href="a00265.html">00063</a> <span class="keyword">class </span><a class="code" href="a00265.html">invalid_multiple_scheduling</a> : <span class="keyword">public</span> std::exception {
<a name="l00064"></a>00064 <span class="keyword">public</span>:
<a name="l00065"></a>00065     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> <span class="keywordflow">throw</span>();
<a name="l00066"></a>00066 };
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="keyword">namespace </span>internal {
<a name="l00070"></a>00070 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4();
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="keyword">enum</span> exception_id {
<a name="l00073"></a>00073     eid_bad_alloc = 1,
<a name="l00074"></a>00074     eid_bad_last_alloc,
<a name="l00075"></a>00075     eid_nonpositive_step,
<a name="l00076"></a>00076     eid_out_of_range,
<a name="l00077"></a>00077     eid_segment_range_error,
<a name="l00078"></a>00078     eid_index_range_error,
<a name="l00079"></a>00079     eid_missing_wait,
<a name="l00080"></a>00080     eid_invalid_multiple_scheduling,
<a name="l00081"></a>00081     eid_improper_lock,
<a name="l00082"></a>00082     eid_possible_deadlock,
<a name="l00083"></a>00083     eid_operation_not_permitted,
<a name="l00084"></a>00084     eid_condvar_wait_failed,
<a name="l00085"></a>00085     eid_invalid_load_factor,
<a name="l00086"></a>00086     eid_reserved, <span class="comment">// free slot for backward compatibility, can be reused.</span>
<a name="l00087"></a>00087     eid_invalid_swap,
<a name="l00088"></a>00088     eid_reservation_length_error,
<a name="l00089"></a>00089     eid_invalid_key,
<a name="l00091"></a>00091 
<a name="l00093"></a>00093     eid_max
<a name="l00094"></a>00094 };
<a name="l00095"></a>00095 
<a name="l00097"></a>00097 
<a name="l00099"></a>00099 <span class="keywordtype">void</span> __TBB_EXPORTED_FUNC throw_exception_v4 ( exception_id );
<a name="l00100"></a>00100 
<a name="l00102"></a>00102 <span class="keyword">inline</span> <span class="keywordtype">void</span> throw_exception ( exception_id eid ) { throw_exception_v4(eid); }
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 } <span class="comment">// namespace internal</span>
<a name="l00105"></a>00105 } <span class="comment">// namespace tbb</span>
<a name="l00106"></a>00106 
<a name="l00107"></a>00107 <span class="preprocessor">#if __TBB_TASK_GROUP_CONTEXT</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#include "tbb_allocator.h"</span>
<a name="l00109"></a>00109 <span class="preprocessor">#include &lt;exception&gt;</span>
<a name="l00110"></a>00110 <span class="preprocessor">#include &lt;typeinfo&gt;</span>
<a name="l00111"></a>00111 <span class="preprocessor">#include &lt;new&gt;</span>
<a name="l00112"></a>00112 
<a name="l00113"></a>00113 <span class="keyword">namespace </span>tbb {
<a name="l00114"></a>00114 
<a name="l00116"></a>00116 
<a name="l00136"></a><a class="code" href="a00319.html">00136</a> <span class="keyword">class </span><a class="code" href="a00319.html">tbb_exception</a> : <span class="keyword">public</span> std::exception
<a name="l00137"></a>00137 {
<a name="l00141"></a>00141     <span class="keywordtype">void</span>* operator new ( size_t );
<a name="l00142"></a>00142 
<a name="l00143"></a>00143 <span class="keyword">public</span>:
<a name="l00145"></a>00145 
<a name="l00146"></a>00146     <span class="keyword">virtual</span> <a class="code" href="a00319.html">tbb_exception</a>* <a class="code" href="a00319.html#3e3482bf264d4ca4dde046cd9c02c766">move</a> () <span class="keywordflow">throw</span>() = 0;
<a name="l00147"></a>00147 
<a name="l00149"></a>00149 
<a name="l00151"></a>00151     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00319.html#66c94938eca8bf88b76f3eccaaf215d8">destroy</a> () <span class="keywordflow">throw</span>() = 0;
<a name="l00152"></a>00152 
<a name="l00154"></a>00154 
<a name="l00158"></a>00158     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00319.html#8588e07fa49692f4d734e4f2e4f048f4">throw_self</a> () = 0;
<a name="l00159"></a>00159 
<a name="l00161"></a>00161     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00319.html#d00f6497e552fee978a02bfcbebf46e2">name</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
<a name="l00162"></a>00162 
<a name="l00164"></a>00164     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00319.html#e8157689ecb66bc6c72d3618bf3cc371">what</a>() <span class="keyword">const</span> <span class="keywordflow">throw</span>() = 0;
<a name="l00165"></a>00165 
<a name="l00172"></a><a class="code" href="a00319.html#3f2da7f3d8a6e4c1df522af1213afb5a">00172</a>     <span class="keywordtype">void</span> <a class="code" href="a00319.html#3f2da7f3d8a6e4c1df522af1213afb5a">operator delete </a>( <span class="keywordtype">void</span>* p ) {
<a name="l00173"></a>00173         internal::deallocate_via_handler_v3(p);
<a name="l00174"></a>00174     }
<a name="l00175"></a>00175 };
<a name="l00176"></a>00176 
<a name="l00178"></a>00178 
<a name="l00182"></a><a class="code" href="a00240.html">00182</a> <span class="keyword">class </span><a class="code" href="a00240.html">captured_exception</a> : <span class="keyword">public</span> <a class="code" href="a00319.html">tbb_exception</a>
<a name="l00183"></a>00183 {
<a name="l00184"></a>00184 <span class="keyword">public</span>:
<a name="l00185"></a>00185     <a class="code" href="a00240.html">captured_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00240.html">captured_exception</a>&amp; src )
<a name="l00186"></a>00186         : <a class="code" href="a00319.html">tbb_exception</a>(src), my_dynamic(<span class="keyword">false</span>)
<a name="l00187"></a>00187     {
<a name="l00188"></a>00188         set(src.<a class="code" href="a00240.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00240.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
<a name="l00189"></a>00189     }
<a name="l00190"></a>00190 
<a name="l00191"></a>00191     <a class="code" href="a00240.html">captured_exception</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span>* name_, <span class="keyword">const</span> <span class="keywordtype">char</span>* info )
<a name="l00192"></a>00192         : my_dynamic(<span class="keyword">false</span>)
<a name="l00193"></a>00193     {
<a name="l00194"></a>00194         set(name_, info);
<a name="l00195"></a>00195     }
<a name="l00196"></a>00196 
<a name="l00197"></a>00197     __TBB_EXPORTED_METHOD ~<a class="code" href="a00240.html">captured_exception</a> () <span class="keywordflow">throw</span>();
<a name="l00198"></a>00198 
<a name="l00199"></a>00199     <a class="code" href="a00240.html">captured_exception</a>&amp; operator= ( <span class="keyword">const</span> <a class="code" href="a00240.html">captured_exception</a>&amp; src ) {
<a name="l00200"></a>00200         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &amp;src ) {
<a name="l00201"></a>00201             clear();
<a name="l00202"></a>00202             set(src.<a class="code" href="a00240.html#6a57f9aa0bce72392492d109b9e1d941">my_exception_name</a>, src.<a class="code" href="a00240.html#788adf4e55cdad7abc178a48a1d47e69">my_exception_info</a>);
<a name="l00203"></a>00203         }
<a name="l00204"></a>00204         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00205"></a>00205     }
<a name="l00206"></a>00206 
<a name="l00207"></a>00207     <span class="comment">/*override*/</span>
<a name="l00208"></a>00208     <a class="code" href="a00240.html">captured_exception</a>* __TBB_EXPORTED_METHOD <a class="code" href="a00240.html#837a50b8f6a800bda225c39d1699643f">move</a> () <span class="keywordflow">throw</span>();
<a name="l00209"></a>00209 
<a name="l00210"></a>00210     <span class="comment">/*override*/</span>
<a name="l00211"></a>00211     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD <a class="code" href="a00240.html#93d875d3555502ff6f18513525de204c">destroy</a> () <span class="keywordflow">throw</span>();
<a name="l00212"></a>00212 
<a name="l00213"></a>00213     <span class="comment">/*override*/</span>
<a name="l00214"></a><a class="code" href="a00240.html#2dd1be66ab32fa27e0ddef5707fa67ef">00214</a>     <span class="keywordtype">void</span> <a class="code" href="a00240.html#2dd1be66ab32fa27e0ddef5707fa67ef">throw_self</a> () { __TBB_THROW(*<span class="keyword">this</span>); }
<a name="l00215"></a>00215 
<a name="l00216"></a>00216     <span class="comment">/*override*/</span>
<a name="l00217"></a>00217     <span class="keyword">const</span> <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00240.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>() const throw();
<a name="l00218"></a>00218 
<a name="l00219"></a>00219     <span class="comment">/*override*/</span>
<a name="l00220"></a>00220     const <span class="keywordtype">char</span>* __TBB_EXPORTED_METHOD <a class="code" href="a00240.html#6b5988ef74a1fe2a58998d110b3633e0">what</a>() const throw();
<a name="l00221"></a>00221 
<a name="l00222"></a>00222     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD set ( const <span class="keywordtype">char</span>* <a class="code" href="a00240.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>, const <span class="keywordtype">char</span>* info ) throw();
<a name="l00223"></a>00223     <span class="keywordtype">void</span> __TBB_EXPORTED_METHOD clear () throw();
<a name="l00224"></a>00224 
<a name="l00225"></a>00225 private:
<a name="l00227"></a>00227     <a class="code" href="a00240.html">captured_exception</a>() {}
<a name="l00228"></a>00228 
<a name="l00230"></a>00230     <span class="keyword">static</span> captured_exception* allocate ( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00240.html#5af82fd677449c5ca727fa1d7e16f9f5">name</a>, <span class="keyword">const</span> <span class="keywordtype">char</span>* info );
<a name="l00231"></a>00231 
<a name="l00232"></a>00232     <span class="keywordtype">bool</span> my_dynamic;
<a name="l00233"></a>00233     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
<a name="l00234"></a>00234     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_info;
<a name="l00235"></a>00235 };
<a name="l00236"></a>00236 
<a name="l00238"></a>00238 
<a name="l00242"></a>00242 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> ExceptionData&gt;
<a name="l00243"></a><a class="code" href="a00273.html">00243</a> <span class="keyword">class </span><a class="code" href="a00273.html">movable_exception</a> : <span class="keyword">public</span> <a class="code" href="a00319.html">tbb_exception</a>
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245     <span class="keyword">typedef</span> <a class="code" href="a00273.html">movable_exception&lt;ExceptionData&gt;</a> <a class="code" href="a00273.html">self_type</a>;
<a name="l00246"></a>00246 
<a name="l00247"></a>00247 <span class="keyword">public</span>:
<a name="l00248"></a>00248     <a class="code" href="a00273.html">movable_exception</a> ( <span class="keyword">const</span> ExceptionData&amp; data_ )
<a name="l00249"></a>00249         : <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>(data_)
<a name="l00250"></a>00250         , my_dynamic(<span class="keyword">false</span>)
<a name="l00251"></a>00251         , my_exception_name(
<a name="l00252"></a>00252 #<span class="keywordflow">if</span> TBB_USE_EXCEPTIONS
<a name="l00253"></a>00253         <span class="keyword">typeid</span>(<a class="code" href="a00273.html">self_type</a>).<a class="code" href="a00273.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a>()
<a name="l00254"></a>00254 #<span class="keywordflow">else</span> <span class="comment">/* !TBB_USE_EXCEPTIONS */</span>
<a name="l00255"></a>00255         <span class="stringliteral">"movable_exception"</span>
<a name="l00256"></a>00256 #endif <span class="comment">/* !TBB_USE_EXCEPTIONS */</span>
<a name="l00257"></a>00257         )
<a name="l00258"></a>00258     {}
<a name="l00259"></a>00259 
<a name="l00260"></a>00260     <a class="code" href="a00273.html">movable_exception</a> ( <span class="keyword">const</span> <a class="code" href="a00273.html">movable_exception</a>&amp; src ) <span class="keywordflow">throw</span> ()
<a name="l00261"></a>00261         : <a class="code" href="a00319.html">tbb_exception</a>(src)
<a name="l00262"></a>00262         , <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>(src.<a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>)
<a name="l00263"></a>00263         , my_dynamic(<span class="keyword">false</span>)
<a name="l00264"></a>00264         , my_exception_name(src.<a class="code" href="a00273.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>)
<a name="l00265"></a>00265     {}
<a name="l00266"></a>00266 
<a name="l00267"></a>00267     ~<a class="code" href="a00273.html">movable_exception</a> () <span class="keywordflow">throw</span>() {}
<a name="l00268"></a>00268 
<a name="l00269"></a>00269     <span class="keyword">const</span> <a class="code" href="a00273.html">movable_exception</a>&amp; operator= ( <span class="keyword">const</span> <a class="code" href="a00273.html">movable_exception</a>&amp; src ) {
<a name="l00270"></a>00270         <span class="keywordflow">if</span> ( <span class="keyword">this</span> != &amp;src ) {
<a name="l00271"></a>00271             <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a> = src.<a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
<a name="l00272"></a>00272             my_exception_name = src.<a class="code" href="a00273.html#5f5843b501829ff824c9c8d28c8283eb">my_exception_name</a>;
<a name="l00273"></a>00273         }
<a name="l00274"></a>00274         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00275"></a>00275     }
<a name="l00276"></a>00276 
<a name="l00277"></a>00277     ExceptionData&amp; data () <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>; }
<a name="l00278"></a>00278 
<a name="l00279"></a>00279     <span class="keyword">const</span> ExceptionData&amp; data () <span class="keyword">const</span> <span class="keywordflow">throw</span>() { <span class="keywordflow">return</span> <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>; }
<a name="l00280"></a>00280 
<a name="l00281"></a><a class="code" href="a00273.html#bc5f5c4739b17ac5211ac58226c2f5a5">00281</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00273.html#bc5f5c4739b17ac5211ac58226c2f5a5">name</a> () const throw() { <span class="keywordflow">return</span> my_exception_name; }
<a name="l00282"></a>00282 
<a name="l00283"></a><a class="code" href="a00273.html#b33a89bccf0c63106f1270c7bfaaf54f">00283</a>     <span class="comment">/*override*/</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="a00273.html#b33a89bccf0c63106f1270c7bfaaf54f">what</a> () const throw() { <span class="keywordflow">return</span> <span class="stringliteral">"tbb::movable_exception"</span>; }
<a name="l00284"></a>00284 
<a name="l00285"></a>00285     <span class="comment">/*override*/</span>
<a name="l00286"></a><a class="code" href="a00273.html#1aea0ad179d6f0481fe7f3495f66adf9">00286</a>     <a class="code" href="a00273.html">movable_exception</a>* <a class="code" href="a00273.html#1aea0ad179d6f0481fe7f3495f66adf9">move</a> () throw() {
<a name="l00287"></a>00287         <span class="keywordtype">void</span>* e = internal::allocate_via_handler_v3(<span class="keyword">sizeof</span>(<a class="code" href="a00273.html">movable_exception</a>));
<a name="l00288"></a>00288         <span class="keywordflow">if</span> ( e ) {
<a name="l00289"></a>00289             ::new (e) movable_exception(*<span class="keyword">this</span>);
<a name="l00290"></a>00290             ((movable_exception*)e)-&gt;my_dynamic = <span class="keyword">true</span>;
<a name="l00291"></a>00291         }
<a name="l00292"></a>00292         <span class="keywordflow">return</span> (movable_exception*)e;
<a name="l00293"></a>00293     }
<a name="l00294"></a>00294     <span class="comment">/*override*/</span>
<a name="l00295"></a><a class="code" href="a00273.html#7a46873119d9f85a7b0009c13e41a258">00295</a>     <span class="keywordtype">void</span> <a class="code" href="a00273.html#7a46873119d9f85a7b0009c13e41a258">destroy</a> () throw() {
<a name="l00296"></a>00296         __TBB_ASSERT ( my_dynamic, <span class="stringliteral">"Method destroy can be called only on dynamically allocated movable_exceptions"</span> );
<a name="l00297"></a>00297         <span class="keywordflow">if</span> ( my_dynamic ) {
<a name="l00298"></a>00298             this-&gt;~<a class="code" href="a00273.html">movable_exception</a>();
<a name="l00299"></a>00299             internal::deallocate_via_handler_v3(<span class="keyword">this</span>);
<a name="l00300"></a>00300         }
<a name="l00301"></a>00301     }
<a name="l00302"></a>00302     <span class="comment">/*override*/</span>
<a name="l00303"></a><a class="code" href="a00273.html#17cffba35811c92b7e65d63506b69602">00303</a>     <span class="keywordtype">void</span> <a class="code" href="a00273.html#17cffba35811c92b7e65d63506b69602">throw_self</a> () { __TBB_THROW( *<span class="keyword">this</span> ); }
<a name="l00304"></a>00304 
<a name="l00305"></a>00305 <span class="keyword">protected</span>:
<a name="l00307"></a><a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">00307</a>     ExceptionData  <a class="code" href="a00273.html#a8c0ae2089ae784b28907cf748b89416">my_exception_data</a>;
<a name="l00308"></a>00308 
<a name="l00309"></a>00309 <span class="keyword">private</span>:
<a name="l00311"></a>00311     <span class="keywordtype">bool</span> my_dynamic;
<a name="l00312"></a>00312 
<a name="l00314"></a>00314 
<a name="l00315"></a>00315     <span class="keyword">const</span> <span class="keywordtype">char</span>* my_exception_name;
<a name="l00316"></a>00316 };
<a name="l00317"></a>00317 
<a name="l00318"></a>00318 <span class="preprocessor">#if !TBB_USE_CAPTURED_EXCEPTION</span>
<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="keyword">namespace </span>internal {
<a name="l00320"></a>00320 
<a name="l00322"></a>00322 
<a name="l00324"></a><a class="code" href="a00320.html">00324</a> <span class="keyword">class </span><a class="code" href="a00320.html">tbb_exception_ptr</a> {
<a name="l00325"></a>00325     std::exception_ptr  my_ptr;
<a name="l00326"></a>00326 
<a name="l00327"></a>00327 <span class="keyword">public</span>:
<a name="l00328"></a>00328     <span class="keyword">static</span> <a class="code" href="a00320.html">tbb_exception_ptr</a>* allocate ();
<a name="l00329"></a>00329     <span class="keyword">static</span> <a class="code" href="a00320.html">tbb_exception_ptr</a>* allocate ( <span class="keyword">const</span> <a class="code" href="a00319.html">tbb_exception</a>&amp; tag );
<a name="l00331"></a>00331     <span class="keyword">static</span> <a class="code" href="a00320.html">tbb_exception_ptr</a>* allocate ( <a class="code" href="a00240.html">captured_exception</a>&amp; src );
<a name="l00332"></a>00332 
<a name="l00334"></a>00334 
<a name="l00335"></a>00335     <span class="keywordtype">void</span> <a class="code" href="a00320.html#921875bbacd2c8a5f324c7da7a415262">destroy</a> () <span class="keywordflow">throw</span>();
<a name="l00336"></a>00336 
<a name="l00338"></a><a class="code" href="a00320.html#292832fd5c523e3d8081a22247840a1d">00338</a>     <span class="keywordtype">void</span> <a class="code" href="a00320.html#292832fd5c523e3d8081a22247840a1d">throw_self</a> () { std::rethrow_exception(my_ptr); }
<a name="l00339"></a>00339 
<a name="l00340"></a>00340 <span class="keyword">private</span>:
<a name="l00341"></a>00341     <a class="code" href="a00320.html">tbb_exception_ptr</a> ( <span class="keyword">const</span> std::exception_ptr&amp; src ) : my_ptr(src) {}
<a name="l00342"></a>00342     tbb_exception_ptr ( <span class="keyword">const</span> <a class="code" href="a00240.html">captured_exception</a>&amp; src ) : my_ptr(std::copy_exception(src)) {}
<a name="l00343"></a>00343 }; <span class="comment">// class tbb::internal::tbb_exception_ptr</span>
<a name="l00344"></a>00344 
<a name="l00345"></a>00345 } <span class="comment">// namespace internal</span>
<a name="l00346"></a>00346 <span class="preprocessor">#endif </span><span class="comment">/* !TBB_USE_CAPTURED_EXCEPTION */</span>
<a name="l00347"></a>00347 
<a name="l00348"></a>00348 } <span class="comment">// namespace tbb</span>
<a name="l00349"></a>00349 
<a name="l00350"></a>00350 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_TASK_GROUP_CONTEXT */</span>
<a name="l00351"></a>00351 
<a name="l00352"></a>00352 <span class="preprocessor">#endif </span><span class="comment">/* __TBB_exception_H */</span>
</pre></div><hr>
<p></p>
Copyright &copy; 2005-2011 Intel Corporation.  All Rights Reserved.
<p></p>
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
<p></p>
* Other names and brands may be claimed as the property of others.