CContactViewRangeBase Class Reference

#include <app/cntview.h>

Link against: cntview.lib

class CContactViewRangeBase : public CBase, public CBase

Inherits from

Detailed Description

The abstract base class for all contact view range classes.

Range classes are used by contact sub views to specify the upper and lower range boundaries and for searching their underlying view.

See also: CContactSubView

Member Attribute Documentation

iCollateMethod

TCollationMethod *iCollateMethod[protected]

The collation method used to sort the strings.

By default, this is the standard collation method for the current locale.

iHigh

TInt iHigh[protected]

The index into the sub view's underlying view of the item at the upper limit of the range.

iLow

TInt iLow[protected]

The index into the sub view's underlying view of the item at the lower limit of the range.

iView

const CContactViewBase &iView[protected]

The sub view's underlying view.

Member Enumeration Documentation

Enum TCriteria

Defines the range criteria.

EnumeratorValueDescription
ELessThan

Less than.

ELessThanOrEqualTo

Less than or equal to.

EGreaterThan

Greater than.

EGreaterThanOrEqualTo

Greater than or equal to.

Constructor & Destructor Documentation

CContactViewRangeBase ( const CContactViewBase & )

CContactViewRangeBase(const CContactViewBase &aView)[protected]

~CContactViewRangeBase ( )

~CContactViewRangeBase()

Member Function Documentation

ConstructL ( )

voidConstructL()[protected]

Called by derived classes to set the collation method iCollateMethod to be the standard collation method for the current locale.

FindIndexL ( const TDesC &, TCriteria )

TInt FindIndexL(const TDesC &aMatch,
TCriteriaaCriteria
)const [protected]

Called by implementations of SetL() to search the sub view's underlying view for the index of the first item whose field content matches aMatch, using the specified search criteria.

Parameters
aMatchThe text to search for.
aCriteriaThe search criteria.
Return Value
The index of the first matching item in the view. KErrNotFound if the view is empty or if none match.

HighIndex ( )

TInt HighIndex()const [inline]

Gets the index into the sub view's underlying view of the item at the top of the range.

Return Value
The index of the item at the top of the range.

IndicesValid ( )

IMPORT_C TBoolIndicesValid()const

Tests whether the lower and upper indexes are valid, i.e. not KErrNotFound.

Return Value
ETrue if the indexes are valid, EFalse if not.

LowIndex ( )

TInt LowIndex()const [inline]

Gets the index into the sub view's underlying view of the item at the bottom of the range.

Return Value
The index of the item at the bottom of the range.

MatchesCriteriaL ( TCriteria, const TDesC &, TInt )

TBool MatchesCriteriaL(TCriteriaaCriteria,
const TDesC &aMatch,
TIntaIndex
)const [protected]

SetL ( )

voidSetL()[pure virtual]

Sets the iLow and iHigh members.

ValidateIndices ( )

voidValidateIndices()[protected]

Called by derived classes to validate the upper and lower indexes (iLow and iHigh).

If either index is KErrNotFound, or iLow is greater than iHigh, then both are set to KErrNotFound.