VisioMove-Sample  2.1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyPoiConfigurationSetter Class Referenceabstract

Interface for Objects that insert POIs into the map view. More...

Inheritance diagram for VgMyPoiConfigurationSetter:
Inheritance graph

Public Member Functions

virtual void setPoiCallback (const std::string &pIdentifier, VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback >const &pCallback)=0
 Sets a callback for a specific POI identifier. More...
 

Detailed Description

Interface for Objects that insert POIs into the map view.

Objects that implement this interfaces should declare static strings for every POIs (or categories) that reacts to click with distincts behaviors.

--- HEADER FILE ---
// Class that manages POIs (CRUD). Clicks on POIs with distinct catgory triggers
// different callbacks
class VgMyPOIManager : public VgMyPoiConfigurationSetter
{
public:
...
void addPoi(PoiData* pData);
void setPoiCallback(const std::string& pIdentifier, Vg3DModule::VgIGeometryCallback* pCallback);
...
static const std::string kHotelCategoryCallbackStringIdentifier; // "VgMyPOIManager_Hotel"
static const std::string kGasStationCategoryCallbackStringIdentifier; // "VgMyPOIManager_GasStation"
...
protected:
...
std::map<std::string, Vg3DModule::VgIGeometryCallback*> mCallbacks;
...
};
--- IMPLEMENTATION FILE ---
...
void VgMyPOIManager::setPoiCallback(const std::string& pIdentifier, Vg3DModule::VgIGeometryCallback* pCallback)
{
// Fills the mCallbacks map.
}
void VgMyPOIManager::addPoi(PoiData* pData)
{
// Fills the Vg3DModule::VgPointDescriptor
Vg3DModule::VgPointDescriptor lMyPoiDescriptor;
...
// Sets the Vg3DModule::VgPointDescriptor callback given the POI category.
swich(pData.category)
{
case Hotel:
std::map<std::string, Vg3DModule::VgIGeometryCallback*>::iterator lItCallback;
lItCallback = mCallbacks.find(kHotelCategoryCallbackStringIdentifier);
if (lItCallback != mCallbacks.end())
{
// Sets the Vg3DModule::VgPointDescriptor callback
lMyPoiDescriptor.callback = lItCallback->second;
}
break;
case GasStation:
// same with kGasStationCategoryCallbackStringIdentifier
break;
default:
// Do nothing. No callback on clicks.
break;
}
}
...

Member Function Documentation

virtual void VgMyPoiConfigurationSetter::setPoiCallback ( const std::string &  pIdentifier,
VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback >const &  pCallback 
)
pure virtual

Sets a callback for a specific POI identifier.

Implemented in VgMyRoutingHelper.


The documentation for this class was generated from the following file:
VisioMove 2.1.3, Visioglobe® 2015