CPosLmDisplayItem Class Reference

class CPosLmDisplayItem : public CBase

Displayable item.

A displayable item consists of a landmark or category and its database index. Database index is 0 if running single database search, and it is in the range [0, CPosLmMultiDbSearch::NumOfDatabasesInSearch - 1] in case of multiple database search. Thus, this class is a link between a landmark or a category and its database.

The class is usually not instantiated by client applications.

eposlmsearchlib.lib
Since
S60 3.0

Inherits from

Constructor & Destructor Documentation

CPosLmDisplayItem(CPosLandmark *, TUint)

CPosLmDisplayItem ( CPosLandmark * aLandmark,
TUint aDatabaseIndex
) [private]

C++ constructor.

Parameters

CPosLandmark * aLandmark A landmark.
TUint aDatabaseIndex Database index.

CPosLmDisplayItem(CPosLandmarkCategory *, TUint)

CPosLmDisplayItem ( CPosLandmarkCategory * aCategory,
TUint aDatabaseIndex
) [private]

C++ constructor.

Parameters

CPosLandmarkCategory * aCategory A category.
TUint aDatabaseIndex Database index.

~CPosLmDisplayItem()

~CPosLmDisplayItem ( ) [virtual]

Destructor.

Member Functions Documentation

Category()

IMPORT_C const CPosLandmarkCategory & Category ( ) const

Returns the category contained in the displayable item.

panic
"Landmarks Client"-EPosInvalidItemType The item type is not a category displayable item. See DisplayItemType .

DatabaseIndex()

IMPORT_C TUint DatabaseIndex ( ) const

Returns the index of the database, which contained item belongs to.

The database index is associated with a database URI from the list of databases specified in CPosLmMultiDbSearch .

If display data is used in CPosLandmarkSearch , this function always returns 0.

DisplayItemType()

IMPORT_C TDisplayItemType DisplayItemType ( ) const

Returns the type of the display item.

GetDistance(TReal32 &)

IMPORT_C TInt GetDistance ( TReal32 & aDistance ) const

Returns the distance to a position specified in the CPosLmNearestCriteria . The distance data is only used when searching with this criteria.

Parameters

TReal32 & aDistance Distance to the position specified in a CPosLmNearestCriteria .

Landmark()

IMPORT_C const CPosLandmark & Landmark ( ) const

Returns the landmark contained in the displayable item.

panic
"Landmarks Client"-EPosInvalidItemType The item type is not a landmark displayable item. See DisplayItemType .

NewL(CPosLandmark *, TUint)

IMPORT_C CPosLmDisplayItem * NewL ( CPosLandmark * aLandmark,
TUint aDatabaseIndex = 0
) [static]

Two-phased constructor.

Parameters

CPosLandmark * aLandmark A landmark.
TUint aDatabaseIndex = 0 A database index.

NewL(CPosLandmarkCategory *, TUint)

IMPORT_C CPosLmDisplayItem * NewL ( CPosLandmarkCategory * aCategory,
TUint aDatabaseIndex = 0
) [static]

Two-phased constructor.

Parameters

CPosLandmarkCategory * aCategory A category.
TUint aDatabaseIndex = 0 A database index.

SetDatabaseIndex(TUint)

void SetDatabaseIndex ( TUint aDatabaseIndex )

Parameters

TUint aDatabaseIndex

SetDistance(TReal32)

void SetDistance ( TReal32 aDistance )

Parameters

TReal32 aDistance

Member Enumerations Documentation

Enum TDisplayItemType

Display item type.

Enumerators

ELandmarkItem = 0

Landmark display item. This indicates that the item contains a landmark and the Landmark function can be called to access it.

ECategoryItem

Category display item. This indicates that the item contains a category and the Category function can be called to access it.

Member Data Documentation

CPosLandmarkCategory * iCategory

CPosLandmarkCategory * iCategory [private]

TUint iDatabaseIndex

TUint iDatabaseIndex [private]

TDisplayItemType iDisplayItemType

TDisplayItemType iDisplayItemType [private]

TReal32 iDistance

TReal32 iDistance [private]

TBool iHasDistance

TBool iHasDistance [private]

CPosLandmark * iLandmark

CPosLandmark * iLandmark [private]