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;
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;
DtQuery myQuery
Definition: featureSetUtils.h:94
DtFeatureSet which filters out features from a feature set.
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:36
FS FeatureSet
Definition: featureSetUtils.h:108
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:158
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:111
static Ptr Make(const DtSinkFeatureSet &fs, const Factory &factory)
template <typename factory>=""> static Ptr Make(FS*, const Factory& factory) { typedef AddFeatureFact...
Definition: featureSetUtils.h:176
FS FeatureSet
Definition: featureSetUtils.h:153
Base::FeaturePtr FeaturePtr
Definition: featureSetUtils.h:254
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:156
FeaturePtr addFeatureRef(const Feature &f)
Definition: featureSetUtils.h:300
Definition: featureSetUtils.h:37
Definition: featureSetUtils.h:25
Definition: featureSet.h:48
boost::shared_ptr< DtSourceFeatureSet > Ptr
Definition: featureSetUtils.h:293
const boost::scoped_ptr< FS > input
Definition: featureSetUtils.h:237
FS::ConstVisitor ConstVisitor
Definition: featureSetUtils.h:61
FeaturePtr addFeature(const Feature &f)
Definition: featureSetUtils.h:299
virtual DetachCallback forEachFeaturePtrAsync(const ForEachPtrFunction &) const
tbb::spin_rw_mutex Mutex
Definition: featureSetUtils.h:224
Base::Feature Feature
Definition: featureSetUtils.h:253
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:298
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:58
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:109
Base::AddFeature AddFeature
Definition: featureSetUtils.h:250
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:265
std::list< FeaturePtr > FeatureSequence
Definition: featureSetUtils.h:229
Default on in debug, off in release.
Definition: objectCounter.h:31
boost::shared_ptr< const DtDeletingSinkFeatureSet > CPtr
Definition: featureSetUtils.h:257
boost::optional< DtFeatureGeometry > myGeometry
Definition: featureSetUtils.h:95
class DT_DLL_features DtEmptyFeatureSet
Definition: featureSet.h:78
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:290
FeatureSet::Feature Feature
Definition: featureSetUtils.h:56
bool empty() const
Definition: featureSetUtils.h:124
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:140
Definition: featureSetUtils.h:31
Definition: featureSetUtils.h:22
FeatureSequence features
callbacks for new features
Definition: featureSetUtils.h:239
Represents a set of characeters a DtFeature object can have.
Definition: query.h:38
bool elided() const
Definition: featureSetUtils.h:123
boost::shared_ptr< F > FeaturePtr
Definition: featureSetUtils.h:154
class DT_DLL_features DtSourceFeatureSet
Definition: featureSet.h:84
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:157
FeatureCallbacks featureCallbacks
feature set to read from
Definition: featureSetUtils.h:238
DtSinkFeatureSet< FS >::Feature Feature
Definition: featureSetUtils.h:287
FS FeatureSet
Definition: featureSetUtils.h:55
#define DT_DEFINE_OBJECT_DEBUGGER_NAME_TEMPLATE(type)
Definition: objectCounter.h:275
Definition: featureSetUtils.h:208
FS::Visitor Visitor
Definition: featureSetUtils.h:60
Definition: featureSetUtils.h:34
boost::function< void(const FeaturePtr &)> ForEachPtrFunction
Definition: featureSetUtils.h:160
boost::shared_ptr< DtSinkFeatureSet > Ptr
Definition: featureSetUtils.h:151
bool myEmptyFlag
Definition: featureSetUtils.h:96
boost::shared_ptr< CallbackRecord > CallbackRecordPtr
Definition: featureSetUtils.h:220
std::auto_ptr< FS > myFeatureSet
Definition: featureSetUtils.h:91
DtSinkFeatureSet< FS >::FeaturePtr FeaturePtr
Definition: featureSetUtils.h:288
DtSinkFeatureSet Base
Definition: featureSetUtils.h:149
Dummy feature set which contains no features.
Definition: featureSetUtils.h:101
Base::FeatureSet FeatureSet
Definition: featureSetUtils.h:252
DtLoadType
Used to indicate whether to load features.
Definition: featureSet.h:36
Source feature sets are used to create your own feature sets with your own features.
Definition: featureSetUtils.h:280
boost::shared_ptr< DtDeletingSinkFeatureSet > Ptr
Definition: featureSetUtils.h:256
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:110
FS FeatureSet
Definition: featureSetUtils.h:286
Definition: featureSetUtils.h:40
FeatureSet::LoadedCallback LoadedCallback
Definition: featureSetUtils.h:59
FeatureSet::ForEachFunction ForEachFunction
Definition: featureSetUtils.h:57
Definition: featureSetUtils.h:244
bool deleted
saved features
Definition: featureSetUtils.h:240
DtSinkFeatureSet< FS, DtFeatureWrapper< typename FS::Feature > > Base
Definition: featureSetUtils.h:249
class DT_DLL_features DtFilteredFeatureSet
Definition: featureSet.h:75
Represents a feature geometry.
Definition: featureGeometry.h:35
FeatureSet::DetachCallback DetachCallback
Definition: featureSetUtils.h:291
std::list< CallbackRecordPtr > FeatureCallbacks
Definition: featureSetUtils.h:228
Mutex mutex
Definition: featureSetUtils.h:236