os/security/cryptomgmtlibs/securityutils/inc/euserext.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2005-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  @internalTechnology
    24 */
    25 
    26 #ifndef __EUSEREXT_H__
    27 #define __EUSEREXT_H__
    28 
    29 
    30 /** An RRArray subclass intended to hold R classes.  
    31  * 
    32  * When you call close on an RRArray it will do the sane thing and 
    33  * call close on all the R Class objects inside it. 
    34  *
    35  * @internalTechnology
    36  */
    37 template<class T> class RRArray : public RArray<T>
    38 	{
    39 public:
    40 	/** Constructor */
    41 	inline RRArray();
    42 	inline RRArray(TUint aGranularity);
    43 	/** Free all resources, calling Close() on the each element in the array */
    44 	inline void Close();
    45 	};
    46 
    47 template <class T>
    48 inline RRArray<T>::RRArray()
    49 	{
    50 	}
    51 
    52 template <class T>
    53 inline RRArray<T>::RRArray(TUint aGranularity) : RArray<T>(aGranularity)
    54 	{
    55 	}
    56 
    57 template <class T>
    58 inline void RRArray<T>::Close()
    59 	{
    60 	TInt count = RArray<T>::Count();
    61 	for(TInt ii = 0; ii < count; ii++)
    62 		{
    63 		(*this)[ii].Close();
    64 		}
    65 	RArray<T>::Close();
    66 	}
    67 
    68 #endif