COIN-OR::LEMON - Graph Library

Changeset 94:adfdc2f70548 in glemon-0.x for mapstorage.cc


Ignore:
Timestamp:
11/29/05 20:31:58 (18 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2389
Message:

Structure of GUI is now more clear-cut than before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mapstorage.cc

    r79 r94  
    1717  nodemap_default["id"] = 1.0;
    1818  edgemap_default["id"] = 1.0;
     19
     20  active_nodemaps.resize(NODE_PROPERTY_NUM);
     21  for(int i=0;i<NODE_PROPERTY_NUM;i++)
     22    {
     23      active_nodemaps[i]="";
     24    }
     25
     26  active_edgemaps.resize(EDGE_PROPERTY_NUM);
     27  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
     28    {
     29      active_edgemaps[i]="";
     30    }
    1931}
    2032
     
    4355    }
    4456  return 1;
     57}
     58
     59void MapStorage::changeActiveMap(bool itisedge, int prop, std::string mapname)
     60{
     61  if(itisedge)
     62    {
     63      active_edgemaps[prop]=mapname;
     64    }
     65  else
     66    {
     67      active_nodemaps[prop]=mapname;
     68    }
     69  signal_prop.emit(itisedge, prop);
     70}
     71
     72std::string MapStorage::getActiveEdgeMap(int prop)
     73{
     74  return active_edgemaps[prop];
     75}
     76
     77std::string MapStorage::getActiveNodeMap(int prop)
     78{
     79  return active_nodemaps[prop];
     80}
     81
     82std::vector<std::string> MapStorage::getEdgeMapList()
     83{
     84  std::vector<std::string> eml;
     85  eml.resize(edgemap_storage.size());
     86  int i=0;
     87  std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=beginOfEdgeMaps();
     88  for(;emsi!=endOfEdgeMaps();emsi++)
     89    {
     90      eml[i]=(emsi->first);
     91      i++;
     92    }
     93  return eml;
     94}
     95
     96std::vector<std::string> MapStorage::getNodeMapList()
     97{
     98  std::vector<std::string> nml;
     99  nml.resize(nodemap_storage.size());
     100  int i=0;
     101  std::map< std::string,Graph::NodeMap<double> * >::iterator nmsi=beginOfNodeMaps();
     102  for(;nmsi!=endOfNodeMaps();nmsi++)
     103    {
     104      nml[i]=(nmsi->first);
     105      i++;
     106    }
     107  return nml;
     108}
     109
     110MapStorage::Signal_Prop MapStorage::signal_prop_ch()
     111{
     112  return signal_prop;
    45113}
    46114
Note: See TracChangeset for help on using the changeset viewer.