EPOC   SDK Home Glossary Indexes Previous Next Up

TMsvSelectionOrdering class


Contents


TMsvSelectionOrdering class — Entry ordering

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

Not applicable

Defined in

msvstd.h

Link against

ment.lib

Description

This class defines the sorting and grouping rules used to prepare a selection of entries. It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering of an entry’s children.

Firstly, the entries will be grouped, if the appropriate grouping option is set, by:

Grouping options are simply Boolean flags that can be set on or off by functions of this class.

Secondly, the order of entries within these groups is defined by a sorting order option.


Constructors


TMsvSelectionOrdering() — Constructors

TMsvSelectionOrdering();

TMsvSelectionOrdering(TInt aGroupingKey, TMsvSorting aSorting, TBool aShowInvisible=EFalse);

Description

The first constructor simply creates a new object with no grouping, and sorting set to EMsvSortByNone.

The second constructor sets the group, sort order, and show-invisibility options to those specified in the passed values.

Arguments

TInt aGroupingKey

A bitmask of grouping options. For the values to use, see TMsvGrouping.

TMsvSorting aSorting

Sorting order.

TBool aShowInvisible=EFalse

Determines whether invisible entries are included in the selection


Internalising and externalising


InternalizeL() — Internalise

void InternalizeL(RReadStream& aStream);

Description

Use this function to read an externalised object from the stream specified by aStream.

Arguments

RReadStream& aStream

Stream from which to read

Leave considerations

Standard stream leave codes.


ExternalizeL() — Externalise

void ExternalizeL(RWriteStream& aStream) const;

Description

Use this function to write the object into the stream specified by aStream.

Arguments

RWriteStream& aStream

Stream to which to write

Leave considerations

Standard stream leave codes.


Equality


operator==() — Equality operator

TBool operator==(const TMsvSelectionOrdering& aEntry) const;

Description

Use this operator to test for equality. Two TMsvSelectionOrdering objects are equal if the same grouping and sorting options have been set on each.

Arguments

const TMsvSelectionOrdering& aEntry

The object with which to compare

Return value

TBool

ETrue if the objects are equal, else EFalse


Option accessors


GroupByMtm() — Get group-by-MTM flag

TBool GroupByMtm() const;

Description

Use this function to get the group-by-MTM flag.

Return value

TBool

Group-by-MTM flag


GroupByPriority() — Get group-by-priority flag

TBool GroupByPriority() const;

Description

Use this function to get the group-by-priority flag.

Return value

TBool

Group-by-priority flag


GroupByType() — Get group-by-type flag

TBool GroupByType() const;

Description

Use this function to get the group-by-entry-type flag.

Return value

TBool

Group-by-entry-type flag


GroupingOn() — Check if grouping set

TBool GroupingOn() const;

Description

Use this function to check if any grouping option has been set.

Return value

TBool

ETrue if one or more grouping options have been set, else EFalse


GroupStandardFolders() — Get the group-by-standard-folders flag

TBool GroupStandardFolders() const;

Description

Use this function to get the group-by-standard-folders flag.

Return value

TBool

Group-by-standard-folders flag


ShowInvisibleEntries() — Get the show-invisible-entries flag

TBool ShowInvisibleEntries() const;

Description

Use this function to get the show-invisible-entries flag. Entries whose entry visible flag index field is not set are included in the ordered list only if this is set.

Return value

TBool

Show-invisible-entries flag


Sorting() — Get sorting options

TMsvSorting Sorting() const;

Description

Use this function to get the sorting order of entries within groups.

Return value

TMsvSorting

Sorting order.


Option mutators


GroupByMtm() — Set the group-by-MTM flag

void SetGroupByMtm(TBool aFlag);

Description

Use this function to set the group-by-MTM flag.

Arguments

TBool aFlag

Group-by-MTM flag


GroupByPriority() — Set the group-by-priority flag

void SetGroupByPriority(TBool aFlag);

Description

Use this function to set the group-by-priority flag.

Arguments

TBool aFlag

Group-by-priority flag


GroupByType() — Set the group-by-type flag

void SetGroupByType(TBool aFlag);

Description

Use this function to set the group-by-entry-type flag.

Arguments

TBool aFlag

Group-by-entry-type flag


GroupStandardFolders() — Set the group-by-standard-folders flag

void SetGroupStandardFolders(TBool aFlag);

Description

Use this function to set the group-by-standard-folders flag.

Arguments

TBool aFlag

Group-by-standard-folders flag


ShowInvisibleEntries() — Set the show-invisible-entries flag

void SetShowInvisibleEntries(TBool aFlag);

Description

Use this function to set the show-invisible-entries flag. Entries whose entry visible flag index field is not set are included in the ordered list only if this is set. Setting this flag off is useful if you intend to display the resulting ordered list to the user.

Arguments

TBool aFlag

Show-invisible-entries flag


Sorting() — Set sorting options

void SetSorting(TMsvSorting aSortType);

Description

Use this function to set the sorting order of entries within groups.

Arguments

TMsvSorting aSortType

Sorting order to set.

EPOC       SDK Home Glossary Indexes Previous Next Up