17 #include <boost/scoped_ptr.hpp>
18 #include <boost/shared_ptr.hpp>
20 #include <tbb/spin_rw_mutex.h>
43 namespace MAKVRinTerra
47 template <
typename FS>
56 typedef typename FeatureSet::Feature
Feature;
65 std::string label()
const;
68 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
70 bool loaded(
double = 0.0)
const;
72 unsigned numberOfFeatures()
const;
75 bool isIndexed()
const;
76 bool isCacheable(
const boost::optional<DtFeatureGeometry>& area)
const;
77 void cacheEstimate(
double& time,
double&
size,
const boost::optional<DtFeatureGeometry>& area)
const;
79 const boost::optional<DtFeatureGeometry>& area,
100 template <
typename FS>
115 std::string label()
const;
120 bool loaded(
double = 0.0)
const;
122 unsigned numberOfFeatures()
const;
139 template <
typename FS,
typename F>
143 ,
public boost::enable_shared_from_this< DtSinkFeatureSet<FS,F> >
151 typedef boost::shared_ptr<DtSinkFeatureSet>
Ptr;
175 template <
typename Factory>
178 typedef AddFeatureFactory<Factory> FactoryType;
182 if (sink->input && !sink->input->elided())
188 static Ptr Make(FeatureSet*);
193 std::string label()
const;
194 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
195 void forEachFeatureParallel(
const ForEachFunction&)
const;
196 DetachCallback forEachFeatureAsync(
const ForEachFunction& func)
const;
198 bool loaded(
double = 0.0)
const;
199 DetachCallback addLoadedCallback(
const LoadedCallback&)
const;
200 unsigned numberOfFeatures()
const;
204 virtual DetachCallback forEachFeaturePtrAsync(
const ForEachPtrFunction&)
const;
206 struct ParallelCaller;
208 template <
typename Function>
struct AddFeatureFactory;
209 struct GeometryFilterAdder;
210 struct AttributeFilterAdder;
211 struct RemoveFeature;
212 struct ParallelAdder;
213 struct RemoveCallback;
220 struct CallbackRecord;
226 typedef tbb::spin_rw_mutex
Mutex;
231 virtual void addFeatureImpl(
const FeaturePtr&);
232 virtual void removeFeature(
typename FeatureSequence::iterator i);
234 virtual void removeCallback(
typename FeatureCallbacks::iterator i);
243 template <
typename FS>
256 typedef boost::shared_ptr<DtDeletingSinkFeatureSet>
Ptr;
257 typedef boost::shared_ptr<const DtDeletingSinkFeatureSet>
CPtr;
259 static Ptr Make(FS*);
263 Ptr shared_from_this();
264 CPtr shared_from_this()
const;
279 template <
typename FS>
293 typedef typename boost::shared_ptr<DtSourceFeatureSet>
Ptr;
295 static Ptr Make(FS* input = 0);
302 std::string label()
const;