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 TBool IsValid ()
IMPORT_C TBool Next ()
IMPORT_C TBool Prev ()
IMPORT_C TBool operator!= (const TCursor &)
IMPORT_C TBool operator== (const TCursor &)
Private Member Functions
IMPORT_C CCoeControl * Ctrl ()
void UpdateIndex ()
void UpdateMemento ()
Private Attributes
const CCoeControlArray * iArray
TInt iIndex
TCoeControlWithId iMemento

Constructor & Destructor Documentation

TCursor(const CCoeControlArray &, TInt)

TCursor ( const CCoeControlArray & aArray,
TInt aIndex
)

Constructor.

Parameters

const CCoeControlArray & aArray The array
TInt aIndex The 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 TBool IsValid ( ) 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 TBool Next ( )

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 TBool Prev ( )

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()

void UpdateIndex ( ) const [private]

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

UpdateMemento()

void UpdateMemento ( ) const [private]

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

operator!=(const TCursor &)

IMPORT_C TBool operator!= ( 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 & aCursor The other cursor.

operator==(const TCursor &)

IMPORT_C TBool operator== ( 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 & aCursor The other cursor.

Member Data Documentation

const CCoeControlArray * iArray

const CCoeControlArray * iArray [private]

TInt iIndex

TInt iIndex [private]

TCoeControlWithId iMemento

TCoeControlWithId iMemento [private]