17 #include <boost/scoped_ptr.hpp>
18 #include <boost/shared_ptr.hpp>
20 #include <tbb/spin_rw_mutex.h>
40 namespace MAKVRinTerra
44 template <
typename FS>
53 typedef typename FeatureSet::Feature
Feature;
62 std::string label()
const;
65 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
67 bool loaded(
double = 0.0)
const;
69 unsigned numberOfFeatures()
const;
71 bool isIndexed()
const;
91 template <
typename FS>
106 std::string label()
const;
111 bool loaded(
double = 0.0)
const;
113 unsigned numberOfFeatures()
const;
129 template <
typename FS,
typename F>
133 ,
public boost::enable_shared_from_this< DtSinkFeatureSet<FS,F> >
141 typedef boost::shared_ptr<DtSinkFeatureSet>
Ptr;
166 template <
typename Factory>
169 typedef AddFeatureFactory<Factory> FactoryType;
173 if (sink->input && !sink->input->empty())
179 static Ptr Make(FeatureSet*);
183 std::string label()
const;
184 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
185 void forEachFeatureParallel(
const ForEachFunction&)
const;
186 DetachCallback forEachFeatureAsync(
const ForEachFunction& func)
const;
188 bool loaded(
double = 0.0)
const;
189 DetachCallback addLoadedCallback(
const LoadedCallback&)
const;
190 unsigned numberOfFeatures()
const;
192 virtual DetachCallback forEachFeaturePtrAsync(
const ForEachPtrFunction&)
const;
194 struct ParallelCaller;
196 template <
typename Function>
struct AddFeatureFactory;
197 struct GeometryFilterAdder;
198 struct RemoveFeature;
199 struct ParallelAdder;
200 struct RemoveCallback;
207 struct CallbackRecord;
213 typedef tbb::spin_rw_mutex
Mutex;
218 virtual void addFeatureImpl(
const FeaturePtr&);
219 virtual void removeFeature(
typename FeatureSequence::iterator i);
221 virtual void removeCallback(
typename FeatureCallbacks::iterator i);
230 template <
typename FS>
243 typedef boost::shared_ptr<DtDeletingSinkFeatureSet>
Ptr;
244 typedef boost::shared_ptr<const DtDeletingSinkFeatureSet>
CPtr;
246 static Ptr Make(FS*);
250 Ptr shared_from_this();
251 CPtr shared_from_this()
const;
266 template <
typename FS>
280 typedef typename boost::shared_ptr<DtSourceFeatureSet>
Ptr;
282 static Ptr Make(FS* input = 0);
289 std::string label()
const;