sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __EUSEREXT_H__ sl@0: #define __EUSEREXT_H__ sl@0: sl@0: sl@0: /** An RRArray subclass intended to hold R classes. sl@0: * sl@0: * When you call close on an RRArray it will do the sane thing and sl@0: * call close on all the R Class objects inside it. sl@0: * sl@0: * @internalTechnology sl@0: */ sl@0: template class RRArray : public RArray sl@0: { sl@0: public: sl@0: /** Constructor */ sl@0: inline RRArray(); sl@0: inline RRArray(TUint aGranularity); sl@0: /** Free all resources, calling Close() on the each element in the array */ sl@0: inline void Close(); sl@0: }; sl@0: sl@0: template sl@0: inline RRArray::RRArray() sl@0: { sl@0: } sl@0: sl@0: template sl@0: inline RRArray::RRArray(TUint aGranularity) : RArray(aGranularity) sl@0: { sl@0: } sl@0: sl@0: template sl@0: inline void RRArray::Close() sl@0: { sl@0: TInt count = RArray::Count(); sl@0: for(TInt ii = 0; ii < count; ii++) sl@0: { sl@0: (*this)[ii].Close(); sl@0: } sl@0: RArray::Close(); sl@0: } sl@0: sl@0: #endif