ncdengine/inc/catalogsarray.inl
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:23:31 +0300
changeset 53 ae54820ef82c
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* 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<T>()
    {
    }


template< class T >
RCatalogsArray< T >::RCatalogsArray( TInt aGranularity ) 
    : RPointerArray<T>( 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<RPointerArray< T >::Count(); i++ )
        {
        (*this)[i]->Release();
        }
    RPointerArray< T >::Reset();
    }

#endif // R_CATALOGS_ARRAY_INL