class PoiSearchPlacesLocation : public tsd::nav::input::mib3::api::types::PlacesLocation
{
public:
PoiSearchPlacesLocation(const tsd::nav::sdk::poi::api::types::PoiLocation&& poiLocation);
...
private:
const tsd::nav::sdk::poi::api::types::PoiLocation& m_PoiLocation;
};
PoiSearchPlacesLocation::PoiSearchPlacesLocation(const tsd::nav::sdk::poi::api::types::PoiLocation&& poiLocation)
: m_PoiLocation(poiLocation){}
void Mib3PoiSearchTask::notify(std::vector<tsd::nav::sdk::poi::api::types::PoiLocation::SharedPtr> searchResults)
{
//Convert PoiLocations to PlacesLocations and return result vector
std::vector<tsd::nav::input::mib3::api::types::PlacesLocation::SharedPtr> resultVector;
std::vector<tsd::nav::sdk::poi::api::types::PoiLocation::SharedPtr>::const_iterator cit = searchResults.begin();
const std::vector<tsd::nav::sdk::poi::api::types::PoiLocation::SharedPtr>::const_iterator citEnd = searchResults.end();
for (; citEnd != cit; ++cit)
{
tsd::nav::input::mib3::api::types::PlacesLocation::SharedPtr pResultElement;
pResultElement = std::make_shared<tsd::nav::input::mib3::poi::search::PoiSearchPlacesLocation>(std::move(**cit));
resultVector.push_back(pResultElement);
}
m_refMib3PoiSearchResultListener.updateSearchResults(resultVector);
}