18 #include <tbb/spin_mutex.h>
19 #include <tbb/mutex.h>
20 #include <tbb/compat/condition_variable>
22 #include <boost/signals2.hpp>
24 namespace MAKVRinTerra
29 template <
typename FS>
33 ,
public boost::enable_shared_from_this<DtAsyncLoadingFeatureSet<FS> >
37 typedef boost::shared_ptr<DtAsyncLoadingFeatureSet>
Ptr;
40 typedef boost::weak_ptr<DtAsyncLoadingFeatureSet>
WPtr;
56 virtual void start(
bool wait);
58 std::string label()
const;
63 bool loaded(
double)
const;
65 unsigned numberOfFeatures()
const;
69 unsigned size()
const;
70 boost::shared_ptr<DtUnusedFeatureTileTracker::Trackable> getPtr()
const;
82 typedef boost::signals2::signal_type<
84 boost::signals2::keywords::mutex_type<tbb::spin_mutex> >::type
LoadedSignal;
87 struct SizeCalculator;
92 virtual bool run(
bool wait);
100 virtual void inputLoadedCallback();
102 struct InputLoadedCaller;
106 const boost::optional<DtFeatureGeometry>& geom,
125 template <
typename FS>
128 #ifdef DtObjectDebugger_Enable
129 ,
public DtObjectDebugger<typename DtAsyncLoadingFeatureSet<FS>::LoadingFeatureSet>
141 const boost::shared_ptr<FS>&,
148 std::string
label()
const;
155 struct WrapWithLoadingFeatureRef;
162 template <
typename FS>
167 typedef boost::shared_ptr<DtQueueLoadingFeatureSet>
Ptr;
168 typedef boost::shared_ptr<DtQueueLoadingFeatureSet>
WPtr;
180 void start(
bool wait);
184 const boost::optional<DtFeatureGeometry>& geom,
185 const boost::shared_ptr<Queue>& queue,
boost::weak_ptr< DtAsyncLoadingFeatureSet > WPtr
Weak pointer.
Definition: asyncLoadingFeatureSet.h:40
#define DT_DLL_features
stop complaining about multiple independent base classes for boost::noncopyable this should probably ...
Definition: featuresDefines.h:41
FS FeatureSet
Definition: asyncLoadingFeatureSet.h:42
FeatureSet::LoadedCallback LoadedCallback
Definition: asyncLoadingFeatureSet.h:45
FeatureSet::ForEachFunction ForEachFunction
Definition: asyncLoadingFeatureSet.h:44
FeatureSet::ForEachFunction ForEachFunction
Definition: asyncLoadingFeatureSet.h:172
DtAsyncLoadingFeatureSet< FS >::WPtr BaseWPtr
Definition: asyncLoadingFeatureSet.h:170
boost::shared_ptr< DtAsyncLoadingFeatureSet > Ptr
Shared pointer.
Definition: asyncLoadingFeatureSet.h:37
ConditionVariable myWaitCondition
Definition: asyncLoadingFeatureSet.h:110
boost::optional< DtFeatureGeometry > myGeometry
Definition: asyncLoadingFeatureSet.h:121
DtFeatureSetWrapper< FeatureSet, boost::shared_ptr > myFeatureSet
Definition: asyncLoadingFeatureSet.h:122
Definition: asyncLoadingFeatureSet.h:163
const boost::weak_ptr< Queue > myQueue
Definition: asyncLoadingFeatureSet.h:189
tbb::interface5::unique_lock< Mutex > ScopedLock
Definition: asyncLoadingFeatureSet.h:80
std::string label() const
Only used for output, won't change operation.
voidpf void uLong size
Definition: ioapi.h:39
boost::shared_ptr< Sentinel > Ptr
Definition: unusedFeatureTileTracker.h:235
Default on in debug, off in release.
Definition: objectCounter.h:27
Simple asynchronous callback queue.
Definition: vrfCallbackQueue.h:32
tbb::interface5::condition_variable ConditionVariable
Definition: asyncLoadingFeatureSet.h:79
tbb::mutex Mutex
Definition: asyncLoadingFeatureSet.h:78
boost::shared_ptr< DtQueueLoadingFeatureSet > WPtr
Definition: asyncLoadingFeatureSet.h:168
DtVrfCallbackQueue Queue
Definition: asyncLoadingFeatureSet.h:174
tbb::atomic< bool > myInputLoadedFlag
actually running
Definition: asyncLoadingFeatureSet.h:114
Loads a feature set using a user supplied threading policy. This class uses boost::enable_shared_from...
Definition: asyncLoadingFeatureSet.h:30
boost::shared_ptr< DtUnusedFeatureTileTracker > Ptr
Definition: unusedFeatureTileTracker.h:52
Mixin interface for classes which wish to be tracked.
Definition: unusedFeatureTileTracker.h:145
Represents a set of characeters a DtFeature object can have. DtQuery objects are the way to communica...
Definition: query.h:38
FS::Feature Feature
Definition: asyncLoadingFeatureSet.h:43
bool myLoadedFlag
input feature set has finished loading
Definition: asyncLoadingFeatureSet.h:115
FeatureSet::DetachCallback DetachCallback
Definition: asyncLoadingFeatureSet.h:46
Mutex myConditionMutex
Definition: asyncLoadingFeatureSet.h:109
LoadedSignal myLoadedSignal
wrapped feature set created
Definition: asyncLoadingFeatureSet.h:117
FeatureSet * clone() const
DetachCallback forEachFeatureAsync(const ForEachFunction &) const
boost::signals2::signal_type< void(), boost::signals2::keywords::mutex_type< tbb::spin_mutex > >::type LoadedSignal
Definition: asyncLoadingFeatureSet.h:84
DtLoadType
Used to indicate whether to load features. See DtFeatureSetTemplate::filter.
Definition: featureSet.h:36
DtQuery myQuery
Definition: asyncLoadingFeatureSet.h:120
tbb::atomic< bool > myLoadingFlag
Definition: asyncLoadingFeatureSet.h:112
DtFeatureSetWrapper< FS, boost::shared_ptr > Base
Definition: asyncLoadingFeatureSet.h:133
boost::shared_ptr< DtQueueLoadingFeatureSet > Ptr
Definition: asyncLoadingFeatureSet.h:167
std::auto_ptr< FeatureSet > myInputFeatureSet
Definition: asyncLoadingFeatureSet.h:119
Definition: asyncLoadingFeatureSet.h:126
DtUnusedFeatureTileTracker::Sentinel::Ptr mySentinel
Definition: asyncLoadingFeatureSet.h:159
void forEachFeatureParallel(const ForEachFunction &) const
tbb::atomic< bool > myRunningFlag
requested to load
Definition: asyncLoadingFeatureSet.h:113
class DT_DLL_features LoadingFeatureSet
Definition: asyncLoadingFeatureSet.h:49
FeatureSet * filter(const DtQuery &, const boost::optional< DtFeatureGeometry > &, DtLoadType) const
DtAsyncLoadingFeatureSet< FS >::Ptr BasePtr
Definition: asyncLoadingFeatureSet.h:169
DtAsyncLoadingFeatureSet< FS >::FeatureSet FeatureSet
Definition: asyncLoadingFeatureSet.h:171