diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-06-21 13:01:33 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-06-21 17:18:08 -0700 |
commit | 122db775818a305cbae797875cc5aae48b6dfe19 (patch) | |
tree | a351f9f8dc8735c7e8f5d638003fc9917cac8d40 | |
parent | 244484ca6c64b6024a59786a194ea8ba19fae809 (diff) | |
download | qtlocation-mapboxgl-122db775818a305cbae797875cc5aae48b6dfe19.tar.gz |
[core] document lifetimes of GeometryTileFeatures
-rw-r--r-- | src/mbgl/tile/geometry_tile_data.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mbgl/tile/geometry_tile_data.hpp b/src/mbgl/tile/geometry_tile_data.hpp index 741c5149a9..449d8cab28 100644 --- a/src/mbgl/tile/geometry_tile_data.hpp +++ b/src/mbgl/tile/geometry_tile_data.hpp @@ -51,7 +51,11 @@ class GeometryTileLayer { public: virtual ~GeometryTileLayer() = default; virtual std::size_t featureCount() const = 0; + + // Returns the feature object at the given position within the layer. The returned feature + // object may *not* outlive the layer object. virtual std::unique_ptr<GeometryTileFeature> getFeature(std::size_t) const = 0; + virtual std::string getName() const = 0; }; @@ -59,6 +63,9 @@ class GeometryTileData { public: virtual ~GeometryTileData() = default; virtual std::unique_ptr<GeometryTileData> clone() const = 0; + + // Returns the layer with the given name. The returned layer object *may* outlive the data + // object. virtual std::unique_ptr<GeometryTileLayer> getLayer(const std::string&) const = 0; }; |