COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/24/09 11:54:48 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Fix and uniform the usage of Graph and Parent typedefs (#268)

  • Rename Graph typedefs to GraphType? in the implementation of graph maps and MapExtender? to prevent conflicts (especially using VS). They are not public.
  • Make Parent typedefs private in all classes.
  • Replace Digraph with Graph in some places (fix faulty renamings of the script).
  • Use Graph and Digraph typedefs (more) consequently.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/graph_components.h

    r631 r664  
    181181    class BaseGraphComponent : public BaseDigraphComponent {
    182182    public:
     183
     184      typedef BaseGraphComponent Graph;
     185
    183186      typedef BaseDigraphComponent::Node Node;
    184187      typedef BaseDigraphComponent::Arc Arc;
     
    190193      /// represented by two opposite directed arcs.
    191194      class Edge : public GraphItem<'e'> {
     195        typedef GraphItem<'e'> Parent;
     196
    192197      public:
    193         typedef GraphItem<'e'> Parent;
    194 
    195198        /// \brief Default constructor.
    196199        ///
     
    992995    template <typename GR, typename K, typename V>
    993996    class GraphMap : public ReferenceMap<K, V, V&, const V&> {
    994     public:
    995 
    996       typedef ReadWriteMap<K, V> Parent;
    997 
    998       /// The graph type of the map.
    999       typedef GR Graph;
     997      typedef ReferenceMap<K, V, V&, const V&> Parent;
     998
     999    public:
     1000
    10001001      /// The key type of the map.
    10011002      typedef K Key;
     
    10131014      ///
    10141015      /// Construct a new map for the graph.
    1015       explicit GraphMap(const Graph&) {}
     1016      explicit GraphMap(const GR&) {}
    10161017      /// \brief Construct a new map with default value.
    10171018      ///
    10181019      /// Construct a new map for the graph and initalize the values.
    1019       GraphMap(const Graph&, const Value&) {}
     1020      GraphMap(const GR&, const Value&) {}
    10201021
    10211022    private:
     
    10581059
    10591060        const _Map &m;
    1060         const Graph &g;
     1061        const GR &g;
    10611062        const typename GraphMap::Value &t;
    10621063      };
     
    10861087      template <typename V>
    10871088      class NodeMap : public GraphMap<MappableDigraphComponent, Node, V> {
     1089        typedef GraphMap<MappableDigraphComponent, Node, V> Parent;
     1090
    10881091      public:
    1089         typedef GraphMap<MappableDigraphComponent, Node, V> Parent;
    1090 
    10911092        /// \brief Construct a new map.
    10921093        ///
     
    11241125      template <typename V>
    11251126      class ArcMap : public GraphMap<MappableDigraphComponent, Arc, V> {
     1127        typedef GraphMap<MappableDigraphComponent, Arc, V> Parent;
     1128
    11261129      public:
    1127         typedef GraphMap<MappableDigraphComponent, Arc, V> Parent;
    1128 
    11291130        /// \brief Construct a new map.
    11301131        ///
     
    12221223      template <typename V>
    12231224      class EdgeMap : public GraphMap<MappableGraphComponent, Edge, V> {
     1225        typedef GraphMap<MappableGraphComponent, Edge, V> Parent;
     1226
    12241227      public:
    1225         typedef GraphMap<MappableGraphComponent, Edge, V> Parent;
    1226 
    12271228        /// \brief Construct a new map.
    12281229        ///
Note: See TracChangeset for help on using the changeset viewer.