CFavouritesItemList Class Reference

#include <mw/favouritesitemlist.h>

Link against: FavouritesEngine.lib

class CFavouritesItemList : public CArrayPtrFlat< CFavouritesItem >

Inherits from

  • CFavouritesItemList
    Public Member Type Definitions
    typedef TInt(* ComparisonFuncL
    Public Member Functions
    CFavouritesItemList()
    virtual ~CFavouritesItemList()
    IMPORT_C voidDelete(TInt)
    IMPORT_C voidDelete(TInt, TInt)
    voidExternalizeL(RWriteStream &)
    IMPORT_C TIntIndexToUid(TInt)
    voidInternalizeL(RReadStream &)
    IMPORT_C const CFavouritesItem *ItemByUid(TInt)
    IMPORT_C voidSortL(ComparisonFuncL)
    IMPORT_C TIntUidToIndex(TInt)
    Inherited Functions
    CArrayFix< CFavouritesItem * >::AppendL(const CFavouritesItem *&)
    CArrayFix< CFavouritesItem * >::AppendL(const CFavouritesItem *&,TInt)
    CArrayFix< CFavouritesItem * >::AppendL(const CFavouritesItem **,TInt)
    CArrayFix< CFavouritesItem * >::Array()const
    CArrayFix< CFavouritesItem * >::At(TInt)
    CArrayFix< CFavouritesItem * >::At(TInt)const
    CArrayFix< CFavouritesItem * >::Back(TInt)
    CArrayFix< CFavouritesItem * >::Back(TInt)const
    CArrayFix< CFavouritesItem * >::CArrayFix(TBufRep,TInt)
    CArrayFix< CFavouritesItem * >::End(TInt)
    CArrayFix< CFavouritesItem * >::End(TInt)const
    CArrayFix< CFavouritesItem * >::ExpandL(TInt)
    CArrayFix< CFavouritesItem * >::ExtendL()
    CArrayFix< CFavouritesItem * >::Find(const CFavouritesItem *&,TKeyArrayFix &,TInt &)const
    CArrayFix< CFavouritesItem * >::FindIsq(const CFavouritesItem *&,TKeyArrayFix &,TInt &)const
    CArrayFix< CFavouritesItem * >::InsertIsqAllowDuplicatesL(const CFavouritesItem *&,TKeyArrayFix &)
    CArrayFix< CFavouritesItem * >::InsertIsqL(const CFavouritesItem *&,TKeyArrayFix &)
    CArrayFix< CFavouritesItem * >::InsertL(TInt,const CFavouritesItem *&)
    CArrayFix< CFavouritesItem * >::InsertL(TInt,const CFavouritesItem *&,TInt)
    CArrayFix< CFavouritesItem * >::InsertL(TInt,const CFavouritesItem **,TInt)
    CArrayFix< CFavouritesItem * >::ResizeL(TInt)
    CArrayFix< CFavouritesItem * >::ResizeL(TInt,const CFavouritesItem *&)
    CArrayFix< CFavouritesItem * >::operator[](TInt)
    CArrayFix< CFavouritesItem * >::operator[](TInt)const
    CArrayFixBase::AtR(const CBase *,TInt)
    CArrayFixBase::CArrayFixBase(TBufRep,TInt,TInt)
    CArrayFixBase::Compress()
    CArrayFixBase::Count()const
    CArrayFixBase::CountR(const CBase *)
    CArrayFixBase::Find(const TAny *,TKeyArrayFix &,TInt &)const
    CArrayFixBase::FindIsq(const TAny *,TKeyArrayFix &,TInt &)const
    CArrayFixBase::InsertIsqAllowDuplicatesL(const TAny *,TKeyArrayFix &)
    CArrayFixBase::InsertIsqL(const TAny *,TKeyArrayFix &)
    CArrayFixBase::InsertL(TInt,const TAny *)
    CArrayFixBase::InsertL(TInt,const TAny *,TInt)
    CArrayFixBase::InsertRepL(TInt,const TAny *,TInt)
    CArrayFixBase::Length()const
    CArrayFixBase::Reset()
    CArrayFixBase::ResizeL(TInt,const TAny *)
    CArrayFixBase::SetKey(TKeyArrayFix &)const
    CArrayFixBase::SetReserveFlatL(TInt)
    CArrayFixBase::Sort(TKeyArrayFix &)
    CArrayFixBase::~CArrayFixBase()
    CArrayPtr< CFavouritesItem >::CArrayPtr(TBufRep,TInt)
    CArrayPtr< CFavouritesItem >::ResetAndDestroy()
    CArrayPtrFlat< CFavouritesItem >::CArrayPtrFlat(TInt)
    CArrayPtrFlat< CFavouritesItem >::SetReserveL(TInt)
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    CFavouritesItemList is the Array of CFavouritesItem-s. Items are owned and deleted upon destruction. Note: using this array downcasted to its base can result in leaks. Delete method of base class is not virtual!

    Member Type Definition Documentation

    Typedef ComparisonFuncL

    typedef TInt(*ComparisonFuncL
    Comparison function type; compare two items. Should leave in error.
    Since
    0.9

    Constructor & Destructor Documentation

    CFavouritesItemList ( )

    IMPORT_CCFavouritesItemList()
    Constructor.
    Since
    0.9

    ~CFavouritesItemList ( )

    IMPORT_C~CFavouritesItemList()[virtual]
    Destructor. Elements are destroyed.
    Since
    0.9

    Member Function Documentation

    Delete ( TInt )

    IMPORT_C voidDelete(TIntaIndex)

    Reimplemented from CArrayFixBase::Delete(TInt)

    Remove and destroy an element. Invalid params will Panic.
    Since
    0.9
    ParameterDescription
    aIndexIndex of element to delete.

    Returns: void

    Delete ( TInt, TInt )

    IMPORT_C voidDelete(TIntaIndex,
    TIntaCount
    )

    Reimplemented from CArrayFixBase::Delete(TInt,TInt)

    Remove and destroy elements. Invalid params Panic.
    Since
    0.9
    ParameterDescription
    aIndexIndex of start element to delete.
    aCountNumber of items to delete.

    Returns: void

    ExternalizeL ( RWriteStream & )

    voidExternalizeL(RWriteStream &aStream)const
    Externalize into a stream.
    Since
    0.9
    ParameterDescription
    aStreamThe stream to externalize to.

    IndexToUid ( TInt )

    IMPORT_C TIntIndexToUid(TIntaIndex)const
    Convert index to Uid.
    Since
    0.9
    ParameterDescription
    aIndexIndex to convert.

    Returns: Uid for this index, or KFavouritesNullUid if not found.

    InternalizeL ( RReadStream & )

    voidInternalizeL(RReadStream &aStream)
    Internalize from a stream. Existing data is kept, new ones appended.
    Since
    0.9
    ParameterDescription
    aStreamThe stream to externalize from.

    ItemByUid ( TInt )

    IMPORT_C const CFavouritesItem *ItemByUid(TIntaUid)const
    Get pointer to item having aUid.
    Since
    0.9
    ParameterDescription
    aUidUid of item to look for.

    Returns: Pointer to item having aUid, or NULL if there is no such item. Item is still owned by the list.

    SortL ( ComparisonFuncL )

    IMPORT_C voidSortL(ComparisonFuncLaCompareItemsL)
    Sort the list using bubble-sort.
    Since
    0.9
    ParameterDescription
    aCompareItemsLFunction to be used two elements.

    UidToIndex ( TInt )

    IMPORT_C TIntUidToIndex(TIntaUid)const
    Convert Uid to index.
    Since
    0.9
    ParameterDescription
    aUidUid to convert.

    Returns: Index for this Uid, or -KErrNotFound if not found.