9 #include <tbb/spin_mutex.h>
10 #include <tbb/spin_rw_mutex.h>
12 #include <boost/signals2.hpp>
13 #include <boost/foreach.hpp>
15 namespace MAKVRinTerra
27 typedef boost::shared_ptr<DtSimpleFeature>
Ptr;
28 typedef boost::shared_ptr<const DtSimpleFeature>
CPtr;
38 template <DtFeatureGeometry::Type T>
52 if (vec.size() <= k.
index)
53 vec.resize(k.
index + 1);
62 unsigned numberOfAttributes(
const Key::String & name)
const
64 AttributeVectorMap::const_iterator
set = myAttributeVectorMap.find(name);
65 if (
set != myAttributeVectorMap.end())
66 return set->second.size();
71 boost::optional<Attribute> attribute(
const Key & k)
const
73 AttributeVectorMap::const_iterator
set = myAttributeVectorMap.find(k.
name);
74 if (
set != myAttributeVectorMap.end())
75 if (k.
index < set->second.size())
76 return set->second[k.
index];
78 return boost::optional<Attribute>();
83 typedef AttributeVectorMap::const_iterator MapIterator;
85 for (MapIterator
set=myAttributeVectorMap.begin();
set != myAttributeVectorMap.end(); ++
set)
86 for (
unsigned setIndex=0; setIndex <
set->second.size(); ++setIndex)
87 f(
Key(set->first, setIndex),
set->second[setIndex]);
95 bool isDeleted()
const
108 template <
typename F = DtFeature>
124 Mutex::scoped_lock lock(
mutex);
130 Mutex::scoped_lock lock(
mutex);
144 Mutex::scoped_lock lock(
mutex);
151 signal.disconnect_all_slots();
157 typedef boost::signals2::signal<void ()>
Signal;