14 #include <boost/signals2.hpp>
15 #include <boost/foreach.hpp>
17 namespace MAKVRinTerra
23 ,
public boost::enable_shared_from_this< DtDynamicFeature<F> >
24 #ifdef DtObjectDebugger_Enable
30 typedef typename F::Key
Key;
35 typedef boost::shared_ptr<DtDynamicFeature>
Ptr;
36 typedef boost::shared_ptr<const DtDynamicFeature>
CPtr;
64 BOOST_FOREACH(
const typename AttributeMap::value_type& pair,
myAttributes)
65 func(pair.first, pair.second);
93 return boost::none_t();
101 Mutex::scoped_lock lock(
myMutex,
false);
116 boost::signals2::connection conn(
myDeleteSignal.connect(callback, boost::signals2::at_front));
117 return boost::bind(&boost::signals2::connection::disconnect, conn);
122 Mutex::scoped_lock lock(
myMutex,
false);
129 Mutex::scoped_lock lock(
myMutex,
true);
AttributeMap myAttributes
Definition: dynamicFeature.h:151
void setDeleted()
Definition: dynamicFeature.h:126
~DtDynamicFeature()
Definition: dynamicFeature.h:45
Key used to lookup attributes. The DtFeature interface is a dictionary that maps Key objects to attri...
Definition: feature.h:68
Wraps a feature object and makes sure all the callbacks are unhooked correctly In order to wrap a fea...
Definition: feature.h:301
Feature object representing a dynamic feature.
Definition: dynamicFeature.h:21
F::Attribute Attribute
Definition: dynamicFeature.h:31
bool isDeleted() const
Definition: dynamicFeature.h:120
DtFeature * clone() const
Definition: dynamicFeature.h:51
DetachCallback addDeleteCallback(const DeleteCallback &callback) const
Definition: dynamicFeature.h:96
DtFeatureGeometry geometry() const
Definition: dynamicFeature.h:57
Default on in debug, off in release.
Definition: objectCounter.h:31
DtDynamicFeature(DtFeatureGeometry geom=DtFeatureGeometry())
Definition: dynamicFeature.h:38
void forEachAttribute(ForEachFunction func) const
Definition: dynamicFeature.h:62
boost::function< void()> DetachCallback
Callback used to detach the user from a feature so the users callback is not called anymore...
Definition: feature.h:180
DeleteSignal myDeleteSignal
Definition: dynamicFeature.h:146
String name
Definition: feature.h:101
unsigned index
Definition: feature.h:102
boost::function< void(const Key &, const Attribute &)> ForEachFunction
Callback used to iterating through attributes with ForEachAttribute.
Definition: feature.h:151
binderNoArgs< _Fn > bind(const _Fn &_Func, const _Ty &_Left)
Definition: DtSTLUtilities.h:76
boost::function< void()> DeleteCallback
User supplied callback called when feature is deleted.
Definition: feature.h:183
bool myDeletedFlag
Definition: dynamicFeature.h:143
unsigned numberOfAttributes(const typename Key::String &name) const
Definition: dynamicFeature.h:68
Mutex myMutex
Definition: dynamicFeature.h:142
std::map< Key, Attribute > AttributeMap
Definition: dynamicFeature.h:150
tbb::spin_rw_mutex Mutex
Definition: dynamicFeature.h:141
F::DetachCallback DetachCallback
Definition: dynamicFeature.h:33
boost::shared_ptr< DtDynamicFeature > Ptr
Definition: dynamicFeature.h:35
boost::signals2::signal< void()> DeleteSignal
Definition: dynamicFeature.h:145
F::ForEachFunction ForEachFunction
Definition: dynamicFeature.h:29
boost::optional< Attribute > attribute(const Key &k) const
Definition: dynamicFeature.h:84
Case insensitive string.
Definition: feature.h:71
Represents a GIS feature. Features consist of a DtFeatureGeometry (2.5D geometric vector data) and a ...
Definition: feature.h:37
DtFeatureGeometry myGeometry
Definition: dynamicFeature.h:148
F::Key Key
Definition: dynamicFeature.h:30
boost::shared_ptr< const DtDynamicFeature > CPtr
Definition: dynamicFeature.h:36
Represents a feature geometry.
Definition: featureGeometry.h:39
F::DeleteCallback DeleteCallback
Definition: dynamicFeature.h:32
bool hasAttribute(const Key &k) const
Definition: dynamicFeature.h:76