MCLFCustomSorter Class Reference

API published in: S60 3rd Ed FP 1

Link against: contentlistingframework.lib

Capability Information

Required Capabilities

None


#include <mclfcustomsorter.h>

Detailed Description

Custom sorter interface for Content Listing Framework.

With this interface, client can create a customized sorter for sorting items in list model. For example, items in the List Model can be sorted by Item IDs or it can be randomized.

Example:

  // Example sorter that sorts items by Item IDs
  void CMySorter::SortItemsL( RPointerArray<MCLFItem>& aItemArray )
      {
      TLinearOrder<MCLFItem> sorter( CMySorter::Compare );
      aItemArray.Sort( sorter );
      }

  TInt CMySorter::Compare( const MCLFItem& aFirst, const MCLFItem& aSecond )
      {
      return aFirst.ItemId() - aSecond.ItemId();
      }

Custom sorter is activated and removed by calling method MCLFItemListModel::SetCustomSorter


Public Member Functions

virtual void  SortItemsL (RPointerArray< MCLFItem > &aItemArray)=0
  Abstract method for sorting Content Listing Framework items in a list model.

Protected Member Functions

virtual  ~MCLFCustomSorter ()
  Destructor.

Constructor & Destructor Documentation

virtual MCLFCustomSorter::~MCLFCustomSorter  )  [inline, protected, virtual]
 

Destructor.


Member Function Documentation

virtual void MCLFCustomSorter::SortItemsL RPointerArray< MCLFItem > &  aItemArray  )  [pure virtual]
 

Abstract method for sorting Content Listing Framework items in a list model.

This method is called when the sorting process is executed by calling refresh to the List Model.

Parameters:
aItemArray  The array to sort. Contains all items of the List Model.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top