stif/stif_plat/inc/RRefArray.h
changeset 0 a03f92240627
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     1 /*
       
     2 * Copyright (c) 2009 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: This file contains the header file of the STIF util
       
    15 * class RRefArray.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef RREFARRAY_H
       
    20 #define RREFARRAY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 /**
       
    27 * Array class for references.
       
    28 */
       
    29 template <class T>
       
    30 class RRefArray
       
    31     :public RPointerArrayBase
       
    32     {
       
    33     public:
       
    34         inline RRefArray():RPointerArrayBase(){};
       
    35     	inline void Close(){ RPointerArrayBase::Close(); };
       
    36     	inline TInt Count() const{ return RPointerArrayBase::Count(); };
       
    37     	inline T const& operator[](TInt anIndex) const 
       
    38     	    { return *( ( T* ) At(anIndex)); };
       
    39     	inline T& operator[](TInt anIndex) 
       
    40     	    { return *( ( T* ) At(anIndex)); };
       
    41     	inline TInt Append( T const& anEntry )
       
    42     	    { return RPointerArrayBase::Append(( TAny*) &anEntry); };
       
    43     	inline TInt Insert( T const& anEntry, TInt aPos )
       
    44     	    { return RPointerArrayBase::Insert(( TAny*) &anEntry, aPos ); };
       
    45     	inline void Remove( TInt anIndex ) 
       
    46     	    { RPointerArrayBase::Remove( anIndex ); };
       
    47     	inline void Reset(){ RPointerArrayBase::Reset(); };
       
    48     private:
       
    49         RArray<TAny*> iArray;
       
    50     };
       
    51 
       
    52 
       
    53 #endif // RREFARRAY_H
       
    54 
       
    55 // End of File