COIN-OR::LEMON - Graph Library

Changeset 263:be8a861d3bb7 in lemon-1.0


Ignore:
Timestamp:
09/15/08 22:28:32 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Make copy constr and op= of the default maps private (ticket #137)

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/array_map.h

    r209 r263  
    104104    }
    105105
     106  private:
    106107    /// \brief Constructor to copy a map of the same map type.
    107108    ///
     
    151152    }
    152153
     154  public:
    153155    /// \brief The destructor of the map.
    154156    ///
  • lemon/bits/graph_extender.h

    r220 r263  
    228228        : Parent(digraph, value) {}
    229229
     230    private:
    230231      NodeMap& operator=(const NodeMap& cmap) {
    231232        return operator=<NodeMap>(cmap);
     
    252253        : Parent(digraph, value) {}
    253254
     255    private:
    254256      ArcMap& operator=(const ArcMap& cmap) {
    255257        return operator=<ArcMap>(cmap);
     
    609611        : Parent(graph, value) {}
    610612
     613    private:
    611614      NodeMap& operator=(const NodeMap& cmap) {
    612615        return operator=<NodeMap>(cmap);
     
    633636        : Parent(graph, value) {}
    634637
     638    private:
    635639      ArcMap& operator=(const ArcMap& cmap) {
    636640        return operator=<ArcMap>(cmap);
     
    658662        : Parent(graph, value) {}
    659663
     664    private:
    660665      EdgeMap& operator=(const EdgeMap& cmap) {
    661666        return operator=<EdgeMap>(cmap);
  • lemon/bits/map_extender.h

    r209 r263  
    6363      : Parent(graph, value) {}
    6464
     65  private:
    6566    MapExtender& operator=(const MapExtender& cmap) {
    6667      return operator=<MapExtender>(cmap);
     
    7374    }
    7475
     76  public:
    7577    class MapIt : public Item {
    7678    public:
     
    201203      : Parent(_graph, _value), graph(_graph) {}
    202204
     205  private:
    203206    SubMapExtender& operator=(const SubMapExtender& cmap) {
    204207      return operator=<MapExtender>(cmap);
     
    215218    }
    216219
     220  public:
    217221    class MapIt : public Item {
    218222    public:
  • lemon/bits/vector_map.h

    r220 r263  
    101101    }
    102102
     103  private:
    103104    /// \brief Copy constructor
    104105    ///
  • lemon/concepts/digraph.h

    r220 r263  
    435435        NodeMap(const Digraph&, T) { }
    436436
     437      private:
    437438        ///Copy constructor
    438439        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
     
    457458        ///\e
    458459        ArcMap(const Digraph&, T) { }
     460      private:
    459461        ///Copy constructor
    460462        ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
  • lemon/concepts/graph.h

    r220 r263  
    513513        NodeMap(const Graph&, T) { }
    514514
     515      private:
    515516        ///Copy constructor
    516517        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
     
    536537        ///\e
    537538        ArcMap(const Graph&, T) { }
     539      private:
    538540        ///Copy constructor
    539541        ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
     
    559561        ///\e
    560562        EdgeMap(const Graph&, T) { }
     563      private:
    561564        ///Copy constructor
    562565        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) {}
  • lemon/concepts/graph_components.h

    r220 r263  
    10061006      /// Construct a new map for the graph and initalise the values.
    10071007      GraphMap(const Graph&, const Value&) {}
     1008
     1009    private:
    10081010      /// \brief Copy constructor.
    10091011      ///
     
    10221024      }
    10231025
     1026    public:
    10241027      template<typename _Map>
    10251028      struct Constraints {
     
    10311034          _Map a2(g,t);
    10321035          // Copy constructor.
    1033           _Map b(c);
    1034 
    1035           ReadMap<Key, Value> cmap;
    1036           b = cmap;
    1037 
     1036          // _Map b(c);
     1037
     1038          // ReadMap<Key, Value> cmap;
     1039          // b = cmap;
     1040
     1041          ignore_unused_variable_warning(a);
    10381042          ignore_unused_variable_warning(a2);
    1039           ignore_unused_variable_warning(b);
     1043          // ignore_unused_variable_warning(b);
    10401044        }
    10411045
     
    10831087          : Parent(digraph, value) {}
    10841088
     1089      private:
    10851090        /// \brief Copy constructor.
    10861091        ///
     
    11201125          : Parent(digraph, value) {}
    11211126
     1127      private:
    11221128        /// \brief Copy constructor.
    11231129        ///
     
    12161222          : Parent(graph, value) {}
    12171223
     1224      private:
    12181225        /// \brief Copy constructor.
    12191226        ///
  • test/graph_test.h

    r228 r263  
    213213    check(s == 0, "Wrong sum.");
    214214
    215     map = constMap<Node>(12);
    216     for (NodeIt it(G); it != INVALID; ++it) {
    217       check(map[it] == 12, "Wrong operator[].");
    218     }
     215    // map = constMap<Node>(12);
     216    // for (NodeIt it(G); it != INVALID; ++it) {
     217    //   check(map[it] == 12, "Wrong operator[].");
     218    // }
    219219  }
    220220
     
    243243    check(s == 0, "Wrong sum.");
    244244
    245     map = constMap<Arc>(12);
    246     for (ArcIt it(G); it != INVALID; ++it) {
    247       check(map[it] == 12, "Wrong operator[].");
    248     }
     245    // map = constMap<Arc>(12);
     246    // for (ArcIt it(G); it != INVALID; ++it) {
     247    //   check(map[it] == 12, "Wrong operator[].");
     248    // }
    249249  }
    250250
     
    273273    check(s == 0, "Wrong sum.");
    274274
    275     map = constMap<Edge>(12);
    276     for (EdgeIt it(G); it != INVALID; ++it) {
    277       check(map[it] == 12, "Wrong operator[].");
    278     }
     275    // map = constMap<Edge>(12);
     276    // for (EdgeIt it(G); it != INVALID; ++it) {
     277    //   check(map[it] == 12, "Wrong operator[].");
     278    // }
    279279  }
    280280
Note: See TracChangeset for help on using the changeset viewer.