Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::LandmarkStoreService Class Reference

LandmarkStoreManager object. More...

Inheritance diagram for gem::LandmarkStoreService:
Collaboration diagram for gem::LandmarkStoreService:

Public Member Functions

 LandmarkStoreService (const LandmarkStoreService &)=delete
 Disable copy constructor.
 LandmarkStoreService (LandmarkStoreService &&)=default
 Default move constructor.
LandmarkStoreService & operator= (const LandmarkStoreService &)=delete
 noexcept is deduced
LandmarkStoreService & operator= (LandmarkStoreService &&store)=default
 Default move assignment.
std::pair< StrongPointer< LandmarkStore >, int > createLandmarkStore (const String &name, int zoom=-1, const String &folder=String()) noexcept
 noexcept is deduced
int registerLandmarkStore (const String &name, const String &path) noexcept
 Register an already existing landmark store.
LandmarkStoreService & removeLandmarkStore (int landmarkStoreId) noexcept
 Remove the landmark store specified by ID.
int getLandmarkStoreType (int landmarkStoreId) const noexcept
 Get the type of the landmark store ( see TLandmarkStoreType ).
StrongPointer< LandmarkStoregetLandmarkStore (int landmarkStoreId) const noexcept
 Get landmark store by ID.
StrongPointer< LandmarkStoregetLandmarkStore (const String &name) const noexcept
 Get landmark store by name.
LandmarkStoreService & addListener (LandmarkStoreListener listener) noexcept
 Add new listener for landmark store events.
LandmarkStoreService & removeListener (LandmarkStoreListener listener) noexcept
 Remove listener for landmark store events.
int getMapPoisLandmarkStoreId () const noexcept
 Get Map POIs landmark store.
int getMapAddressLandmarkStoreId () const noexcept
 Get LandmarkStore id attached to map address database information.
int getMapCitiesLandmarkStoreId () const noexcept
 Get LandmarkStore id attached to map cities database information.
int getMapRoadsLandmarkStoreId () const noexcept
 Get LandmarkStore id attached to map roads database information.
int getOverlaysLandmarkStoreId () const noexcept
 Get LandmarkStore id attached to overlays database.
int getGeofenceLandmarkStoreId () const noexcept
 Get LandmarkStore id attached to geofence database.
template<typename TCollector>
bool iterateLandmarkStores (TCollector collector) const
 Iterate all application landmark stores and call collector for each.

Detailed Description

LandmarkStoreManager object.

Implements share read/write Api object over ILandmarkStoreManager.

This behaves like a singleton, i.e. all instances are shared behind the same API interface

Manages storage and retrieval of landmarks.

Provides persistent access to user-defined or preloaded landmarks, enabling navigation and search features to integrate landmarks.

Member Function Documentation

◆ addListener()

LandmarkStoreService & gem::LandmarkStoreService::addListener ( LandmarkStoreListener listener)
inlinenoexcept

Add new listener for landmark store events.

Parameters
[in]listenerThe listener to be added
Returns
Reference to the current object

◆ createLandmarkStore()

std::pair< StrongPointer< LandmarkStore >, int > gem::LandmarkStoreService::createLandmarkStore ( const String & name,
int zoom = -1,
const String & folder = String() )
inlinenoexcept

noexcept is deduced

Create a new landmark store. The landmark store type for all stores created with this function is ELandmarkStoreType::Default.

Parameters
[in]nameThe name of the landmark store. The name must be unique otherwise will return error::KExist
[in]zoomThe max zoom step at which the landmark store will be visible. If -1, a default optimal zoom level is selected
[in]folderFolder path where the landmark store will be created. If empty, the landmark store will be created in the SDK default location
Returns
std::pair<landmark store strong pointer, err code>

If a landmark with the given name already exists, the function will return { valid landmark store pointer, error::KExist }

◆ getGeofenceLandmarkStoreId()

int gem::LandmarkStoreService::getGeofenceLandmarkStoreId ( ) const
inlinenoexcept

Get LandmarkStore id attached to geofence database.

Returns
Landmark store ID

◆ getLandmarkStore() [1/2]

