add empty_featureset (returning feature_ptr()) implementation

This commit is contained in:
artemp 2016-07-13 15:07:08 +01:00
parent abb4271bea
commit 132aa6654f

View file

@ -41,8 +41,23 @@ struct MAPNIK_DECL Featureset : private util::noncopyable
virtual ~Featureset() {}
};
struct MAPNIK_DECL empty_featureset final : Featureset
{
feature_ptr next()
{
return feature_ptr();
}
~empty_featureset() {}
};
using featureset_ptr = std::shared_ptr<Featureset>;
inline featureset_ptr make_empty_featureset()
{
return std::make_shared<empty_featureset>();
}
}
#endif // MAPNIK_FEATURESET_HPP