calendarengines/agnversit2/inc/CleanupPointerArray.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 #ifndef __CleanupPointerArray_H__
       
     2 #define __CleanupPointerArray_H__/*
       
     3 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:   A class for simplifying cleanup of RPointerArrays
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #include "e32base.h"
       
    22 
       
    23 template <class T>
       
    24 inline void CleanupPointerArrayPushL(T& aPtr);
       
    25 
       
    26 /**
       
    27 A class for simplifying the cleanup of RPointerArrays using ResetAndDestroy.
       
    28 @internalTechnology
       
    29 */
       
    30 template <class T>
       
    31 class TCleanupPointerArray
       
    32 	{
       
    33 public: // Interface
       
    34 	static void PushL(T& aRef);
       
    35 private: // Methods
       
    36 	static void ResetAndDestroy(TAny* aPtr);
       
    37 	};
       
    38 
       
    39 #include "CleanupPointerArray.inl"
       
    40 
       
    41 #endif // __CleanupPointerArray_H__
       
    42 
       
    43 // End of file.