Changeset 96:e664d8aa3f72 in glemon-0.x for new_map_win.cc
- Timestamp:
- 12/06/05 11:53:38 (18 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2414
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new_map_win.cc
r94 r96 10 10 } 11 11 12 NewMapWin::NewMapWin(const std::string& title, MainWin & mw, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),mainwin(mw),node("Create NodeMap"),edge("Create EdgeMap")12 NewMapWin::NewMapWin(const std::string& title, NoteBookTab & mw, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),mytab(mw),node("Create NodeMap"),edge("Create EdgeMap") 13 13 { 14 14 set_default_size(200, 50); … … 84 84 { 85 85 //create the new map 86 Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (m ainwin.mapstorage.graph);86 Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph); 87 87 88 88 std::stack<double> polishstack; 89 89 90 for(EdgeIt k(m ainwin.mapstorage.graph); k!=INVALID; ++k)90 for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k) 91 91 { 92 92 for(int i=0;i<(int)polishform.size();i++) … … 107 107 default: 108 108 //substitute variable 109 std::map< std::string,Graph::EdgeMap<double> * > ems=m ainwin.mapstorage.edgemap_storage;109 std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage; 110 110 bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end()); 111 111 if(itisvar) 112 112 { 113 polishstack.push( (*(m ainwin.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);113 polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]); 114 114 } 115 115 else … … 154 154 //if addition was not successful addEdgeMap returns one. 155 155 //cause can be that there is already a map named like the new one 156 if(m ainwin.mapstorage.addEdgeMap(mapname, emptr, def_val))156 if(mytab.mapstorage.addEdgeMap(mapname, emptr, def_val)) 157 157 { 158 158 abortion=1; … … 160 160 161 161 //add it to the list of the displayable maps 162 m ainwin.registerNewEdgeMap(mapname);162 mytab.registerNewEdgeMap(mapname); 163 163 164 164 //display it … … 168 168 { 169 169 //create the new map 170 Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (m ainwin.mapstorage.graph);170 Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph); 171 171 172 172 std::stack<double> polishstack; 173 173 174 for(NodeIt k(m ainwin.mapstorage.graph); k!=INVALID; ++k)174 for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k) 175 175 { 176 176 for(int i=0;i<(int)polishform.size();i++) … … 190 190 break; 191 191 default: 192 std::map< std::string,Graph::NodeMap<double> * > nms=m ainwin.mapstorage.nodemap_storage;192 std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage; 193 193 bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end()); 194 194 if(itisvar) 195 195 { 196 polishstack.push( (*(m ainwin.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);196 polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]); 197 197 } 198 198 else … … 237 237 //if addition was not successful addNodeMap returns one. 238 238 //cause can be that there is already a map named like the new one 239 if(m ainwin.mapstorage.addNodeMap(mapname,emptr, def_val))239 if(mytab.mapstorage.addNodeMap(mapname,emptr, def_val)) 240 240 { 241 241 abortion=1; … … 243 243 244 244 //add it to the list of the displayable maps 245 m ainwin.registerNewNodeMap(mapname);245 mytab.registerNewNodeMap(mapname); 246 246 247 247 //display it … … 432 432 if(itisedge) 433 433 { 434 cancel=(m ainwin.mapstorage.edgemap_storage.find(variable)==mainwin.mapstorage.edgemap_storage.end());434 cancel=(mytab.mapstorage.edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end()); 435 435 } 436 436 else 437 437 { 438 cancel=(m ainwin.mapstorage.nodemap_storage.find(variable)==mainwin.mapstorage.nodemap_storage.end());438 cancel=(mytab.mapstorage.nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end()); 439 439 } 440 440 //maybe it is number
Note: See TracChangeset
for help on using the changeset viewer.