localconnectivityservice/obexsendservices/obexservicesendutils/inc/BTServiceUtils.inl
branchRCL_3
changeset 39 4096754ee773
parent 38 3dcb815346df
child 40 52a167391590
equal deleted inserted replaced
38:3dcb815346df 39:4096754ee773
     1 /*
       
     2 * Copyright (c) 2002 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:  Inline methods for BTSU.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <e32base.h>
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CleanupResetAndDestroy<T>::PushL
       
    27 // -----------------------------------------------------------------------------
       
    28 //
       
    29 template <class T> inline void CleanupResetAndDestroy<T>::PushL( T& aRef )
       
    30     {
       
    31     CleanupStack::PushL( TCleanupItem( &ResetAndDestroy, &aRef ) );
       
    32     }
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CleanupResetAndDestroy<T>::ResetAndDestroy
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 template <class T> void CleanupResetAndDestroy<T>::ResetAndDestroy( TAny *aPtr )
       
    39     {
       
    40     ( STATIC_CAST( T*, aPtr) )->ResetAndDestroy();
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CleanupResetAndDestroyPushL
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 template <class T> inline void CleanupResetAndDestroyPushL( T& aRef )
       
    48     {
       
    49     CleanupResetAndDestroy<T>::PushL( aRef );
       
    50     }
       
    51             
       
    52 // End of File