sl@0: /* sl@0: * Copyright (c) 2001-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: @file sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef __RCPOINTERARRAY_H sl@0: #define __RCPOINTERARRAY_H sl@0: #include sl@0: sl@0: /** sl@0: * An array of pointers to objects, that adds close type behaviour. sl@0: * sl@0: * For use with C class pointers that are owned by the array. sl@0: * @see RCPointerArray sl@0: * @since v7.0 sl@0: */ sl@0: template class RCPointerArray : public RPointerArray sl@0: { sl@0: public: sl@0: /** Constructor */ sl@0: inline RCPointerArray(); sl@0: /** Closes the array and frees all resources (including deleting objects in the array). */ sl@0: inline void Close(); sl@0: }; sl@0: sl@0: /** Default constructor. */ sl@0: template sl@0: inline RCPointerArray::RCPointerArray() sl@0: { sl@0: } sl@0: sl@0: /** sl@0: * Closes the array and frees all resources; this includes deleting the objects sl@0: * whose pointers are held by the array (i.e. it's the same as ResetAndDestroy()). sl@0: */ sl@0: template sl@0: inline void RCPointerArray::Close() sl@0: { sl@0: this->ResetAndDestroy(); sl@0: } sl@0: sl@0: #endif