TMdEOrderRule Class Reference

class TMdEOrderRule

TMdEOrderRule defines a rule that is used for sorting the results of a query. A query may use multiple order rules.

Public Member Functions
TMdEOrderRule(TOrderRuleType, TBool)
TMdEOrderRule(const CMdEPropertyDef &, TBool)
IMPORT_C TBoolAscending()
IMPORT_C TBoolCaseSensitive()
IMPORT_C const CMdEPropertyDef *PropertyDef()
TUint32 RequiredBufferSize()
voidSerializeL(CMdCSerializationBuffer &, TMdCOffset &)
IMPORT_C voidSetAscending(TBool)
IMPORT_C voidSetCaseSensitive(TBool)
IMPORT_C voidSetPropertyDef(const CMdEPropertyDef &)
IMPORT_C voidSetType(TOrderRuleType)
IMPORT_C TOrderRuleTypeType()
Private Attributes
TBool iAscending
TBool iCaseSensitive
const CMdEPropertyDef *iPropertyDef
TOrderRuleType iType

Constructor & Destructor Documentation

TMdEOrderRule(TOrderRuleType, TBool)

IMPORT_CTMdEOrderRule(TOrderRuleTypeaType,
TBoolaAscending = ETrue
)

Constructor.

Parameters

TOrderRuleType aTypeType of the order rule.
TBool aAscending = ETrueETrue, if the rule order is ascending.

TMdEOrderRule(const CMdEPropertyDef &, TBool)

IMPORT_CTMdEOrderRule(const CMdEPropertyDef &aPropertyDef,
TBoolaAscending = ETrue
)

Constructor.

Parameters

const CMdEPropertyDef & aPropertyDefProperty definition.
TBool aAscending = ETrueETrue, if the rule order is ascending.

Member Functions Documentation

Ascending()

IMPORT_C TBoolAscending()const

Determines whether the ordering is ascending.

CaseSensitive()

IMPORT_C TBoolCaseSensitive()

Returns type of text comparison, whether case sensitive or case insensitive.

PropertyDef()

IMPORT_C const CMdEPropertyDef *PropertyDef()const

Returns the property definition associated with the order rule.

RequiredBufferSize()

TUint32 RequiredBufferSize()const

Get required size of serialized buffer when this is serialized.

SerializeL(CMdCSerializationBuffer &, TMdCOffset &)

voidSerializeL(CMdCSerializationBuffer &aBuffer,
TMdCOffset &aFreespaceOffset
)const

Serialize own data to serialized buffer (correct position must be set before calling) and return new position of serialized buffer.

Parameters

CMdCSerializationBuffer & aBufferserialized buffer.
TMdCOffset & aFreespaceOffset

SetAscending(TBool)

IMPORT_C voidSetAscending(TBoolaAscending = ETrue)

Sets the order rule to ascending or descending order.

Parameters

TBool aAscending = ETrueETrue ascending order, EFalse descending order.

SetCaseSensitive(TBool)

IMPORT_C voidSetCaseSensitive(TBoolaCaseSensitive)

Sets text sorting case sensitive or case insensitive.

Parameters

TBool aCaseSensitiveETrue case sensitive sort. EFalse case insensitive sort.

SetPropertyDef(const CMdEPropertyDef &)

IMPORT_C voidSetPropertyDef(const CMdEPropertyDef &aPropertyDef)

Associates a property definition with the order rule.

Parameters

const CMdEPropertyDef & aPropertyDefProperty definition.

SetType(TOrderRuleType)

IMPORT_C voidSetType(TOrderRuleTypeaType)

Sets the type of the order rule.

Parameters

TOrderRuleType aTypeOrder rule type constant.

Type()

IMPORT_C TOrderRuleTypeType()const

Returns the type of the order rule.

Member Data Documentation

TBool iAscending

TBool iAscending[private]

Flag for ascending order.

TBool iCaseSensitive

TBool iCaseSensitive[private]

Flag for text sorting. Default value is EFalse

const CMdEPropertyDef * iPropertyDef

const CMdEPropertyDef *iPropertyDef[private]

Optional.

TOrderRuleType iType

TOrderRuleType iType[private]

Type of the order rule.