StrongPointer< LandmarkStore > gem::LandmarkStoreService::getLandmarkStore ( const String & name) const
inlinenoexcept

Get landmark store by name.

Parameters
[in]nameThe name of the landmark store.
Returns
Landmark store strong pointer

◆ getLandmarkStore() [2/2]

StrongPointer< LandmarkStore > gem::LandmarkStoreService::getLandmarkStore ( int landmarkStoreId) const
inlinenoexcept

Get landmark store by ID.

Parameters
[in]landmarkStoreIdThe ID of the landmark store.
Returns
Landmark store strong pointer

◆ getLandmarkStoreType()

int gem::LandmarkStoreService::getLandmarkStoreType ( int landmarkStoreId) const
inlinenoexcept

Get the type of the landmark store ( see TLandmarkStoreType ).

Parameters
[in]landmarkStoreIdThe ID of the landmark store.
Returns
The landmark store type

◆ getMapAddressLandmarkStoreId()

int gem::LandmarkStoreService::getMapAddressLandmarkStoreId ( ) const
inlinenoexcept

Get LandmarkStore id attached to map address database information.

Returns
Landmark store ID

◆ getMapCitiesLandmarkStoreId()

int gem::LandmarkStoreService::getMapCitiesLandmarkStoreId ( ) const
inlinenoexcept

Get LandmarkStore id attached to map cities database information.

Returns
Landmark store ID

◆ getMapPoisLandmarkStoreId()

int gem::LandmarkStoreService::getMapPoisLandmarkStoreId ( ) const
inlinenoexcept

Get Map POIs landmark store.

Returns
Landmark store ID

◆ getMapRoadsLandmarkStoreId()

int gem::LandmarkStoreService::getMapRoadsLandmarkStoreId ( ) const
inlinenoexcept

Get LandmarkStore id attached to map roads database information.

Returns
Landmark store ID

◆ getOverlaysLandmarkStoreId()

int gem::LandmarkStoreService::getOverlaysLandmarkStoreId ( ) const
inlinenoexcept

Get LandmarkStore id attached to overlays database.

Returns
Landmark store ID

◆ iterateLandmarkStores()

template<typename TCollector>
bool gem::LandmarkStoreService::iterateLandmarkStores ( TCollector collector) const
inline

Iterate all application landmark stores and call collector for each.

Collector should have the following signature bool( StrongPointer<LandmarkStore> ). Collector must return true if iteration should continue and false if iteration should stop.

Parameters
[in]collectorThe collector to be called for each landmark store
Returns
True if all landmark stores were iterated, false if the collector returned false

◆ operator=() [1/2]

LandmarkStoreService & gem::LandmarkStoreService::operator= ( const LandmarkStoreService & )
delete

noexcept is deduced

Delete copy assignment

◆ operator=() [2/2]

LandmarkStoreService & gem::LandmarkStoreService::operator= ( LandmarkStoreService && store)
default

Default move assignment.

Parameters
storeThe object to be moved
Returns
A reference to the current object

◆ registerLandmarkStore()

int gem::LandmarkStoreService::registerLandmarkStore ( const String & name,
const String & path )
inlinenoexcept

Register an already existing landmark store.

Parameters
[in]nameThe landmark store name. Must be unique, otherwise error::kExist is returned
[in]pathThe landmark store path
Returns
On success the landmark store ID.
error::KExist if the name already exist
error::KNotFound if the landmark store cannot be found
error::KInvalidInput if the path is not a valid landmark store

The name parameter will override the landmark store internal creation name. This allows to register landmark stores in order to import data from them

◆ removeLandmarkStore()

LandmarkStoreService & gem::LandmarkStoreService::removeLandmarkStore ( int landmarkStoreId)
inlinenoexcept

Remove the landmark store specified by ID.

The store resource must be released before calling this function: ILandmarkStore::Release();

Parameters
[in]landmarkStoreIdThe ID of the landmark store.
Returns
Reference to the current object

◆ removeListener()

LandmarkStoreService & gem::LandmarkStoreService::removeListener ( LandmarkStoreListener listener)
inlinenoexcept

Remove listener for landmark store events.

Parameters
[in]listenerThe listener to be removed
Returns
Reference to the current object