diff -r 000000000000 -r ba25891c3a9e ncdengine/inc/catalogsarray.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncdengine/inc/catalogsarray.inl Thu Dec 17 08:51:10 2009 +0200 @@ -0,0 +1,54 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: Contains definition of Catalogs interface pointer array +* +*/ + + +#ifndef R_CATALOGS_ARRAY_INL +#define R_CATALOGS_ARRAY_INL + +template< class T > +RCatalogsArray< T >::RCatalogsArray() + : RPointerArray() + { + } + + +template< class T > +RCatalogsArray< T >::RCatalogsArray( TInt aGranularity ) + : RPointerArray( aGranularity ) + { + } + +/** + * Empties the array and releases the referenced objects. + * + * It frees all memory allocated to the array and resets the internal state so + * that it is ready to be reused. The function also calls Release() on all of + * the objects whose pointers are contained by the array. + * This array object can be allowed to go out of scope after a call to this + * function. + */ +template< class T > +void RCatalogsArray< T >::ResetAndDestroy() + { + for( TInt i=0; i::Count(); i++ ) + { + (*this)[i]->Release(); + } + RPointerArray< T >::Reset(); + } + +#endif // R_CATALOGS_ARRAY_INL