Possibilite de mettre un espace en premier

This commit is contained in:
Christophe Alexandre 2003-04-16 12:16:00 +00:00
parent 5a6c402d1e
commit 1107eff334
2 changed files with 42 additions and 35 deletions

View File

@ -156,7 +156,7 @@ PPlacement::Init(lofig* fig, int NbRows)
}
for (locon* con = fig->LOCON; con; con = con->NEXT)
ploconmap[con->NAME] = con;
ploconmap[con->NAME] = con;
// traitement de l'emplacement des connecteurs
// creation des PCon si fichier ioc
@ -718,43 +718,48 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
void
PPlacement::ParseIocFile(PLoconMap& ploconmap)
{
PPos position;
_PtList = iocparse(_iocFileName);
char orientation;
for(con_list* tmpcon = _PtList ; tmpcon ; tmpcon = tmpcon->NEXT)
{
if (strcmp(tmpcon->NAME,"SPACE") != 0)
PPos position;
_PtList = iocparse(_iocFileName);
char orientation;
for(con_list* tmpcon = _PtList ; tmpcon ; tmpcon = tmpcon->NEXT)
{
if (ploconmap.find(tmpcon->NAME) == ploconmap.end())
if (strcmp(tmpcon->NAME,"SPACE") != 0)
{
cerr << " o Error in ioc file ...." << endl
<< " The connector " << tmpcon->NAME
<< " doesn't exist in your figure ...."
<< endl;
exit(1);
if (ploconmap.find(tmpcon->NAME) == ploconmap.end())
{
cerr << " o Error in ioc file ...." << endl
<< " The connector " << tmpcon->NAME
<< " doesn't exist in your figure ...."
<< endl;
exit(1);
}
switch (tmpcon->ORIENT)
{
case 'T':
orientation = NORTH;
break;
case 'B':
orientation = SOUTH;
break;
case 'L':
orientation = WEST;
break;
case 'R':
orientation = EAST;
break;
default:
cerr << "Unknown Orientation for connector: "
<< tmpcon->NAME << endl;
exit(1);
}
position.SetX(0);
position.SetY(0);
InsertCon(ploconmap[tmpcon->NAME], position, orientation);
}
switch (tmpcon->ORIENT)
{
case 'T' : orientation = NORTH;
break;
case 'B' : orientation = SOUTH;
break;
case 'L' : orientation = WEST;
break;
case 'R' : orientation = EAST;
break;
default: cerr << "Unknown Orientation for connector: "
<< tmpcon->NAME << endl;
exit(1);
}
position.SetX(0);
position.SetY(0);
InsertCon(ploconmap[tmpcon->NAME], position, orientation);
}
}
}
// ======================================================================

View File

@ -63,7 +63,7 @@ orientation : TOP {
expr :
| iopin expr;
| iopin space expr;
| space expr;
iopin : PAROUV IOPIN iopin1 PARFER PTVIRG;
@ -112,6 +112,7 @@ con_list* add_con(con_list* ptlist, char orient, char* name)
return ptcon;
}
con_list* add_space(con_list* ptlist, char orient, char *value)
{
con_list* ptcon;
@ -124,6 +125,7 @@ con_list* add_space(con_list* ptlist, char orient, char *value)
return ptcon;
}
con_list* iocparse(char *file)
{
extern FILE *yyin;