COIN-OR::LEMON - Graph Library

Changeset 1645:4a04bb856ac7 in lemon-0.x for gui/mapstorage.h


Ignore:
Timestamp:
08/23/05 09:36:09 (19 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2158
Message:
  • id maps are not editable
  • handle exceptions thrown by the file reader
  • texts are always above the edges
  • store a default value for all maps, so that edges and nodes created after adding a new map receive the default value too
  • create node on button release, not on click (fixes a few oddities)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mapstorage.h

    r1606 r1645  
    3838  std::vector<Graph::EdgeMap<double> > default_edgemaps;
    3939
     40  // Default values for the maps
     41  std::map< std::string, double > nodemap_default;
     42
     43  // Default values for the maps
     44  std::map< std::string, double > edgemap_default;
     45
    4046public:
    4147  ///Constructor of MapStorage. Expects the Graph of
     
    5359  ///\nodemap is the pointer of the given nodemap
    5460  ///\todo map should be given by reference!
    55   int addNodeMap(const std::string &,Graph::NodeMap<double> *);
     61  int addNodeMap(const std::string &,Graph::NodeMap<double> *, double);
    5662
    5763  ///Adds given map to storage. A name and the map itself has to be provided.
     
    5965  ///\edgemap is the pointer of the given edgemap
    6066  ///\todo map should be given by reference!
    61   int addEdgeMap(const std::string &,Graph::EdgeMap<double> *);
     67  int addEdgeMap(const std::string &,Graph::EdgeMap<double> *, double);
    6268
    6369  ///Returns how much nodemaps is stored in \ref MapStorage
     
    95101  std::map< std::string,Graph::EdgeMap<double> * >::iterator endOfEdgeMaps(){return edgemap_storage.end();};
    96102
    97   ///This function sets a default base value for the newly created node
    98   void initMapsForNode(NodeIt);
    99 
    100   ///This function sets a default base value for the newly created node
    101   void initMapsForEdge(Graph::Edge);
    102 
    103   void readFromFile(const std::string &);
     103  int readFromFile(const std::string &);
    104104  void writeToFile(const std::string &);
    105105
Note: See TracChangeset for help on using the changeset viewer.