[GME-commit] GMESRC/GME/Gme/AutoRoute ArGraph.cpp,1.7,1.8 ArGraph.h,1.4,1.5 AutoRouter.cpp,1.10,1.11

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Nov 3 20:48:09 CST 2006


Update of /project/gme-repository/GMESRC/GME/Gme/AutoRoute
In directory escher:/tmp/cvs-serv16942/AutoRoute

Modified Files:
	ArGraph.cpp ArGraph.h AutoRouter.cpp 
Log Message:
Since the autorouting prefs for connection options were fixed it allowed conns going to ports to be rerouted too (a conn line crossed the model/reference and went to the port if the user altered the AutoRouter prefs).
>From now on, real ports will be constrained regarding their options on routing prefs. (User might try to set invalid dirs, will have no effect on the conn line).


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: AutoRouter.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/AutoRoute/AutoRouter.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AutoRouter.cpp	25 Aug 2004 20:36:32 -0000	1.10
--- AutoRouter.cpp	3 Nov 2006 20:48:07 -0000	1.11
***************
*** 192,195 ****
--- 192,198 ----
  		CGuiPort *port = ports.GetNext(pos);
  		CArPort *portBox = box->CreatePort();
+ 		// real ports most obey the rule that the only dir allowed is
+ 		// the one on which side of their parent they are laid out
+ 		portBox->SetLimitedDirs( port->IsRealPort());
  		portBox->SetRect(port->GetLocation() + loc.TopLeft());
  		SetPortPreferences(portBox,port);

Index: ArGraph.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/AutoRoute/ArGraph.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ArGraph.h	5 Oct 2006 19:33:11 -0000	1.4
--- ArGraph.h	3 Nov 2006 20:48:07 -0000	1.5
***************
*** 87,90 ****
--- 87,92 ----
  	void SetAttributes(unsigned int attr);
  	unsigned int GetAttributes() const { return attributes; }
+ 	bool HasLimitedDirs() { return limitedDirections; }
+ 	void SetLimitedDirs( bool p_ltd) { limitedDirections = p_ltd; }
  
  private:
***************
*** 109,112 ****
--- 111,115 ----
  	void CalculateSelfPoints();
  
+ 	bool  limitedDirections; // strictly respect the preferred directions (for ports East/West directions must be respected)
  	CRect rect;
  	CPoint selfpoints[4];

Index: ArGraph.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/AutoRoute/ArGraph.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ArGraph.cpp	5 Oct 2006 19:33:10 -0000	1.7
--- ArGraph.cpp	3 Nov 2006 20:48:07 -0000	1.8
***************
*** 16,19 ****
--- 16,20 ----
  CArPort::CArPort():	stored_ref(NULL),
  					owner(NULL),
+ 					limitedDirections( false),
  					rect(0,0,0,0),
  					attributes(ARPORT_Default)
***************
*** 1818,1826 ****
  
  	EArDir startdir = path->GetStartDir();
! 	if( startdir == Dir_None ) 
  		startdir = startport->GetStartEndDirTo(endport->GetCenter(), 1);
  
  	EArDir enddir = path->GetEndDir();
! 	if( enddir == Dir_None )
  		enddir = endport->GetStartEndDirTo(startport->GetCenter(), 0, startport == endport ? startdir : Dir_None );
  
--- 1819,1829 ----
  
  	EArDir startdir = path->GetStartDir();
! 	if( startdir == Dir_None                                                                // recalc startdir if empty
! 		|| startport->HasLimitedDirs() && !startport->CanHaveStartEndPointOn( startdir, 1)) // or is limited and userpref is invalid
  		startdir = startport->GetStartEndDirTo(endport->GetCenter(), 1);
  
  	EArDir enddir = path->GetEndDir();
! 	if( enddir == Dir_None                                                                  // like above
! 		|| endport->HasLimitedDirs() && !endport->CanHaveStartEndPointOn( enddir, 0))
  		enddir = endport->GetStartEndDirTo(startport->GetCenter(), 0, startport == endport ? startdir : Dir_None );
  



More information about the GME-commit mailing list