Changeset 987:87f7c54892df in lemon-0.x for src/lemon/map_defines.h
- Timestamp:
- 11/13/04 18:07:10 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/map_defines.h
r937 r987 52 52 */ 53 53 #define CREATE_NODE_MAP(DynMap) \ 54 template <typename Value> \55 class NodeMap : public DynMap<NodeMapRegistry, Value> { \56 public: \ 57 typedef DynMap<NodeMapRegistry, Value> Parent; \54 template <typename _Value> \ 55 class NodeMap : public DynMap<NodeMapRegistry, _Value> { \ 56 public: \ 57 typedef DynMap<NodeMapRegistry, _Value> Parent; \ 58 58 NodeMap(const typename Parent::Graph& g) \ 59 59 : Parent(g, g.node_maps) {} \ 60 NodeMap(const typename Parent::Graph& g, const Value& v) \60 NodeMap(const typename Parent::Graph& g, const _Value& v) \ 61 61 : Parent(g, g.node_maps, v) {} \ 62 62 NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \ … … 82 82 */ 83 83 #define CREATE_EDGE_MAP(DynMap) \ 84 template <typename Value> \85 class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \86 public: \ 87 typedef DynMap<EdgeMapRegistry, Value> Parent; \84 template <typename _Value> \ 85 class EdgeMap : public DynMap<EdgeMapRegistry, _Value> { \ 86 public: \ 87 typedef DynMap<EdgeMapRegistry, _Value> Parent; \ 88 88 \ 89 89 EdgeMap(const typename Parent::Graph& g) \ 90 90 : Parent(g, g.edge_maps) {} \ 91 EdgeMap(const typename Parent::Graph& g, const Value& v) \91 EdgeMap(const typename Parent::Graph& g, const _Value& v) \ 92 92 : Parent(g, g.edge_maps, v) {} \ 93 93 EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \ … … 126 126 */ 127 127 #define CREATE_SYM_EDGE_MAP(DynMap) \ 128 template <typename Value> \129 class SymEdgeMap : public DynMap<SymEdgeMapRegistry, Value> { \130 public: \ 131 typedef DynMap<SymEdgeMapRegistry, Value> Parent; \128 template <typename _Value> \ 129 class SymEdgeMap : public DynMap<SymEdgeMapRegistry, _Value> { \ 130 public: \ 131 typedef DynMap<SymEdgeMapRegistry, _Value> Parent; \ 132 132 \ 133 133 SymEdgeMap(const typename Parent::Graph& g) \ 134 134 : Parent(g, g.sym_edge_maps) {} \ 135 SymEdgeMap(const typename Parent::Graph& g, const Value& v) \135 SymEdgeMap(const typename Parent::Graph& g, const _Value& v) \ 136 136 : Parent(g, g.sym_edge_maps, v) {} \ 137 137 SymEdgeMap(const SymEdgeMap& copy) \ … … 154 154 */ 155 155 #define IMPORT_NODE_MAP(From, from, To, to) \ 156 template <typename Value> \157 class NodeMap : public From::template NodeMap< Value> { \158 \ 159 public: \ 160 typedef typename From::template NodeMap< Value> Parent; \156 template <typename _Value> \ 157 class NodeMap : public From::template NodeMap<_Value> { \ 158 \ 159 public: \ 160 typedef typename From::template NodeMap<_Value> Parent; \ 161 161 \ 162 162 NodeMap(const To& to) \ 163 163 : Parent(static_cast<const From&>(from)) { } \ 164 NodeMap(const To& to, const Value& value) \164 NodeMap(const To& to, const _Value& value) \ 165 165 : Parent(static_cast<const From&>(from), value) { } \ 166 166 NodeMap(const NodeMap& copy) \ … … 183 183 */ 184 184 #define IMPORT_EDGE_MAP(From, from, To, to) \ 185 template <typename Value> \186 class EdgeMap : public From::template EdgeMap< Value> { \187 \ 188 public: \ 189 typedef typename From::template EdgeMap< Value> Parent; \185 template <typename _Value> \ 186 class EdgeMap : public From::template EdgeMap<_Value> { \ 187 \ 188 public: \ 189 typedef typename From::template EdgeMap<_Value> Parent; \ 190 190 \ 191 191 EdgeMap(const To& to) \ 192 192 : Parent(static_cast<const From&>(from)) { } \ 193 EdgeMap(const To& to, const Value& value) \193 EdgeMap(const To& to, const _Value& value) \ 194 194 : Parent(static_cast<const From&>(from), value) { } \ 195 195 EdgeMap(const EdgeMap& copy) \
Note: See TracChangeset
for help on using the changeset viewer.