brandingserver/Inc/rbsobjowningptrarray.h
changeset 31 9dbc70490d9a
equal deleted inserted replaced
30:1fa9b890f29c 31:9dbc70490d9a
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  RBSOBJOWNINGPTRaRRAY.H
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _RBSOBJOWNINGPTRARRAY_H
       
    20 #define _RBSOBJOWNINGPTRARRAY_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 
       
    25 
       
    26 /**
       
    27  * Templated array of pointers. Array owns the pointed objects
       
    28  * and overwrites the normal RPointerArray::Close()
       
    29  * behaviour to destroy objects, before reseting the
       
    30  * array contents.
       
    31  *
       
    32  * Array is used with Presence Framework interface objects.
       
    33  *
       
    34  * @since S60 v3.2
       
    35  */
       
    36 template< class T >
       
    37 class RBSObjOwningPtrArray : public RPointerArray<T>
       
    38     {
       
    39  public:
       
    40 
       
    41     /**
       
    42      * Default C++ constructor.
       
    43      */
       
    44     inline RBSObjOwningPtrArray();
       
    45 
       
    46 
       
    47     /**
       
    48      * Overwritten Close().
       
    49      *
       
    50      * Calls ResetAndDestroy() to delete holded objects
       
    51      * before reseting array contents. Thus array can be
       
    52      * pushed on the cleanup stack with CleanupClosePushL().
       
    53      */
       
    54     inline void Close();
       
    55     };
       
    56 
       
    57 
       
    58 
       
    59 
       
    60 #include "rbsobjowningptrarray.inl"
       
    61 
       
    62 #endif // _RBSOBJOWNINGPTRARRAY_H
       
    63 
       
    64 
       
    65