COIN-OR::LEMON - Graph Library

Changeset 201:879e47e5b731 in glemon-0.x for algobox.cc


Ignore:
Timestamp:
01/02/08 22:03:09 (16 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3431
Message:

Merge branches/akos to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • algobox.cc

    r194 r201  
    8383{
    8484  mapstorage=ms;
    85   std::vector<std::string> nml;
    86   std::vector<std::string> eml;
     85  std::vector<std::string> n_nml;
     86  std::vector<std::string> s_nml;
     87  std::vector<std::string> n_eml;
     88  std::vector<std::string> s_eml;
    8789  if(mapstorage!=NULL)
    8890    {
    8991      mapstorage->signal_node_map_ch().connect(sigc::mem_fun(*this, &AlgoBox::nodemaplist_changed));
    9092      mapstorage->signal_edge_map_ch().connect(sigc::mem_fun(*this, &AlgoBox::edgemaplist_changed));
    91       nml=mapstorage->getNodeMapList();
    92       eml=mapstorage->getEdgeMapList();
     93      n_nml=mapstorage->getNodeMapList(NUM);
     94      s_nml=mapstorage->getNodeMapList(STR);
     95      n_eml=mapstorage->getEdgeMapList(NUM);
     96      s_eml=mapstorage->getEdgeMapList(STR);
    9397    }
    9498  for(int i=0;i<(int)nodemapcbts.size();i++)
    9599    {
    96       (nodemapcbts[i])->update_list(nml);
     100      (nodemapcbts[i])->update_list(n_nml, s_nml);
    97101      //update_cbt(nml, *(nodemapcbts[i]));
    98102    }
    99103  for(int i=0;i<(int)edgemapcbts.size();i++)
    100104    {
    101       (edgemapcbts[i])->update_list(eml);
     105      (edgemapcbts[i])->update_list(n_eml, s_eml);
    102106      //update_cbt(eml, *(edgemapcbts[i]));
    103107    }
     
    105109}
    106110
    107 void AlgoBox::nodemaplist_changed(std::string newmap)
     111void AlgoBox::nodemaplist_changed(std::string newmap, MapValue::Type type)
    108112{
    109113  for(int i=0;i<(int)nodemapcbts.size();i++)
    110114    {
    111       (nodemapcbts[i])->append_text(newmap);
    112     }
    113 }
    114 
    115 void AlgoBox::edgemaplist_changed(std::string newmap)
     115      (nodemapcbts[i])->append_text(newmap, type);
     116    }
     117}
     118
     119void AlgoBox::edgemaplist_changed(std::string newmap, MapValue::Type type)
    116120{
    117121  for(int i=0;i<(int)edgemapcbts.size();i++)
    118122    {
    119       (edgemapcbts[i])->append_text(newmap);
     123      (edgemapcbts[i])->append_text(newmap, type);
    120124    }
    121125}
     
    161165}
    162166
    163 void AlgoBox::addMapSelector(std::string inputname, bool itisedge)
     167void AlgoBox::addMapSelector(std::string inputname, bool itisedge, MapType type)
    164168{
    165169  std::vector<std::string> empty_vector;
    166170
    167   MapSelector * msp=new MapSelector(empty_vector,"",inputname,itisedge, false);
     171  MapSelector * msp=new MapSelector(empty_vector,empty_vector,"",inputname,itisedge, false, type);
    168172
    169173  if(itisedge)
Note: See TracChangeset for help on using the changeset viewer.