class CPosLmCompositeCriteria : public CPosLmSearchCriteria |
Class used to combine multiple search criterion.
For instance, to search for all restaurants in the area, this class can be used to combine a CPosLmAreaCriteria and a CPosLmCategoryCriteria .
If a CPosLmNearestCriteria is used and no sort preference is specified, the result will be sorted by distance. If more than one CPosLmNearestCriteria are combined using a CPosLmCompositeCriteria , the sort order will be undefined unless a sort preference is specified.
Nested CPosLmCompositeCriteria are not allowed.
This criterion only supports searching for landmarks, e.g. if it is passed to CPosLandmarkSearch::StartCategorySearchL , the function will fail with error code KErrNotSupported .
Public Member Functions | |
---|---|
~CPosLmCompositeCriteria () | |
IMPORT_C TInt | AddArgument ( CPosLmSearchCriteria *) |
IMPORT_C const CPosLmSearchCriteria & | Argument ( TUint ) |
IMPORT_C CPosLmSearchCriteria & | Argument ( TUint ) |
IMPORT_C void | ClearArguments () |
IMPORT_C TCompositionType | CompositionType () |
IMPORT_C CPosLmCompositeCriteria * | NewLC ( TCompositionType ) |
IMPORT_C TUint | NumOfArguments () |
IMPORT_C CPosLmSearchCriteria * | RemoveArgument ( TUint ) |
IMPORT_C void | SetCompositionType ( TCompositionType ) |
Private Member Functions | |
---|---|
CPosLmCompositeCriteria ( TCompositionType ) | |
CPosLmCompositeCriteria (const CPosLmCompositeCriteria &) | |
void | ConstructL () |
CPosLmCompositeCriteria & | operator= (const CPosLmCompositeCriteria &) |
Public Member Enumerations | |
---|---|
enum | TCompositionType { ECompositionAND = 0, ECompositionOR = 1 } |
Inherited Enumerations | |
---|---|
CPosLmSearchCriteria:TCriteriaType |
Private Attributes | |
---|---|
RPointerArray < CPosLmSearchCriteria > | iArguments |
TCompositionType | iCompositionType |
CPosLmCompositeCriteria | ( | TCompositionType | aType | ) | [private] |
TCompositionType aType |
CPosLmCompositeCriteria | ( | const CPosLmCompositeCriteria & | ) | [private] |
const CPosLmCompositeCriteria & |
IMPORT_C TInt | AddArgument | ( | CPosLmSearchCriteria * | aCriteria | ) |
Adds a criterion to this composition.
The composite criterion must contain at least one argument, otherwise CPosLandmarkSearch::StartLandmarkSearchL will fail with error code KErrArgument .
If this function returns without an error code, ownership of the added criterion object is transferred to the composite object.
CPosLmCompositeCriteria are not supported when composition type is ECompositionAND . Only CPosLmTextCriteria is supported in the case of ECompositionOR
Searching for landmark categories using CPosLmCompositeCriteria is not supported in the case of ECompositionAND.
CPosLmSearchCriteria * aCriteria | The criterion to add to the composition. |
IMPORT_C const CPosLmSearchCriteria & | Argument | ( | TUint | aIndex | ) | const |
Returns a criterion argument contained in this object.
This overload returns a const reference to the criterion argument. There is another overload which returns a non-const reference.
TUint aIndex | The argument to read. Must be in the interval [0, NumOfArguments - 1], or this function will raise a USER-130 panic. |
IMPORT_C CPosLmSearchCriteria & | Argument | ( | TUint | aIndex | ) |
Returns a criterion argument contained in this object.
This overload returns a non-const reference to the criterion argument. There is another overload which returns a const reference.
TUint aIndex | The argument to read. Must be in the interval [0, NumOfArguments - 1], or this function will raise a USER-130 panic. |
IMPORT_C void | ClearArguments | ( | ) |
Removes and deletes all contained criterion objects.
The composite criterion must contain at least one argument, otherwise CPosLandmarkSearch::StartLandmarkSearchL will fail with error code KErrArgument .
IMPORT_C TCompositionType | CompositionType | ( | ) | const |
Returns the type of this composite criterion.
IMPORT_C CPosLmCompositeCriteria * | NewLC | ( | TCompositionType | aType | ) | [static] |
Two-phased constructor.
TCompositionType aType | The composition type to use. |
IMPORT_C TUint | NumOfArguments | ( | ) | const |
Returns the number of criteria this object contains.
IMPORT_C CPosLmSearchCriteria * | RemoveArgument | ( | TUint | aIndex | ) |
Removes a criterion from this composition.
Note: This function does not delete the criterion object. Instead, the ownership of the object is passed to the caller.
TUint aIndex | The argument to remove. Must be in the interval [0, NumOfArguments - 1], or this function will raise a USER-130 panic. |
IMPORT_C void | SetCompositionType | ( | TCompositionType | aType | ) |
Set the type of this composite criterion.
TCompositionType aType |
CPosLmCompositeCriteria & | operator= | ( | const CPosLmCompositeCriteria & | ) | [private] |
const CPosLmCompositeCriteria & |
Specifies the type of the composite criterion. ECompositionOR - is supported only when all the contained critarias are CPosLmTextCriteria . it is not supported for other criteria.
ECompositionAND = 0 |
Search results must match all contained criteria. |
ECompositionOR = 1 |
Search result must match one of the contained criteria ECompositionOR - is supported only when all the contained critarias are CPosLmTextCriteria . it is not supported for other criteria |
RPointerArray < CPosLmSearchCriteria > | iArguments | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.