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 TBool Ascending ()
IMPORT_C TBool CaseSensitive ()
IMPORT_C const CMdEPropertyDef * PropertyDef ()
TUint32 RequiredBufferSize ()
void SerializeL (CMdCSerializationBuffer &, TMdCOffset &)
IMPORT_C void SetAscending ( TBool )
IMPORT_C void SetCaseSensitive ( TBool )
IMPORT_C void SetPropertyDef (const CMdEPropertyDef &)
IMPORT_C void SetType ( TOrderRuleType )
IMPORT_C TOrderRuleType Type ()
Private Attributes
TBool iAscending
TBool iCaseSensitive
const CMdEPropertyDef * iPropertyDef
TOrderRuleType iType

Constructor & Destructor Documentation

TMdEOrderRule(TOrderRuleType, TBool)

IMPORT_C TMdEOrderRule ( TOrderRuleType aType,
TBool aAscending = ETrue
)

Constructor.

Parameters

TOrderRuleType aType Type of the order rule.
TBool aAscending = ETrue ETrue, if the rule order is ascending.

TMdEOrderRule(const CMdEPropertyDef &, TBool)

IMPORT_C TMdEOrderRule ( const CMdEPropertyDef & aPropertyDef,
TBool aAscending = ETrue
)

Constructor.

Parameters

const CMdEPropertyDef & aPropertyDef Property definition.
TBool aAscending = ETrue ETrue, if the rule order is ascending.

Member Functions Documentation

Ascending()

IMPORT_C TBool Ascending ( ) const

Determines whether the ordering is ascending.

CaseSensitive()

IMPORT_C TBool CaseSensitive ( )

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

void SerializeL ( 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 & aBuffer serialized buffer.
TMdCOffset & aFreespaceOffset

SetAscending(TBool)

IMPORT_C void SetAscending ( TBool aAscending = ETrue )

Sets the order rule to ascending or descending order.

Parameters

TBool aAscending = ETrue ETrue ascending order, EFalse descending order.

SetCaseSensitive(TBool)

IMPORT_C void SetCaseSensitive ( TBool aCaseSensitive )

Sets text sorting case sensitive or case insensitive.

Parameters

TBool aCaseSensitive ETrue case sensitive sort. EFalse case insensitive sort.

SetPropertyDef(const CMdEPropertyDef &)

IMPORT_C void SetPropertyDef ( const CMdEPropertyDef & aPropertyDef )

Associates a property definition with the order rule.

Parameters

const CMdEPropertyDef & aPropertyDef Property definition.

SetType(TOrderRuleType)

IMPORT_C void SetType ( TOrderRuleType aType )

Sets the type of the order rule.

Parameters

TOrderRuleType aType Order rule type constant.

Type()

IMPORT_C TOrderRuleType Type ( ) 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.