CCoeControlArray::TCursor Class Reference

class CCoeControlArray::TCursor

This class is an iterator for the CCoeControlArray class.

Public Member Functions
TCursor(const CCoeControlArray &, TInt)
T *Control()
const T *Control()
TInt Index()
IMPORT_C TBoolIsValid()
IMPORT_C TBoolNext()
IMPORT_C TBoolPrev()
IMPORT_C TBooloperator!=(const TCursor &)
IMPORT_C TBooloperator==(const TCursor &)
Private Member Functions
IMPORT_C CCoeControl *Ctrl()
voidUpdateIndex()
voidUpdateMemento()
Private Attributes
const CCoeControlArray *iArray
TInt iIndex
TCoeControlWithId iMemento

Constructor & Destructor Documentation

TCursor(const CCoeControlArray &, TInt)

TCursor(const CCoeControlArray &aArray,
TIntaIndex
)

Constructor.

Parameters

const CCoeControlArray & aArrayThe array
TInt aIndexThe index into the array

Member Functions Documentation

Control()

T *Control()

Gets the control.

Control()

const T *Control()const

Gets the control.

Ctrl()

IMPORT_C CCoeControl *Ctrl()const [private]

Gets the control of the cursor.

Index()

TInt Index()const

Gets the index of the cursor.

IsValid()

IMPORT_C TBoolIsValid()const

Checks if the cursor is valid. Use this to replace the comparison with NULL that you would do with pointers. This function is typically used on the cursors returned by the find operations.

Next()

IMPORT_C TBoolNext()

Updates the cursor so that it points to the next element in the array. If the current element is the last one then this function returns EFalse.

Prev()

IMPORT_C TBoolPrev()

Updates the cursor so that it points to the previous element in the array. If the current element is the first one then this function does nothing and returns EFalse.

UpdateIndex()

voidUpdateIndex()const [private]

This function is used by any operation that requires an update of the index.

UpdateMemento()

voidUpdateMemento()const [private]

This function is used by any operation that requires an update of the memento.

operator!=(const TCursor &)

IMPORT_C TBooloperator!=(const TCursor &aCursor)const

Checks if the cursors are different. Cursors are equal if they point to the same control in the same array else they are different.

Parameters

const TCursor & aCursorThe other cursor.

operator==(const TCursor &)

IMPORT_C TBooloperator==(const TCursor &aCursor)const

Checks if the cursors are equal. Cursors are equal if they point to the same control in the same array else they are different.

Parameters

const TCursor & aCursorThe other cursor.

Member Data Documentation

const CCoeControlArray * iArray

const CCoeControlArray *iArray[private]

TInt iIndex

TInt iIndex[private]

TCoeControlWithId iMemento

TCoeControlWithId iMemento[private]