3 #ifndef DUNE_PROPERTYMAP_HH
4 #define DUNE_PROPERTYMAP_HH
77 template<
class Reference,
class PropertyMap>
81 template<
class Reference,
class PropertyMap,
class Key>
86 return static_cast<const PropertyMap&
>(pmap)[key];
89 template<
class Reference,
class PropertyMap,
class Key,
class Value>
92 const Key& key,
const Value& value)
95 ::exists),
"WritablePropertyMapTag required!");
96 static_cast<const PropertyMap&
>(pmap)[key] = value;
102 template<
class RAI,
class IM,
103 class T =
typename std::iterator_traits<RAI>::value_type,
104 class R =
typename std::iterator_traits<RAI>::reference>
150 : iter_(iter), indexMap_(im)
155 : iter_(), indexMap_()
161 return *(iter_ +
get(indexMap_, key));
166 RandomAccessIterator iter_;
178 AssociativePropertyMap<T> >
183 typedef T UniqueAssociativeContainer;
188 typedef typename UniqueAssociativeContainer::value_type::first_type
194 typedef typename UniqueAssociativeContainer::value_type::second_type
200 typedef ValueType& Reference;
221 inline Reference operator[](KeyType key)
const
223 return map_->find(key)->second;
226 UniqueAssociativeContainer* map_;
236 ConstAssociativePropertyMap<T> >
241 typedef T UniqueAssociativeContainer;
246 typedef typename UniqueAssociativeContainer::value_type::first_type
252 typedef typename UniqueAssociativeContainer::value_type::second_type
258 typedef const ValueType& Reference;
279 inline Reference operator[](KeyType key)
const
281 return map_->find(key)->second;
284 const UniqueAssociativeContainer* map_;
317 template<
typename T,
typename C>
Definition: propertymap.hh:15
LvaluePropertyMapTag Category
The category of this property map.
Definition: propertymap.hh:139
RAI RandomAccessIterator
The type of the random access iterator.
Definition: propertymap.hh:112
std::ptrdiff_t KeyType
Definition: propertymap.hh:63
T ValueType
The value type of the property map.
Definition: propertymap.hh:129
T ValueType
Definition: propertymap.hh:61
Selector for the property map type.
Definition: propertymap.hh:318
std::size_t Reference
The reference type of the map.
Definition: propertymap.hh:300
R Reference
The reference type of the property map.
Definition: propertymap.hh:134
Reference operator[](KeyType key) const
Access the a value by reference.
Definition: propertymap.hh:159
C Container
The container type to whose entries the properties are attached.
Definition: propertymap.hh:328
ReadablePropertyMapTag Category
The category of the map.
Definition: propertymap.hh:303
A property map that applies the identity function to integers.
Definition: propertymap.hh:290
const ValueType & Reference
Definition: propertymap.hh:72
std::size_t ValueType
The value type of the map.
Definition: propertymap.hh:297
An adaptor to turn an unique associative container into a property map.
Definition: propertymap.hh:234
std::ptrdiff_t KeyType
Definition: propertymap.hh:73
Adapter to turn a random access iterator into a property map.
Definition: propertymap.hh:105
ValueType & Reference
Definition: propertymap.hh:62
PM::KeyType KeyType
The type of the key of the property map.
Definition: propertymap.hh:20
T Tag
the tag identifying the property.
Definition: propertymap.hh:323
ValueType operator[](const KeyType &key) const
Definition: propertymap.hh:305
PM::Category Category
The category the property map belongs to.
Definition: propertymap.hh:32
PM::ValueType ValueType
The type of the values of the property map.
Definition: propertymap.hh:24
Tag for the category of lvalue property maps.
Definition: propertymap.hh:54
IteratorPropertyMap()
Constructor.
Definition: propertymap.hh:154
std::size_t KeyType
The key type of the map.
Definition: propertymap.hh:294
LvaluePropertyMapTag Category
Definition: propertymap.hh:74
Dune namespace.
Definition: alignment.hh:9
IteratorPropertyMap(RandomAccessIterator iter, const IndexMap &im=IndexMap())
Constructor.
Definition: propertymap.hh:148
Tag for the category of readable and writable property maps.
Definition: propertymap.hh:47
Definition: propertymap.hh:78
IndexMap::KeyType KeyType
The key type of the property map.
Definition: propertymap.hh:124
Checks wether a type is convertible to another.
Definition: typetraits.hh:176
IM IndexMap
The type of the index map.
Definition: propertymap.hh:119
LvaluePropertyMapTag Category
Definition: propertymap.hh:64
T ValueType
Definition: propertymap.hh:71
Tag for the category of readable property maps.
Definition: propertymap.hh:36
void put(const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key, const Value &value)
Definition: propertymap.hh:91
Traits for type conversions and type information.
PM::Reference Reference
The type of the reference to the values.
Definition: propertymap.hh:28
Tag for the category of writable property maps.
Definition: propertymap.hh:40
An adapter to turn an unique associative container into a property map.
Definition: propertymap.hh:176