new_map_win.cc
changeset 194 6b2b718420eb
parent 174 95872af46fc4
child 201 879e47e5b731
     1.1 --- a/new_map_win.cc	Wed Feb 28 15:19:20 2007 +0000
     1.2 +++ b/new_map_win.cc	Wed Feb 28 18:20:28 2007 +0000
     1.3 @@ -17,6 +17,8 @@
     1.4   */
     1.5  
     1.6  #include <new_map_win.h>
     1.7 +#include <nbtab.h>
     1.8 +#include <mapstorage.h>
     1.9  
    1.10  bool NewMapWin::closeIfEscapeIsPressed(GdkEventKey* e)
    1.11  {
    1.12 @@ -119,13 +121,13 @@
    1.13  	  if(edge.get_active())
    1.14  	    {
    1.15  	      //create the new map
    1.16 -	      Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph, def_val);
    1.17 +	      Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage->graph, def_val);
    1.18  	      
    1.19  	      if(!only_nums)
    1.20  		{
    1.21  		  std::stack<double> polishstack;
    1.22  		  
    1.23 -		  for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
    1.24 +		  for(EdgeIt k(mytab.mapstorage->graph); k!=INVALID; ++k)
    1.25  		    {
    1.26  		      for(int i=0;i<(int)polishform.size();i++)
    1.27  			{
    1.28 @@ -144,11 +146,11 @@
    1.29  			      break;
    1.30  			    default:
    1.31  			      //substitute variable
    1.32 -			      std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage;
    1.33 +			      std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage->edgemap_storage;
    1.34  			      bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
    1.35  			      if(itisvar)
    1.36  				{
    1.37 -				  polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    1.38 +				  polishstack.push( (*(mytab.mapstorage->edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    1.39  				}
    1.40  			      else
    1.41  				{
    1.42 @@ -187,7 +189,7 @@
    1.43  
    1.44  	      //if addition was not successful addEdgeMap returns one.
    1.45  	      //cause can be that there is already a map named like the new one
    1.46 -	      if(mytab.mapstorage.addEdgeMap(mapname, emptr, def_val))
    1.47 +	      if(mytab.mapstorage->addEdgeMap(mapname, emptr, def_val))
    1.48  		{
    1.49  		  abortion=1;
    1.50  		}
    1.51 @@ -202,13 +204,13 @@
    1.52  	  else //!edge.get_active()
    1.53  	    {
    1.54  	      //create the new map
    1.55 -	      Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph, def_val);
    1.56 +	      Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage->graph, def_val);
    1.57  
    1.58  	      if(!only_nums)
    1.59  		{
    1.60  		  std::stack<double> polishstack;
    1.61    
    1.62 -		  for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
    1.63 +		  for(NodeIt k(mytab.mapstorage->graph); k!=INVALID; ++k)
    1.64  		    {
    1.65  		      for(int i=0;i<(int)polishform.size();i++)
    1.66  			{
    1.67 @@ -226,11 +228,11 @@
    1.68  			      polishstack.pop();
    1.69  			      break;
    1.70  			    default:
    1.71 -			      std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage;
    1.72 +			      std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage->nodemap_storage;
    1.73  			      bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
    1.74  			      if(itisvar)
    1.75  				{
    1.76 -				  polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    1.77 +				  polishstack.push( (*(mytab.mapstorage->nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
    1.78  				}
    1.79  			      else
    1.80  				{
    1.81 @@ -268,7 +270,7 @@
    1.82  		}
    1.83  	      //if addition was not successful addNodeMap returns one.
    1.84  	      //cause can be that there is already a map named like the new one
    1.85 -	      if(mytab.mapstorage.addNodeMap(mapname,emptr, def_val))
    1.86 +	      if(mytab.mapstorage->addNodeMap(mapname,emptr, def_val))
    1.87  		{
    1.88  		  abortion=1;
    1.89  		}
    1.90 @@ -479,11 +481,11 @@
    1.91    //is it mapname?
    1.92    if(itisedge)
    1.93      {
    1.94 -      cancel=(mytab.mapstorage.edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end());
    1.95 +      cancel=(mytab.mapstorage->edgemap_storage.find(variable)==mytab.mapstorage->edgemap_storage.end());
    1.96      }
    1.97    else
    1.98      {
    1.99 -      cancel=(mytab.mapstorage.nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end());
   1.100 +      cancel=(mytab.mapstorage->nodemap_storage.find(variable)==mytab.mapstorage->nodemap_storage.end());
   1.101      }
   1.102    //maybe it is number
   1.103    int point_num=0;