[core] document lifetimes of GeometryTileFeatures

This commit is contained in:
Konstantin Käfer
2017-06-21 13:01:33 -07:00
parent 244484ca6c
commit 122db77581

View File

@@ -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;
};