diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h +++ b/lemon/concepts/graph_components.h @@ -20,7 +20,6 @@ ///\file ///\brief The concept of graph components. - #ifndef LEMON_CONCEPTS_GRAPH_COMPONENTS_H #define LEMON_CONCEPTS_GRAPH_COMPONENTS_H @@ -44,7 +43,7 @@ /// with 'a'. #ifndef DOXYGEN - template + template #endif class GraphItem { public: @@ -296,11 +295,11 @@ /// core id functions for the digraph structure. /// The most of the base digraphs should conform to this concept. /// The id's are unique and immutable. - template - class IDableDigraphComponent : public _Base { + template + class IDableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; @@ -374,14 +373,14 @@ /// core id functions for the undirected graph structure. The /// most of the base undirected graphs should conform to this /// concept. The id's are unique and immutable. - template - class IDableGraphComponent : public IDableDigraphComponent<_Base> { + template + class IDableGraphComponent : public IDableDigraphComponent { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Edge Edge; - using IDableDigraphComponent<_Base>::id; + using IDableDigraphComponent::id; /// \brief Gives back an unique integer id for the Edge. /// @@ -425,8 +424,8 @@ /// /// Skeleton class for graph NodeIt and ArcIt. /// - template - class GraphItemIt : public _Item { + template + class GraphItemIt : public Item { public: /// \brief Default constructor. /// @@ -442,7 +441,7 @@ /// /// Sets the iterator to the first item of \c the graph. /// - explicit GraphItemIt(const _Graph&) {} + explicit GraphItemIt(const GR&) {} /// \brief Invalid constructor \& conversion. /// /// This constructor initializes the item to be invalid. @@ -479,24 +478,24 @@ ++it2 = it1; ++(++it1); - _Item bi = it1; + Item bi = it1; bi = it2; } - _Graph& g; + GR& g; }; }; /// \brief Skeleton class for graph InArcIt and OutArcIt /// /// \note Because InArcIt and OutArcIt may not inherit from the same - /// base class, the _selector is a additional template parameter. For - /// InArcIt you should instantiate it with character 'i' and for + /// base class, the \c sel is a additional template parameter (selector). + /// For InArcIt you should instantiate it with character 'i' and for /// OutArcIt with 'o'. - template - class GraphIncIt : public _Item { + template + class GraphIncIt : public Item { public: /// \brief Default constructor. /// @@ -507,14 +506,14 @@ /// /// Copy constructor. /// - GraphIncIt(GraphIncIt const& gi) : _Item(gi) {} + GraphIncIt(GraphIncIt const& gi) : Item(gi) {} /// \brief Sets the iterator to the first arc incoming into or outgoing /// from the node. /// /// Sets the iterator to the first arc incoming into or outgoing /// from the node. /// - explicit GraphIncIt(const _Graph&, const _Base&) {} + explicit GraphIncIt(const GR&, const Base&) {} /// \brief Invalid constructor \& conversion. /// /// This constructor initializes the item to be invalid. @@ -546,21 +545,21 @@ template struct Constraints { void constraints() { - checkConcept, _GraphIncIt>(); + checkConcept, _GraphIncIt>(); _GraphIncIt it1(graph, node); _GraphIncIt it2; it2 = ++it1; ++it2 = it1; ++(++it1); - _Item e = it1; + Item e = it1; e = it2; } - _Item arc; - _Base node; - _Graph graph; + Item arc; + Base node; + GR graph; _GraphIncIt it; }; }; @@ -571,12 +570,12 @@ /// This class provides beside the core digraph features /// iterator based iterable interface for the digraph structure. /// This concept is part of the Digraph concept. - template - class IterableDigraphComponent : public _Base { + template + class IterableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; @@ -756,11 +755,11 @@ /// This class provides beside the core graph features iterator /// based iterable interface for the undirected graph structure. /// This concept is part of the Graph concept. - template - class IterableGraphComponent : public IterableDigraphComponent<_Base> { + template + class IterableGraphComponent : public IterableDigraphComponent { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; typedef typename Base::Edge Edge; @@ -773,8 +772,8 @@ /// This interface provides functions for iteration on graph items /// @{ - using IterableDigraphComponent<_Base>::first; - using IterableDigraphComponent<_Base>::next; + using IterableDigraphComponent::first; + using IterableDigraphComponent::next; /// \brief Gives back the first edge in the iterating /// order. @@ -808,8 +807,8 @@ /// use it. void nextInc(Edge&, bool&) const {} - using IterableDigraphComponent<_Base>::baseNode; - using IterableDigraphComponent<_Base>::runningNode; + using IterableDigraphComponent::baseNode; + using IterableDigraphComponent::runningNode; /// @} @@ -875,7 +874,6 @@ } const _Graph& graph; - }; }; @@ -887,11 +885,11 @@ /// obsevers can be registered into the notifier and whenever an /// alteration occured in the digraph all the observers will /// notified about it. - template - class AlterableDigraphComponent : public _Base { + template + class AlterableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; @@ -945,11 +943,11 @@ /// obsevers can be registered into the notifier and whenever an /// alteration occured in the graph all the observers will /// notified about it. - template - class AlterableGraphComponent : public AlterableDigraphComponent<_Base> { + template + class AlterableGraphComponent : public AlterableDigraphComponent { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Edge Edge; @@ -974,9 +972,7 @@ } const _Graph& graph; - }; - }; /// \brief Class describing the concept of graph maps @@ -984,18 +980,18 @@ /// This class describes the common interface of the graph maps /// (NodeMap, ArcMap), that is maps that can be used to /// associate data to graph descriptors (nodes or arcs). - template - class GraphMap : public ReadWriteMap<_Item, _Value> { + template + class GraphMap : public ReadWriteMap { public: - typedef ReadWriteMap<_Item, _Value> Parent; + typedef ReadWriteMap Parent; /// The graph type of the map. - typedef _Graph Graph; + typedef GR Graph; /// The key type of the map. - typedef _Item Key; + typedef K Key; /// The value type of the map. - typedef _Value Value; + typedef V Value; /// \brief Construct a new map. /// @@ -1055,11 +1051,11 @@ /// This class provides beside the core digraph features /// map interface for the digraph structure. /// This concept is part of the Digraph concept. - template - class MappableDigraphComponent : public _Base { + template + class MappableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; @@ -1069,10 +1065,10 @@ /// /// ReadWrite map of the nodes. /// - template - class NodeMap : public GraphMap { + template + class NodeMap : public GraphMap { public: - typedef GraphMap Parent; + typedef GraphMap Parent; /// \brief Construct a new map. /// @@ -1083,7 +1079,7 @@ /// \brief Construct a new map with default value. /// /// Construct a new map for the digraph and initalise the values. - NodeMap(const MappableDigraphComponent& digraph, const _Value& value) + NodeMap(const MappableDigraphComponent& digraph, const V& value) : Parent(digraph, value) {} private: @@ -1097,7 +1093,7 @@ /// Assign operator. template NodeMap& operator=(const CMap&) { - checkConcept, CMap>(); + checkConcept, CMap>(); return *this; } @@ -1107,10 +1103,10 @@ /// /// ReadWrite map of the arcs. /// - template - class ArcMap : public GraphMap { + template + class ArcMap : public GraphMap { public: - typedef GraphMap Parent; + typedef GraphMap Parent; /// \brief Construct a new map. /// @@ -1121,7 +1117,7 @@ /// \brief Construct a new map with default value. /// /// Construct a new map for the digraph and initalise the values. - ArcMap(const MappableDigraphComponent& digraph, const _Value& value) + ArcMap(const MappableDigraphComponent& digraph, const V& value) : Parent(digraph, value) {} private: @@ -1135,7 +1131,7 @@ /// Assign operator. template ArcMap& operator=(const CMap&) { - checkConcept, CMap>(); + checkConcept, CMap>(); return *this; } @@ -1191,11 +1187,11 @@ /// This class provides beside the core graph features /// map interface for the graph structure. /// This concept is part of the Graph concept. - template - class MappableGraphComponent : public MappableDigraphComponent<_Base> { + template + class MappableGraphComponent : public MappableDigraphComponent { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Edge Edge; typedef MappableGraphComponent Graph; @@ -1204,10 +1200,10 @@ /// /// ReadWrite map of the edges. /// - template - class EdgeMap : public GraphMap { + template + class EdgeMap : public GraphMap { public: - typedef GraphMap Parent; + typedef GraphMap Parent; /// \brief Construct a new map. /// @@ -1218,7 +1214,7 @@ /// \brief Construct a new map with default value. /// /// Construct a new map for the graph and initalise the values. - EdgeMap(const MappableGraphComponent& graph, const _Value& value) + EdgeMap(const MappableGraphComponent& graph, const V& value) : Parent(graph, value) {} private: @@ -1232,7 +1228,7 @@ /// Assign operator. template EdgeMap& operator=(const CMap&) { - checkConcept, CMap>(); + checkConcept, CMap>(); return *this; } @@ -1276,13 +1272,13 @@ /// extendable interface for the digraph structure. The main /// difference between the base and this interface is that the /// digraph alterations should handled already on this level. - template - class ExtendableDigraphComponent : public _Base { + template + class ExtendableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; - typedef typename _Base::Node Node; - typedef typename _Base::Arc Arc; + typedef typename Base::Node Node; + typedef typename Base::Arc Arc; /// \brief Adds a new node to the digraph. /// @@ -1321,13 +1317,13 @@ /// The main difference between the base and this interface is /// that the graph alterations should handled already on this /// level. - template - class ExtendableGraphComponent : public _Base { + template + class ExtendableGraphComponent : public BAS { public: - typedef _Base Base; - typedef typename _Base::Node Node; - typedef typename _Base::Edge Edge; + typedef BAS Base; + typedef typename Base::Node Node; + typedef typename Base::Edge Edge; /// \brief Adds a new node to the graph. /// @@ -1365,11 +1361,11 @@ /// functions for the digraph structure. The main difference between /// the base and this interface is that the digraph alterations /// should handled already on this level. - template - class ErasableDigraphComponent : public _Base { + template + class ErasableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Arc Arc; @@ -1405,11 +1401,11 @@ /// core erase functions for the undirceted graph structure. The /// main difference between the base and this interface is that /// the graph alterations should handled already on this level. - template - class ErasableGraphComponent : public _Base { + template + class ErasableGraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; typedef typename Base::Node Node; typedef typename Base::Edge Edge; @@ -1445,11 +1441,11 @@ /// functions for the digraph structure. The main difference between /// the base and this interface is that the digraph alterations /// should handled already on this level. - template - class ClearableDigraphComponent : public _Base { + template + class ClearableDigraphComponent : public BAS { public: - typedef _Base Base; + typedef BAS Base; /// \brief Erase all nodes and arcs from the digraph. /// @@ -1474,11 +1470,11 @@ /// core clear functions for the undirected graph structure. The /// main difference between the base and this interface is that /// the graph alterations should handled already on this level. - template - class ClearableGraphComponent : public ClearableDigraphComponent<_Base> { + template + class ClearableGraphComponent : public ClearableDigraphComponent { public: - typedef _Base Base; + typedef BAS Base; template struct Constraints {