Changeset 212:1ae84dea7d09 in lemon-1.2 for lemon/graph_utils.h
- Timestamp:
- 07/14/08 09:15:23 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/graph_utils.h
r209 r212 53 53 ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() 54 54 ///macro. 55 #define DIGRAPH_TYPEDEFS(Digraph) 56 typedef Digraph::Node Node; 57 typedef Digraph::NodeIt NodeIt; 58 typedef Digraph::Arc Arc; 59 typedef Digraph::ArcIt ArcIt; 60 typedef Digraph::InArcIt InArcIt; 61 typedef Digraph::OutArcIt OutArcIt; 62 typedef Digraph::NodeMap<bool> BoolNodeMap; 63 typedef Digraph::NodeMap<int> IntNodeMap; 64 typedef Digraph::NodeMap<double> DoubleNodeMap; 65 typedef Digraph::ArcMap<bool> BoolArcMap; 66 typedef Digraph::ArcMap<int> IntArcMap; 55 #define DIGRAPH_TYPEDEFS(Digraph) \ 56 typedef Digraph::Node Node; \ 57 typedef Digraph::NodeIt NodeIt; \ 58 typedef Digraph::Arc Arc; \ 59 typedef Digraph::ArcIt ArcIt; \ 60 typedef Digraph::InArcIt InArcIt; \ 61 typedef Digraph::OutArcIt OutArcIt; \ 62 typedef Digraph::NodeMap<bool> BoolNodeMap; \ 63 typedef Digraph::NodeMap<int> IntNodeMap; \ 64 typedef Digraph::NodeMap<double> DoubleNodeMap; \ 65 typedef Digraph::ArcMap<bool> BoolArcMap; \ 66 typedef Digraph::ArcMap<int> IntArcMap; \ 67 67 typedef Digraph::ArcMap<double> DoubleArcMap 68 68 … … 73 73 ///\note Use this macro, if the graph type is a dependent type, 74 74 ///ie. the graph type depend on a template parameter. 75 #define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) 76 typedef typename Digraph::Node Node; 77 typedef typename Digraph::NodeIt NodeIt; 78 typedef typename Digraph::Arc Arc; 75 #define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) \ 76 typedef typename Digraph::Node Node; \ 77 typedef typename Digraph::NodeIt NodeIt; \ 78 typedef typename Digraph::Arc Arc; \ 79 79 typedef typename Digraph::ArcIt ArcIt; \ 80 typedef typename Digraph::InArcIt InArcIt; 81 typedef typename Digraph::OutArcIt OutArcIt; 82 typedef typename Digraph::template NodeMap<bool> BoolNodeMap; 83 typedef typename Digraph::template NodeMap<int> IntNodeMap; 84 typedef typename Digraph::template NodeMap<double> DoubleNodeMap; 85 typedef typename Digraph::template ArcMap<bool> BoolArcMap; 86 typedef typename Digraph::template ArcMap<int> IntArcMap; 80 typedef typename Digraph::InArcIt InArcIt; \ 81 typedef typename Digraph::OutArcIt OutArcIt; \ 82 typedef typename Digraph::template NodeMap<bool> BoolNodeMap; \ 83 typedef typename Digraph::template NodeMap<int> IntNodeMap; \ 84 typedef typename Digraph::template NodeMap<double> DoubleNodeMap; \ 85 typedef typename Digraph::template ArcMap<bool> BoolArcMap; \ 86 typedef typename Digraph::template ArcMap<int> IntArcMap; \ 87 87 typedef typename Digraph::template ArcMap<double> DoubleArcMap 88 88 … … 97 97 ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() 98 98 ///macro. 99 #define GRAPH_TYPEDEFS(Graph) 100 DIGRAPH_TYPEDEFS(Graph); 101 typedef Graph::Edge Edge; 102 typedef Graph::EdgeIt EdgeIt; 103 typedef Graph::IncEdgeIt IncEdgeIt; 104 typedef Graph::EdgeMap<bool> BoolEdgeMap; 105 typedef Graph::EdgeMap<int> IntEdgeMap; 99 #define GRAPH_TYPEDEFS(Graph) \ 100 DIGRAPH_TYPEDEFS(Graph); \ 101 typedef Graph::Edge Edge; \ 102 typedef Graph::EdgeIt EdgeIt; \ 103 typedef Graph::IncEdgeIt IncEdgeIt; \ 104 typedef Graph::EdgeMap<bool> BoolEdgeMap; \ 105 typedef Graph::EdgeMap<int> IntEdgeMap; \ 106 106 typedef Graph::EdgeMap<double> DoubleEdgeMap 107 107 … … 112 112 ///\note Use this macro, if the graph type is a dependent type, 113 113 ///ie. the graph type depend on a template parameter. 114 #define TEMPLATE_GRAPH_TYPEDEFS(Graph) 115 TEMPLATE_DIGRAPH_TYPEDEFS(Graph); 116 typedef typename Graph::Edge Edge; 114 #define TEMPLATE_GRAPH_TYPEDEFS(Graph) \ 115 TEMPLATE_DIGRAPH_TYPEDEFS(Graph); \ 116 typedef typename Graph::Edge Edge; \ 117 117 typedef typename Graph::EdgeIt EdgeIt; \ 118 typedef typename Graph::IncEdgeIt IncEdgeIt; 119 typedef typename Graph::template EdgeMap<bool> BoolEdgeMap; 120 typedef typename Graph::template EdgeMap<int> IntEdgeMap; 118 typedef typename Graph::IncEdgeIt IncEdgeIt; \ 119 typedef typename Graph::template EdgeMap<bool> BoolEdgeMap; \ 120 typedef typename Graph::template EdgeMap<int> IntEdgeMap; \ 121 121 typedef typename Graph::template EdgeMap<double> DoubleEdgeMap 122 122
Note: See TracChangeset
for help on using the changeset viewer.