Changeset 194:6b2b718420eb in glemon-0.x for new_map_win.cc
- Timestamp:
- 02/28/07 19:20:28 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3205
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new_map_win.cc
r174 r194 18 18 19 19 #include <new_map_win.h> 20 #include <nbtab.h> 21 #include <mapstorage.h> 20 22 21 23 bool NewMapWin::closeIfEscapeIsPressed(GdkEventKey* e) … … 120 122 { 121 123 //create the new map 122 Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage .graph, def_val);124 Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage->graph, def_val); 123 125 124 126 if(!only_nums) … … 126 128 std::stack<double> polishstack; 127 129 128 for(EdgeIt k(mytab.mapstorage .graph); k!=INVALID; ++k)130 for(EdgeIt k(mytab.mapstorage->graph); k!=INVALID; ++k) 129 131 { 130 132 for(int i=0;i<(int)polishform.size();i++) … … 145 147 default: 146 148 //substitute variable 147 std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage .edgemap_storage;149 std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage->edgemap_storage; 148 150 bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end()); 149 151 if(itisvar) 150 152 { 151 polishstack.push( (*(mytab.mapstorage .edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);153 polishstack.push( (*(mytab.mapstorage->edgemap_storage[ ch2var[ polishform[i] ] ]))[k]); 152 154 } 153 155 else … … 188 190 //if addition was not successful addEdgeMap returns one. 189 191 //cause can be that there is already a map named like the new one 190 if(mytab.mapstorage .addEdgeMap(mapname, emptr, def_val))192 if(mytab.mapstorage->addEdgeMap(mapname, emptr, def_val)) 191 193 { 192 194 abortion=1; … … 203 205 { 204 206 //create the new map 205 Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage .graph, def_val);207 Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage->graph, def_val); 206 208 207 209 if(!only_nums) … … 209 211 std::stack<double> polishstack; 210 212 211 for(NodeIt k(mytab.mapstorage .graph); k!=INVALID; ++k)213 for(NodeIt k(mytab.mapstorage->graph); k!=INVALID; ++k) 212 214 { 213 215 for(int i=0;i<(int)polishform.size();i++) … … 227 229 break; 228 230 default: 229 std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage .nodemap_storage;231 std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage->nodemap_storage; 230 232 bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end()); 231 233 if(itisvar) 232 234 { 233 polishstack.push( (*(mytab.mapstorage .nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);235 polishstack.push( (*(mytab.mapstorage->nodemap_storage[ ch2var[ polishform[i] ] ]))[k]); 234 236 } 235 237 else … … 269 271 //if addition was not successful addNodeMap returns one. 270 272 //cause can be that there is already a map named like the new one 271 if(mytab.mapstorage .addNodeMap(mapname,emptr, def_val))273 if(mytab.mapstorage->addNodeMap(mapname,emptr, def_val)) 272 274 { 273 275 abortion=1; … … 480 482 if(itisedge) 481 483 { 482 cancel=(mytab.mapstorage .edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end());484 cancel=(mytab.mapstorage->edgemap_storage.find(variable)==mytab.mapstorage->edgemap_storage.end()); 483 485 } 484 486 else 485 487 { 486 cancel=(mytab.mapstorage .nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end());488 cancel=(mytab.mapstorage->nodemap_storage.find(variable)==mytab.mapstorage->nodemap_storage.end()); 487 489 } 488 490 //maybe it is number
Note: See TracChangeset
for help on using the changeset viewer.