cryptomgmtlibs/cryptotokenfw/inc/ct/RCPointerArray.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2001-2009 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @publishedAll
       
    24  @released
       
    25 */
       
    26 
       
    27 
       
    28 #ifndef __RCPOINTERARRAY_H
       
    29 #define __RCPOINTERARRAY_H
       
    30 #include <e32cmn.h>
       
    31 
       
    32 /** 
       
    33  * An array of pointers to objects, that adds close type behaviour.
       
    34  *
       
    35  * For use with C class pointers that are owned by the array. 
       
    36  * @see RCPointerArray
       
    37  * @since v7.0 
       
    38  */
       
    39 template<class T> class RCPointerArray : public RPointerArray<T>
       
    40 	{
       
    41  public:
       
    42 	/** Constructor */
       
    43 	inline RCPointerArray();
       
    44 	/** Closes the array and frees all resources (including deleting objects in the array). */
       
    45 	inline void Close();
       
    46 	};
       
    47 
       
    48 /** Default constructor. */
       
    49 template <class T>
       
    50 inline RCPointerArray<T>::RCPointerArray()
       
    51 	{
       
    52 	}
       
    53 
       
    54 /**
       
    55  * Closes the array and frees all resources; this includes deleting the objects 
       
    56  * whose pointers are held by the array (i.e. it's the same as ResetAndDestroy()).
       
    57  */
       
    58 template <class T>
       
    59 inline void RCPointerArray<T>::Close()
       
    60 	{
       
    61 	this->ResetAndDestroy();
       
    62 	}
       
    63 
       
    64 #endif