Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'generator/sponsored_dataset.hpp')
-rw-r--r--generator/sponsored_dataset.hpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/generator/sponsored_dataset.hpp b/generator/sponsored_dataset.hpp
index 82e26cbaa1..9bd0f1daf0 100644
--- a/generator/sponsored_dataset.hpp
+++ b/generator/sponsored_dataset.hpp
@@ -10,9 +10,9 @@
#include "base/newtype.hpp"
-#include "std/function.hpp"
-#include "std/map.hpp"
-#include "std/string.hpp"
+#include <functional>
+#include <map>
+#include <string>
#include "boost/geometry.hpp"
#include "boost/geometry/geometries/point.hpp"
@@ -33,14 +33,16 @@ public:
static double constexpr kDistanceLimitInMeters = 150;
static size_t constexpr kMaxSelectedElements = 3;
- explicit SponsoredDataset(string const & dataPath, string const & addressReferencePath = string());
- explicit SponsoredDataset(istream & dataSource, string const & addressReferencePath = string());
+ explicit SponsoredDataset(std::string const & dataPath,
+ std::string const & addressReferencePath = std::string());
+ explicit SponsoredDataset(std::istream & dataSource,
+ std::string const & addressReferencePath = std::string());
size_t Size() const { return m_objects.size(); }
Object const & GetObjectById(ObjectId id) const;
Object & GetObjectById(ObjectId id);
- vector<ObjectId> GetNearestObjects(ms::LatLon const & latLon, size_t limit,
+ std::vector<ObjectId> GetNearestObjects(ms::LatLon const & latLon, size_t limit,
double maxDistance = 0.0) const;
/// @return true if |fb| satisfies some necessary conditions to match one or serveral
@@ -51,9 +53,9 @@ public:
// Applies changes to a given osm object (for example, remove hotel type)
// and passes the result to |fn|.
void PreprocessMatchedOsmObject(ObjectId matchedObjId, FeatureBuilder1 & fb,
- function<void(FeatureBuilder1 &)> const fn) const;
+ std::function<void(FeatureBuilder1 &)> const fn) const;
// Creates objects and adds them to the map (MWM) via |fn|.
- void BuildOsmObjects(function<void(FeatureBuilder1 &)> const & fn) const;
+ void BuildOsmObjects(std::function<void(FeatureBuilder1 &)> const & fn) const;
protected:
class AddressMatcher
@@ -64,7 +66,7 @@ protected:
private:
Index m_index;
- unique_ptr<search::ReverseGeocoder> m_coder;
+ std::unique_ptr<search::ReverseGeocoder> m_coder;
};
// TODO(mgsergio): Get rid of Box since boost::rtree supports point as value type.
@@ -72,20 +74,20 @@ protected:
// instead of boost::geometry::cs::cartesian.
using Point = boost::geometry::model::point<float, 2, boost::geometry::cs::cartesian>;
using Box = boost::geometry::model::box<Point>;
- using Value = pair<Box, ObjectId>;
+ using Value = std::pair<Box, ObjectId>;
// Create the rtree using default constructor.
boost::geometry::index::rtree<Value, boost::geometry::index::quadratic<16>> m_rtree;
void BuildObject(Object const & object,
- function<void(FeatureBuilder1 &)> const & fn) const;
+ std::function<void(FeatureBuilder1 &)> const & fn) const;
- void LoadData(istream & src, string const & addressReferencePath);
+ void LoadData(std::istream & src, std::string const & addressReferencePath);
/// @return an id of a matched object or kInvalidObjectId on failure.
ObjectId FindMatchingObjectIdImpl(FeatureBuilder1 const & fb) const;
- map<ObjectId, Object> m_objects;
+ std::map<ObjectId, Object> m_objects;
};
} // namespace generator