diff -r bf267b301a5e -r b1f441f24d08 lemon/graph_utils.h --- a/lemon/graph_utils.h Wed Nov 02 15:28:37 2005 +0000 +++ b/lemon/graph_utils.h Wed Nov 02 16:32:29 2005 +0000 @@ -40,6 +40,46 @@ /// \addtogroup gutils /// @{ + ///Creates convenience typedefs for the graph types and iterators + + ///This \c \#define creates convenience typedefs for the following types + ///of \c Graph: \c Node, \c NodeIt, \c Edge, \c EdgeIt, \c InEdgeIt, + ///\c OutEdgeIt. + ///\note If \c G it a template parameter, it should be used in this way. + ///\code + /// GRAPH_TYPEDEFS(typename G) + ///\endcode + /// + ///\warning There are no typedefs for the graph maps because of the lack of + ///template typedefs in C++. +#define GRAPH_TYPEDEFS(Graph) \ + typedef Graph:: Node Node; \ + typedef Graph:: NodeIt NodeIt; \ + typedef Graph:: Edge Edge; \ + typedef Graph:: EdgeIt EdgeIt; \ + typedef Graph:: InEdgeIt InEdgeIt; \ + typedef Graph::OutEdgeIt OutEdgeIt; + + ///Creates convenience typedefs for the undirected graph types and iterators + + ///This \c \#define creates the same convenience typedefs as defined by + ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates + ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt, + /// + ///\note If \c G it a template parameter, it should be used in this way. + ///\code + /// UNDIRGRAPH_TYPEDEFS(typename G) + ///\endcode + /// + ///\warning There are no typedefs for the graph maps because of the lack of + ///template typedefs in C++. +#define UNDIRGRAPH_TYPEDEFS(Graph) \ + GRAPH_TYPEDEFS(Graph) \ + typedef Graph:: UndirEdge UndirEdge; \ + typedef Graph:: UndirEdgeIt UndirEdgeIt; \ + typedef Graph:: IncEdgeIt IncEdgeIt; + + /// \brief Function to count the items in the graph. /// /// This function counts the items (nodes, edges etc) in the graph.