| XMP Toolkit SDK 6.0.0

TWrapperFunctions2.h
Go to the documentation of this file.
1 #ifndef TWrapperFunctions2_h__
2 #define TWrapperFunctions2_h__ 1
3
4 // =================================================================================================
5 // Copyright Adobe
6 // Copyright 2015 Adobe
7 // All Rights Reserved
8 //
9 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
10 // of the Adobe license agreement accompanying it. If you have received this file from a source other
11 // than Adobe, then your use, modification, or distribution of it requires the prior written permission
12 // of Adobe.
13 // =================================================================================================
14
16 namespace AdobeXMPCommon {
17 template < typename className >
18 void CallSafeFunctionReturningVoid( className * ptr,
19 void ( APICALL className::*Func )( pcIError_base & ) )
20 {
21 pcIError_base error( NULL );
22 ( ptr->*Func )( error );
23 if ( error ) throw IError::MakeShared( error );
24 }
25
26 template< typename className, typename t1 >
27 void CallSafeFunctionReturningVoid( className * ptr,
28 void ( APICALL className::*Func )( t1, pcIError_base & ), t1 v1 )
29 {
30 pcIError_base error( NULL );
31 ( ptr->*Func )( v1, error );
32 if ( error ) throw IError::MakeShared( error );
33 }
34
35 template< typename className, typename t1, typename t2 >
36 void CallSafeFunctionReturningVoid( className * ptr,
37 void ( APICALL className::*Func )( t1, t2, pcIError_base & ), t1 v1, t2 v2 )
38 {
39 pcIError_base error( NULL );
40 ( ptr->*Func )( v1, v2, error );
41 if ( error ) throw IError::MakeShared( error );
42 }
43
44 template< typename className, typename t1, typename t2, typename t3 >
45 void CallSafeFunctionReturningVoid( className * ptr,
46 void ( APICALL className::*Func )( t1, t2, t3, pcIError_base & ), t1 v1, t2 v2, t3 v3 )
47 {
48 pcIError_base error( NULL );
49 ( ptr->*Func )( v1, v2, v3, error );
50 if ( error ) throw IError::MakeShared( error );
51 }
52
53 template< typename className, typename t1, typename t2, typename t3, typename t4 >
54 void CallSafeFunctionReturningVoid( className * ptr,
55 void ( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4 )
56 {
57 pcIError_base error( NULL );
58 ( ptr->*Func )( v1, v2, v3, v4, error );
59 if ( error ) throw IError::MakeShared( error );
60 }
61
62 template< typename className, typename t1, typename t2, typename t3, typename t4, typename t5 >
63 void CallSafeFunctionReturningVoid( className * ptr,
64 void ( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
65 {
66 pcIError_base error( NULL );
67 ( ptr->*Func )( v1, v2, v3, v4, v5, error );
68 if ( error ) throw IError::MakeShared( error );
69 }
70
71 template< typename className, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6 >
72 void CallSafeFunctionReturningVoid( className * ptr,
73 void ( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6 )
74 {
75 pcIError_base error( NULL );
76 ( ptr->*Func )( v1, v2, v3, v4, v5, error );
77 if ( error ) throw IError::MakeShared( error );
78 }
79
80 template < typename className >
81 void CallConstSafeFunctionReturningVoid( const className * const ptr,
82 void ( APICALL className::*Func )( pcIError_base & ) const )
83 {
84 pcIError_base error( NULL );
85 ( ptr->*Func )( error );
86 if ( error ) throw IError::MakeShared( error );
87 }
88
89 template < typename className, typename t1 >
90 void CallConstSafeFunctionReturningVoid( const className * const ptr,
91 void ( APICALL className::*Func )( t1, pcIError_base & ) const, t1 v1 )
92 {
93 pcIError_base error( NULL );
94 ( ptr->*Func )( v1, error );
95 if ( error ) throw IError::MakeShared( error );
96 }
97
98 template < typename className, typename t1, typename t2 >
99 void CallConstSafeFunctionReturningVoid( const className * const ptr,
100 void ( APICALL className::*Func )( t1, t2, pcIError_base & ) const, t1 v1, t2 v2 )
101 {
102 pcIError_base error( NULL );
103 ( ptr->*Func )( v1, v2, error );
104 if ( error ) throw IError::MakeShared( error );
105 }
106
107 template < typename className, typename t1, typename t2, typename t3 >
108 void CallConstSafeFunctionReturningVoid( const className * const ptr,
109 void ( APICALL className::*Func )( t1, t2, t3, pcIError_base & ) const, t1 v1, t2 v2, t3 v3 )
110 {
111 pcIError_base error( NULL );
112 ( ptr->*Func )( v1, v2, v3, error );
113 if ( error ) throw IError::MakeShared( error );
114 }
115
116 template < typename className, typename t1, typename t2, typename t3, typename t4 >
117 void CallConstSafeFunctionReturningVoid( const className * const ptr,
118 void ( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4 )
119 {
120 pcIError_base error( NULL );
121 ( ptr->*Func )( v1, v2, v3, v4, error );
122 if ( error ) throw IError::MakeShared( error );
123 }
124
125 template < typename className, typename t1, typename t2, typename t3, typename t4, typename t5 >
126 void CallConstSafeFunctionReturningVoid( const className * const ptr,
127 void ( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
128 {
129 pcIError_base error( NULL );
130 ( ptr->*Func )( v1, v2, v3, v4, v5, error );
131 if ( error ) throw IError::MakeShared( error );
132 }
133
134
135 template < typename className, typename returnType, typename internalReturnType >
136 returnType CallSafeFunction( className * ptr,
137 internalReturnType ( APICALL className::*Func )( pcIError_base & ) )
138 {
139 pcIError_base error( NULL );
140 internalReturnType returnValue = (ptr->*Func)( error );
141 if ( error ) throw IError::MakeShared( error );
142 #if XMP_WinBuild
143 #pragma warning( push )
144 #pragma warning( disable : 4800 )
145 #endif
146 return static_cast< returnType >( returnValue );
147 #if XMP_WinBuild
148 #pragma warning( pop )
149 #endif
150 }
151
152 template < typename className, typename returnType, typename internalReturnType, typename t1 >
153 returnType CallSafeFunction( className * ptr,
154 internalReturnType ( APICALL className::*Func )( t1, pcIError_base & ), t1 v1 )
155 {
156 pcIError_base error( NULL );
157 internalReturnType returnValue = (ptr->*Func)( v1, error );
158 if ( error ) throw IError::MakeShared( error );
159 #if XMP_WinBuild
160 #pragma warning( push )
161 #pragma warning( disable : 4800 )
162 #endif
163 return static_cast< returnType >( returnValue );
164 #if XMP_WinBuild
165 #pragma warning( pop )
166 #endif
167 }
168
169 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2 >
170 returnType CallSafeFunction( className * ptr,
171 internalReturnType ( APICALL className::*Func )( t1, t2, pcIError_base & ), t1 v1, t2 v2 )
172 {
173 pcIError_base error( NULL );
174 internalReturnType returnValue = (ptr->*Func)( v1, v2, error );
175 if ( error ) throw IError::MakeShared( error );
176 #if XMP_WinBuild
177 #pragma warning( push )
178 #pragma warning( disable : 4800 )
179 #endif
180 return static_cast< returnType >( returnValue );
181 #if XMP_WinBuild
182 #pragma warning( pop )
183 #endif
184 }
185
186 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3 >
187 returnType CallSafeFunction( className * ptr,
188 internalReturnType( APICALL className::*Func )( t1, t2, t3, pcIError_base & ), t1 v1, t2 v2, t3 v3 )
189 {
190 pcIError_base error( NULL );
191 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, error );
192 if ( error ) throw IError::MakeShared( error );
193 #if XMP_WinBuild
194 #pragma warning( push )
195 #pragma warning( disable : 4800 )
196 #endif
197 return static_cast< returnType >( returnValue );
198 #if XMP_WinBuild
199 #pragma warning( pop )
200 #endif
201 }
202
203 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4 >
204 returnType CallSafeFunction( className * ptr,
205 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4 )
206 {
207 pcIError_base error( NULL );
208 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, error );
209 if ( error ) throw IError::MakeShared( error );
210 #if XMP_WinBuild
211 #pragma warning( push )
212 #pragma warning( disable : 4800 )
213 #endif
214 return static_cast< returnType >( returnValue );
215 #if XMP_WinBuild
216 #pragma warning( pop )
217 #endif
218 }
219
220 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5 >
221 returnType CallSafeFunction( className * ptr,
222 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
223 {
224 pcIError_base error( NULL );
225 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, error );
226 if ( error ) throw IError::MakeShared( error );
227 #if XMP_WinBuild
228 #pragma warning( push )
229 #pragma warning( disable : 4800 )
230 #endif
231 return static_cast< returnType >( returnValue );
232 #if XMP_WinBuild
233 #pragma warning( pop )
234 #endif
235 }
236
237 // Fixing AML build on mac
238
239 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6 >
240 returnType CallSafeFunction( className * ptr,
241 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6 )
242 {
243 pcIError_base error( NULL );
244 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, v6, error );
245 if ( error ) throw IError::MakeShared( error );
246 #if XMP_WinBuild
247 #pragma warning( push )
248 #pragma warning( disable : 4800 )
249 #endif
250 return static_cast< returnType >( returnValue );
251 #if XMP_WinBuild
252 #pragma warning( pop )
253 #endif
254 }
255
256 template < typename className, typename returnType, typename internalReturnType >
257 returnType CallConstSafeFunction( const className * const ptr,
258 internalReturnType ( APICALL className::*Func )( pcIError_base & ) const )
259 {
260 pcIError_base error( NULL );
261 internalReturnType returnValue = (ptr->*Func)( error );
262 if ( error ) throw IError::MakeShared( error );
263 #if XMP_WinBuild
264 #pragma warning( push )
265 #pragma warning( disable : 4800 )
266 #endif
267 return static_cast< returnType >( returnValue );
268 #if XMP_WinBuild
269 #pragma warning( pop )
270 #endif
271 }
272
273 template < typename className, typename returnType, typename internalReturnType, typename t1 >
274 returnType CallConstSafeFunction( const className * const ptr,
275 internalReturnType ( APICALL className::*Func )( t1, pcIError_base & ) const, t1 v1 )
276 {
277 pcIError_base error( NULL );
278 internalReturnType returnValue = (ptr->*Func)( v1, error );
279 if ( error ) throw IError::MakeShared( error );
280 #if XMP_WinBuild
281 #pragma warning( push )
282 #pragma warning( disable : 4800 )
283 #endif
284 return static_cast< returnType >( returnValue );
285 #if XMP_WinBuild
286 #pragma warning( pop )
287 #endif
288 }
289
290 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2 >
291 returnType CallConstSafeFunction( const className * const ptr,
292 internalReturnType ( APICALL className::*Func )( t1, t2, pcIError_base & ) const, t1 v1, t2 v2 )
293 {
294 pcIError_base error( NULL );
295 internalReturnType returnValue = (ptr->*Func)( v1, v2, error );
296 if ( error ) throw IError::MakeShared( error );
297 #if XMP_WinBuild
298 #pragma warning( push )
299 #pragma warning( disable : 4800 )
300 #endif
301 return static_cast< returnType >( returnValue );
302 #if XMP_WinBuild
303 #pragma warning( pop )
304 #endif
305 }
306
307 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3 >
308 returnType CallConstSafeFunction( const className * const ptr,
309 internalReturnType ( APICALL className::*Func )( t1, t2, t3, pcIError_base & ) const, t1 v1, t2 v2, t3 v3 )
310 {
311 pcIError_base error( NULL );
312 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, error );
313 if ( error ) throw IError::MakeShared( error );
314 #if XMP_WinBuild
315 #pragma warning( push )
316 #pragma warning( disable : 4800 )
317 #endif
318 return static_cast< returnType >( returnValue );
319 #if XMP_WinBuild
320 #pragma warning( pop )
321 #endif
322 }
323
324 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4 >
325 returnType CallConstSafeFunction( const className * const ptr,
326 internalReturnType ( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4 )
327 {
328 pcIError_base error( NULL );
329 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, v4, error );
330 if ( error ) throw IError::MakeShared( error );
331 #if XMP_WinBuild
332 #pragma warning( push )
333 #pragma warning( disable : 4800 )
334 #endif
335 return static_cast< returnType >( returnValue );
336 #if XMP_WinBuild
337 #pragma warning( pop )
338 #endif
339 }
340
341 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5 >
342 returnType CallConstSafeFunction( const className * const ptr,
343 internalReturnType ( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
344 {
345 pcIError_base error( NULL );
346 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, v4, v5, error );
347 if ( error ) throw IError::MakeShared( error );
348 #if XMP_WinBuild
349 #pragma warning( push )
350 #pragma warning( disable : 4800 )
351 #endif
352 return static_cast< returnType >( returnValue );
353 #if XMP_WinBuild
354 #pragma warning( pop )
355 #endif
356 }
357
358 //Fixing AML build on mac
359
360 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6 >
361 returnType CallConstSafeFunction( const className * const ptr,
362 internalReturnType ( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6 )
363 {
364 pcIError_base error( NULL );
365 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, v4, v5, v6, error );
366 if ( error ) throw IError::MakeShared( error );
367 #if XMP_WinBuild
368 #pragma warning( push )
369 #pragma warning( disable : 4800 )
370 #endif
371 return static_cast< returnType >( returnValue );
372 #if XMP_WinBuild
373 #pragma warning( pop )
374 #endif
375 }
376
377 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7 >
378 returnType CallConstSafeFunction( const className * const ptr,
379 internalReturnType ( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, t7, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6, t7 v7 )
380 {
381 pcIError_base error( NULL );
382 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, v4, v5, v6, v7, error );
383 if ( error ) throw IError::MakeShared( error );
384 #if XMP_WinBuild
385 #pragma warning( push )
386 #pragma warning( disable : 4800 )
387 #endif
388 return static_cast< returnType >( returnValue );
389 #if XMP_WinBuild
390 #pragma warning( pop )
391 #endif
392 }
393
394
395 template < typename className, typename returnType, typename internalReturnType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9 >
396 returnType CallConstSafeFunction( const className * const ptr,
397 internalReturnType ( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, t7, t8, t9, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6, t7 v7, t8 v8, t9 v9 )
398 {
399 pcIError_base error( NULL );
400 internalReturnType returnValue = (ptr->*Func)( v1, v2, v3, v4, v5, v6, v7, v8, v9, error );
401 if ( error ) throw IError::MakeShared( error );
402 #if XMP_WinBuild
403 #pragma warning( push )
404 #pragma warning( disable : 4800 )
405 #endif
406 return static_cast< returnType >( returnValue );
407 #if XMP_WinBuild
408 #pragma warning( pop )
409 #endif
410 }
411
412
413
414 template < typename className, typename internalReturnType, typename sharedPointerType >
415 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
416 internalReturnType( APICALL className::*Func )( pcIError_base & ) )
417 {
418 pcIError_base error( NULL );
419 internalReturnType returnValue = ( ptr->*Func )( error );
420 if ( error ) throw IError::MakeShared( error );
421 return sharedPointerType::MakeShared( returnValue );
422 }
423
424 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1 >
425 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
426 internalReturnType( APICALL className::*Func )( t1, pcIError_base & ), t1 v1 )
427 {
428 pcIError_base error( NULL );
429 internalReturnType returnValue = ( ptr->*Func )( v1, error );
430 if ( error ) throw IError::MakeShared( error );
431 return sharedPointerType::MakeShared( returnValue );
432 }
433
434 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2 >
435 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
436 internalReturnType( APICALL className::*Func )( t1, t2, pcIError_base & ), t1 v1, t2 v2 )
437 {
438 pcIError_base error( NULL );
439 internalReturnType returnValue = ( ptr->*Func )( v1, v2, error );
440 if ( error ) throw IError::MakeShared( error );
441 return sharedPointerType::MakeShared( returnValue );
442 }
443
444 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3 >
445 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
446 internalReturnType( APICALL className::*Func )( t1, t2, t3, pcIError_base & ), t1 v1, t2 v2, t3 v3 )
447 {
448 pcIError_base error( NULL );
449 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, error );
450 if ( error ) throw IError::MakeShared( error );
451 return sharedPointerType::MakeShared( returnValue );
452 }
453
454 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4 >
455 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
456 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4 )
457 {
458 pcIError_base error( NULL );
459 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, error );
460 if ( error ) throw IError::MakeShared( error );
461 return sharedPointerType::MakeShared( returnValue );
462 }
463
464 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4, typename t5 >
465 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
466 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
467 {
468 pcIError_base error( NULL );
469 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, error );
470 if ( error ) throw IError::MakeShared( error );
471 return sharedPointerType::MakeShared( returnValue );
472 }
473
474 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6 >
475 shared_ptr< sharedPointerType > CallSafeFunctionReturningPointer( className * ptr,
476 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, pcIError_base & ), t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6 )
477 {
478 pcIError_base error( NULL );
479 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, v6, error );
480 if ( error ) throw IError::MakeShared( error );
481 return sharedPointerType::MakeShared( returnValue );
482 }
483
484 template < typename className, typename internalReturnType, typename sharedPointerType >
485 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
486 internalReturnType( APICALL className::*Func )( pcIError_base & ) const )
487 {
488 pcIError_base error( NULL );
489 internalReturnType returnValue = ( ptr->*Func )( error );
490 if ( error ) throw IError::MakeShared( error );
491 return sharedPointerType::MakeShared( returnValue );
492 }
493
494 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1 >
495 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
496 internalReturnType( APICALL className::*Func )( t1, pcIError_base & ) const, t1 v1 )
497 {
498 pcIError_base error( NULL );
499 internalReturnType returnValue = ( ptr->*Func )( v1, error );
500 if ( error ) throw IError::MakeShared( error );
501 return sharedPointerType::MakeShared( returnValue );
502 }
503
504 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2 >
505 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
506 internalReturnType( APICALL className::*Func )( t1, t2, pcIError_base & ) const, t1 v1, t2 v2 )
507 {
508 pcIError_base error( NULL );
509 internalReturnType returnValue = ( ptr->*Func )( v1, v2, error );
510 if ( error ) throw IError::MakeShared( error );
511 return sharedPointerType::MakeShared( returnValue );
512 }
513
514 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3 >
515 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
516 internalReturnType( APICALL className::*Func )( t1, t2, t3, pcIError_base & ) const, t1 v1, t2 v2, t3 v3 )
517 {
518 pcIError_base error( NULL );
519 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, error );
520 if ( error ) throw IError::MakeShared( error );
521 return sharedPointerType::MakeShared( returnValue );
522 }
523
524 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4 >
525 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
526 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4 )
527 {
528 pcIError_base error( NULL );
529 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, error );
530 if ( error ) throw IError::MakeShared( error );
531 return sharedPointerType::MakeShared( returnValue );
532 }
533
534 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4, typename t5 >
535 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
536 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5 )
537 {
538 pcIError_base error( NULL );
539 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, error );
540 if ( error ) throw IError::MakeShared( error );
541 return sharedPointerType::MakeShared( returnValue );
542 }
543
544 template < typename className, typename internalReturnType, typename sharedPointerType, typename t1, typename t2, typename t3, typename t4, typename t5, typename t6 >
545 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer( const className * const ptr,
546 internalReturnType( APICALL className::*Func )( t1, t2, t3, t4, t5, t6, pcIError_base & ) const, t1 v1, t2 v2, t3 v3, t4 v4, t5 v5, t6 v6 )
547 {
548 pcIError_base error( NULL );
549 internalReturnType returnValue = ( ptr->*Func )( v1, v2, v3, v4, v5, v6, error );
550 if ( error ) throw IError::MakeShared( error );
551 return sharedPointerType::MakeShared( returnValue );
552 }
553
554 template < typename className , typename internalReturnType , typename sharedPointerType , typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 , typename t7 , typename t8 >
555 shared_ptr< sharedPointerType > CallConstSafeFunctionReturningPointer ( const className * const ptr ,
556 internalReturnType ( APICALL className::*Func )(t1 , t2 , t3 , t4 , t5 , t6 , t7, t8 , pcIError_base &) const , t1 v1 , t2 v2 , t3 v3 , t4 v4 , t5 v5 , t6 v6 , t7 v7 , t8 v8 )
557 {
558 pcIError_base error ( NULL );
559 internalReturnType returnValue = (ptr->*Func)(v1 , v2 , v3 , v4 , v5 , v6 , v7 , v8 , error);
560 if ( error ) throw IError::MakeShared ( error );
561 return sharedPointerType::MakeShared ( returnValue );
562 }
563 }
565 #endif // TWrapperFunctions2_h__
566
AdobeXMPCommon
Definition: IConfigurable.h:21
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64