Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 122db77

Browse files
committed
[core] document lifetimes of GeometryTileFeatures
1 parent 244484c commit 122db77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mbgl/tile/geometry_tile_data.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,21 @@ class GeometryTileLayer {
5151
public:
5252
virtual ~GeometryTileLayer() = default;
5353
virtual std::size_t featureCount() const = 0;
54+
55+
// Returns the feature object at the given position within the layer. The returned feature
56+
// object may *not* outlive the layer object.
5457
virtual std::unique_ptr<GeometryTileFeature> getFeature(std::size_t) const = 0;
58+
5559
virtual std::string getName() const = 0;
5660
};
5761

5862
class GeometryTileData {
5963
public:
6064
virtual ~GeometryTileData() = default;
6165
virtual std::unique_ptr<GeometryTileData> clone() const = 0;
66+
67+
// Returns the layer with the given name. The returned layer object *may* outlive the data
68+
// object.
6269
virtual std::unique_ptr<GeometryTileLayer> getLayer(const std::string&) const = 0;
6370
};
6471

0 commit comments

Comments
 (0)