src/lemon/map_defines.h
changeset 975 12b9993b217c
parent 921 818510fa3d99
child 987 87f7c54892df
equal deleted inserted replaced
0:075e5ed88a69 1:207d61306f02
   112 CREATE_EDGE_MAP(DynMap)
   112 CREATE_EDGE_MAP(DynMap)
   113 
   113 
   114 /** This macro creates MapRegistry for Symmetric Edge Maps.
   114 /** This macro creates MapRegistry for Symmetric Edge Maps.
   115  */
   115  */
   116 #define CREATE_SYM_EDGE_MAP_REGISTRY \
   116 #define CREATE_SYM_EDGE_MAP_REGISTRY \
   117 typedef SymEdgeIt<Graph, Edge, EdgeIt> SymEdgeIt; \
   117 typedef MapRegistry<Graph, SymEdge, SymEdgeIt> SymEdgeMapRegistry; \
   118 typedef MapRegistry<Graph, Edge, SymEdgeIt> SymEdgeMapRegistry; \
       
   119 mutable SymEdgeMapRegistry sym_edge_maps;
   118 mutable SymEdgeMapRegistry sym_edge_maps;
   120 
   119 
   121 
   120 
   122 /** Creates a map from a template map. The import method is
   121 /** Creates a map from a template map. The import method is
   123  *  an overloading of the map type.
   122  *  an overloading of the map type.
   125  *  the template typedefs. If a future release of the c++ 
   124  *  the template typedefs. If a future release of the c++ 
   126  *  supports this feature it should be fixed.
   125  *  supports this feature it should be fixed.
   127  */
   126  */
   128 #define CREATE_SYM_EDGE_MAP(DynMap) \
   127 #define CREATE_SYM_EDGE_MAP(DynMap) \
   129 template <typename Value> \
   128 template <typename Value> \
   130 class SymEdgeMap : public SymMap<DynMap, SymEdgeMapRegistry, Value> { \
   129 class SymEdgeMap : public DynMap<SymEdgeMapRegistry, Value> { \
   131 public: \
   130 public: \
   132 typedef SymMap<DynMap, SymEdgeMapRegistry, Value> Parent; \
   131 typedef DynMap<SymEdgeMapRegistry, Value> Parent; \
   133 \
   132 \
   134 SymEdgeMap(const typename Parent::Graph& g) \
   133 SymEdgeMap(const typename Parent::Graph& g) \
   135   : Parent(g, g.sym_edge_maps) {} \
   134   : Parent(g, g.sym_edge_maps) {} \
   136 SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
   135 SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
   137   : Parent(g, g.sym_edge_maps, v) {} \
   136   : Parent(g, g.sym_edge_maps, v) {} \