equal
deleted
inserted
replaced
441 |
441 |
442 /// \brief Copy the source map to the target map. |
442 /// \brief Copy the source map to the target map. |
443 /// |
443 /// |
444 /// Copy the \c source map to the \c target map. It uses the given iterator |
444 /// Copy the \c source map to the \c target map. It uses the given iterator |
445 /// to iterate on the data structure. |
445 /// to iterate on the data structure. |
446 template <typename Target, typename Source, |
446 template <typename Target, typename Source, typename ItemIt> |
447 typename ItemIt> |
|
448 void copyMap(Target& target, const Source& source, ItemIt it) { |
447 void copyMap(Target& target, const Source& source, ItemIt it) { |
449 for (; it != INVALID; ++it) { |
448 for (; it != INVALID; ++it) { |
450 target[it] = source[it]; |
449 target[it] = source[it]; |
451 } |
450 } |
452 } |
451 } |
886 /// This type provides simple invertable graph-maps. |
885 /// This type provides simple invertable graph-maps. |
887 /// The InvertableMap wraps an arbitrary ReadWriteMap |
886 /// The InvertableMap wraps an arbitrary ReadWriteMap |
888 /// and if a key is set to a new value then store it |
887 /// and if a key is set to a new value then store it |
889 /// in the inverse map. |
888 /// in the inverse map. |
890 /// \param _Graph The graph type. |
889 /// \param _Graph The graph type. |
891 /// \param _Map The map to extend with invertable functionality. |
890 /// \param _Item The item type of the graph. |
|
891 /// \param _Value The value type of the map. |
|
892 #ifndef DOXYGEN |
|
893 /// \param _Map A ReadWriteMap mapping from the item type to integer. |
892 template < |
894 template < |
893 typename _Graph, |
895 typename _Graph, typename _Item, typename _Value, typename _Map |
894 typename _Item, |
|
895 typename _Value, |
|
896 typename _Map |
|
897 = typename ItemSetTraits<_Graph, _Item>::template Map<_Value>::Parent |
896 = typename ItemSetTraits<_Graph, _Item>::template Map<_Value>::Parent |
898 > |
897 > |
|
898 #else |
|
899 template <typename _Graph, typename _Item, typename _Value> |
|
900 #endif |
899 class InvertableMap : protected _Map { |
901 class InvertableMap : protected _Map { |
900 |
902 |
901 public: |
903 public: |
902 |
904 |
903 typedef _Map Map; |
905 typedef _Map Map; |
1033 /// with its member class \c InverseMap. |
1035 /// with its member class \c InverseMap. |
1034 /// |
1036 /// |
1035 /// \param _Graph The graph class the \c DescriptorMap belongs to. |
1037 /// \param _Graph The graph class the \c DescriptorMap belongs to. |
1036 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or |
1038 /// \param _Item The Item is the Key of the Map. It may be Node, Edge or |
1037 /// UndirEdge. |
1039 /// UndirEdge. |
|
1040 #ifndef DOXYGEN |
1038 /// \param _Map A ReadWriteMap mapping from the item type to integer. |
1041 /// \param _Map A ReadWriteMap mapping from the item type to integer. |
1039 template < |
1042 template < |
1040 typename _Graph, |
1043 typename _Graph, typename _Item, typename _Map |
1041 typename _Item, |
1044 = typename ItemSetTraits<_Graph, _Item>::template Map<int>::Parent |
1042 typename _Map |
|
1043 = typename ItemSetTraits<_Graph, _Item>::template Map<int>::Parent |
|
1044 > |
1045 > |
|
1046 #else |
|
1047 template <typename _Graph, typename _Item> |
|
1048 #endif |
1045 class DescriptorMap : protected _Map { |
1049 class DescriptorMap : protected _Map { |
1046 |
1050 |
1047 typedef _Item Item; |
1051 typedef _Item Item; |
1048 typedef _Map Map; |
1052 typedef _Map Map; |
1049 |
1053 |