voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/inc/voipxmlutils.inl
equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009-2010 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 "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: Utilities methods for VoIP XML processor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // --------------------------------------------------------------------------- |
|
21 // Pushes an item to CleanupStack. |
|
22 // --------------------------------------------------------------------------- |
|
23 // |
|
24 template <class T> |
|
25 inline void CleanupResetAndDestroy<T>::PushL( T& aRef ) |
|
26 { |
|
27 CleanupStack::PushL( TCleanupItem( &ResetAndDestroy, &aRef ) ); |
|
28 } |
|
29 |
|
30 // --------------------------------------------------------------------------- |
|
31 // Cleans up an item. |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 template <class T> |
|
35 inline void CleanupResetAndDestroy<T>::ResetAndDestroy( TAny *aPtr ) |
|
36 { |
|
37 ( STATIC_CAST( T*, aPtr ) )->ResetAndDestroy(); |
|
38 ( STATIC_CAST( T*, aPtr ) )->Close(); |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // Calls CleanupResetAndDestroy<T>::PushL |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 template <class T> |
|
46 inline void CleanupResetAndDestroyL( T& aRef ) |
|
47 { |
|
48 CleanupResetAndDestroy<T>::PushL( aRef ); |
|
49 } |
|
50 |
|
51 // End of file. |
|
52 |
|