brandingserver/inc/rbsobjowningptrarray.h
changeset 0 e6b17d312c8b
child 21 cfd5c2994f10
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     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 "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 #ifndef _RBSOBJOWNINGPTRARRAY_H
       
    19 #define _RBSOBJOWNINGPTRARRAY_H
       
    20 
       
    21 #include <e32std.h>
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  * Templated array of pointers. Array owns the pointed objects
       
    27  * and overwrites the normal RPointerArray::Close()
       
    28  * behaviour to destroy objects, before reseting the
       
    29  * array contents.
       
    30  *
       
    31  * Array is used with Presence Framework interface objects.
       
    32  *
       
    33  * @since S60 v3.2
       
    34  */
       
    35 template< class T >
       
    36 class RBSObjOwningPtrArray : public RPointerArray<T>
       
    37     {
       
    38  public:
       
    39 
       
    40     /**
       
    41      * Default C++ constructor.
       
    42      */
       
    43     inline RBSObjOwningPtrArray();
       
    44 
       
    45 
       
    46     /**
       
    47      * Overwritten Close().
       
    48      *
       
    49      * Calls ResetAndDestroy() to delete holded objects
       
    50      * before reseting array contents. Thus array can be
       
    51      * pushed on the cleanup stack with CleanupClosePushL().
       
    52      */
       
    53     inline void Close();
       
    54     };
       
    55 
       
    56 
       
    57 
       
    58 
       
    59 #include "rbsobjowningptrarray.inl"
       
    60 
       
    61 #endif // _RBSOBJOWNINGPTRARRAY_H
       
    62 
       
    63 
       
    64