diff -r 000000000000 -r bde4ae8d615e os/security/cryptomgmtlibs/securityutils/inc/euserext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/security/cryptomgmtlibs/securityutils/inc/euserext.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + + +/** + @file + @internalTechnology +*/ + +#ifndef __EUSEREXT_H__ +#define __EUSEREXT_H__ + + +/** An RRArray subclass intended to hold R classes. + * + * When you call close on an RRArray it will do the sane thing and + * call close on all the R Class objects inside it. + * + * @internalTechnology + */ +template class RRArray : public RArray + { +public: + /** Constructor */ + inline RRArray(); + inline RRArray(TUint aGranularity); + /** Free all resources, calling Close() on the each element in the array */ + inline void Close(); + }; + +template +inline RRArray::RRArray() + { + } + +template +inline RRArray::RRArray(TUint aGranularity) : RArray(aGranularity) + { + } + +template +inline void RRArray::Close() + { + TInt count = RArray::Count(); + for(TInt ii = 0; ii < count; ii++) + { + (*this)[ii].Close(); + } + RArray::Close(); + } + +#endif