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>
50 #ifdef DtObjectDebugger_Enable
58 typedef typename FeatureSet::Feature
Feature;
67 std::string label()
const;
70 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
72 bool loaded(
double = 0.0)
const;
74 unsigned numberOfFeatures()
const;
77 bool isIndexed()
const;
78 bool isCacheable(
const boost::optional<DtFeatureGeometry>& area)
const;
79 void cacheEstimate(
double& time,
double&
size,
const boost::optional<DtFeatureGeometry>& area)
const;
81 const boost::optional<DtFeatureGeometry>& area,
102 template <
typename FS>
105 #ifdef DtObjectDebugger_Enable
119 std::string label()
const;
124 bool loaded(
double = 0.0)
const;
126 unsigned numberOfFeatures()
const;
143 template <
typename FS,
typename F>
146 #ifdef DtObjectDebugger_Enable
149 ,
public boost::enable_shared_from_this< DtSinkFeatureSet<FS,F> >
157 typedef boost::shared_ptr<DtSinkFeatureSet>
Ptr;
181 template <
typename Factory>
184 typedef AddFeatureFactory<Factory> FactoryType;
188 if (sink->input && !sink->input->elided())
194 static Ptr Make(FeatureSet*);
199 std::string label()
const;
200 FS* filter(
const DtQuery&,
const boost::optional<DtFeatureGeometry>&,
DtLoadType)
const;
201 void forEachFeatureParallel(
const ForEachFunction&)
const;
202 DetachCallback forEachFeatureAsync(
const ForEachFunction& func)
const;
204 bool loaded(
double = 0.0)
const;
205 DetachCallback addLoadedCallback(
const LoadedCallback&)
const;
206 unsigned numberOfFeatures()
const;
210 virtual DetachCallback forEachFeaturePtrAsync(
const ForEachPtrFunction&)
const;
212 struct ParallelCaller;
215 struct GeometryFilterAdder;
216 struct AttributeFilterAdder;
217 struct RemoveFeature;
218 struct ParallelAdder;
219 struct RemoveCallback;
226 struct CallbackRecord;
232 typedef tbb::spin_rw_mutex
Mutex;
237 virtual void addFeatureImpl(
const FeaturePtr&);
238 virtual void removeFeature(
typename FeatureSequence::iterator i);
240 virtual void removeCallback(
typename FeatureCallbacks::iterator i);
249 template <
typename FS>
262 typedef boost::shared_ptr<DtDeletingSinkFeatureSet>
Ptr;
263 typedef boost::shared_ptr<const DtDeletingSinkFeatureSet>
CPtr;
265 static Ptr Make(FS*);
269 Ptr shared_from_this();
270 CPtr shared_from_this()
const;
285 template <
typename FS>
288 #ifdef DtObjectDebugger_Enable
301 typedef typename boost::shared_ptr<DtSourceFeatureSet>
Ptr;
303 static Ptr Make(FS* input = 0);
310 std::string label()
const;
DtQuery myQuery
Definition: featureSetUtils.h:96
DtFeatureSet which filters out features from a feature set. Wraps a feature set with a geometry and q...
Definition: featureSetUtils.h:48
Definition: featureSetUtils.h:28
#define DT_DLL_features
stop complaining about multiple independent base classes for boost::noncopyable this should probably ...
Definition: featuresDefines.h:41
FS FeatureSet
Definition: featureSetUtils.h:112
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:164
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:115
static Ptr Make(const DtSinkFeatureSet &fs, const Factory &factory)
template <typename factory>=""> static Ptr Make(FS*, const Factory& factory) { typedef AddFeatureFact...
Definition: featureSetUtils.h:182
FS FeatureSet
Definition: featureSetUtils.h:159
Base::FeaturePtr FeaturePtr
Definition: featureSetUtils.h:260
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:162
FeaturePtr addFeatureRef(const Feature &f)
Definition: featureSetUtils.h:308
Definition: featureSetUtils.h:37
Definition: featureSetUtils.h:25
Definition: featureSet.h:48
boost::shared_ptr< DtSourceFeatureSet > Ptr
Definition: featureSetUtils.h:301
const boost::scoped_ptr< FS > input
Definition: featureSetUtils.h:243
FS::ConstVisitor ConstVisitor
Definition: featureSetUtils.h:63
FeaturePtr addFeature(const Feature &f)
Definition: featureSetUtils.h:307
virtual DetachCallback forEachFeaturePtrAsync(const ForEachPtrFunction &) const
tbb::spin_rw_mutex Mutex
Definition: featureSetUtils.h:230
Base::Feature Feature
Definition: featureSetUtils.h:259
voidpf void uLong size
Definition: ioapi.h:39
FeaturePtr addFeature(Feature *f)
these functions make it easier to take the address of addFeature
Definition: featureSetUtils.h:306
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:60
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:113
Base::AddFeature AddFeature
Definition: featureSetUtils.h:256
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:265
std::list< FeaturePtr > FeatureSequence
Definition: featureSetUtils.h:235
Default on in debug, off in release.
Definition: objectCounter.h:31
boost::shared_ptr< const DtDeletingSinkFeatureSet > CPtr
Definition: featureSetUtils.h:263
boost::optional< DtFeatureGeometry > myGeometry
Definition: featureSetUtils.h:97
class DT_DLL_features DtEmptyFeatureSet
Definition: featureSet.h:78
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:298
FeatureSet::Feature Feature
Definition: featureSetUtils.h:58
bool empty() const
Definition: featureSetUtils.h:128
class DT_DLL_features DtSinkFeatureSet
Definition: featureSet.h:81
Feature set object which will take another feature set, iterate over its contents asynchronously and ...
Definition: featureSetUtils.h:144
Definition: featureSetUtils.h:31
Definition: featureSetUtils.h:22
FeatureSequence features
callbacks for new features
Definition: featureSetUtils.h:245
Represents a set of characeters a DtFeature object can have. DtQuery objects are the way to communica...
Definition: query.h:38
bool elided() const
Definition: featureSetUtils.h:127
boost::shared_ptr< F > FeaturePtr
Definition: featureSetUtils.h:160
class DT_DLL_features DtSourceFeatureSet
Definition: featureSet.h:84
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:163
FeatureCallbacks featureCallbacks
feature set to read from
Definition: featureSetUtils.h:244
DtSinkFeatureSet< FS >::Feature Feature
Definition: featureSetUtils.h:295
FS FeatureSet
Definition: featureSetUtils.h:57
#define DT_DEFINE_OBJECT_DEBUGGER_NAME_TEMPLATE(type)
Definition: objectCounter.h:275
Definition: featureSetUtils.h:214
FS::Visitor Visitor
Definition: featureSetUtils.h:62
Definition: featureSetUtils.h:34
boost::function< void(const FeaturePtr &)> ForEachPtrFunction
Definition: featureSetUtils.h:166
boost::shared_ptr< DtSinkFeatureSet > Ptr
Definition: featureSetUtils.h:157
bool myEmptyFlag
Definition: featureSetUtils.h:98
boost::shared_ptr< CallbackRecord > CallbackRecordPtr
Definition: featureSetUtils.h:226
std::auto_ptr< FS > myFeatureSet
Definition: featureSetUtils.h:93
DtSinkFeatureSet< FS >::FeaturePtr FeaturePtr
Definition: featureSetUtils.h:296
DtSinkFeatureSet Base
Definition: featureSetUtils.h:155
Dummy feature set which contains no features.
Definition: featureSetUtils.h:103
Base::FeatureSet FeatureSet
Definition: featureSetUtils.h:258
DtLoadType
Used to indicate whether to load features. See DtFeatureSetTemplate::filter.
Definition: featureSet.h:36
Source feature sets are used to create your own feature sets with your own features.
Definition: featureSetUtils.h:286
boost::shared_ptr< DtDeletingSinkFeatureSet > Ptr
Definition: featureSetUtils.h:262
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:114
FS FeatureSet
Definition: featureSetUtils.h:294
Definition: featureSetUtils.h:40
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:61
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:59
Definition: featureSetUtils.h:250
bool deleted
saved features
Definition: featureSetUtils.h:246
DtSinkFeatureSet< FS, DtFeatureWrapper< typename FS::Feature > > Base
Definition: featureSetUtils.h:255
class DT_DLL_features DtFilteredFeatureSet
Definition: featureSet.h:75
Represents a feature geometry.
Definition: featureGeometry.h:39
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:299
std::list< CallbackRecordPtr > FeatureCallbacks
Definition: featureSetUtils.h:234
Mutex mutex
Definition: featureSetUtils.h:242