Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: agmlists.h
Link against: agnmodel.lib

Class CAgnTodoInstanceList

CAgnTodoInstanceList

Support

Supported from 5.0

Description

An agenda list derived from the templated base class CAgnList, which holds the IDs for to-do instances which belong to a particular to-do list. The class stores the ID of the to-do list, and a sort order, which is used to sort the instance list. The list is populated and sorted using CAgnModel::PopulateTodoInstanceListL().

Derivation

CAgnListInterface to a list of agenda items
CAgnTodoInstanceListAn agenda list derived from the templated base class CAgnList, which holds the IDs for to-do instances which belong to a particular to-do list
CBaseBase class for all classes to be instantiated on the heap

Defined in CAgnTodoInstanceList:
Find(), Id(), NewL(), SetSortOrder(), SetTodoListId(), SortOrder(), TodoListId()

Inherited from CAgnList:
AppendL(), Count(), Delete(), InsertL(), Reset(), operator[]()

Inherited from CBase:
operator new()


Construction


NewL()

static CAgnTodoInstanceList* NewL(TAgnTodoListId aTodoListId=AgnModel::NullTodoListId());

Description

Allocates and constructs a CAgnTodoInstanceList instance. Initialises the to-do list ID. The sort order is undefined.

Parameters

TAgnTodoListId aTodoListId

The to-do list ID which defaults to a NULL value.

Return value

CAgnTodoInstanceList*

Pointer to the newly constructed list.

[Top]


Set list details


SetTodoListId()

void SetTodoListId(TAgnTodoListId aTodoListId);

Description

Sets the to-do list ID.

Parameters

TAgnTodoListId aTodoListId

The to-do list ID.


SetSortOrder()

void SetSortOrder(CAgnTodoList::TSortOrder aSortOrder);

Description

Sets the sort order for the list.

Parameters

CAgnTodoList::TSortOrder aSortOrder

The sort order for the instance list.

[Top]


Get list item


Find()

TInt Find(TAgnInstanceId aId,TInt& aPos);

Description

Returns the position of the supplied ID in the instance list.

Parameters

TAgnInstanceId aId

The ID to search for.

TInt& aPos

On return, the position of the ID in the instance list.

Return value

TInt

0 = ID found, +ve = ID not found, – ve = array empty.


Id()

const TAgnInstanceId& Id(TInt aIndex) const;

Description

Gets the instance ID at the specified index into the list.

Parameters

TInt aIndex

The index of the instance.

Return value

TAgnInstanceId&

The ID of the instance.

[Top]


Get list details


SortOrder()

CAgnTodoList::TSortOrder SortOrder() const;

Description

Returns the sort order.

Return value

CAgnTodoList::TSortOrder

The sort order.


TodoListId()

TAgnTodoListId TodoListId() const;

Description

Returns the to-do list ID.

Return value

TAgnTodoListId

The to-do list ID.