correct bug when OA is not present

This commit is contained in:
Jean-Manuel Caba 2010-08-08 23:48:43 +00:00
parent 9f71af1fc9
commit 58c9bb33e1
2 changed files with 24 additions and 24 deletions

View File

@ -1,5 +1,5 @@
// -*-compile-command:"cd ../../../../.. && make"-*- // -*-compile-command:"cd ../../../../.. && make"-*-
// Time-stamp: "2010-08-06 14:49:15" - OpenAccessDriver.cpp // Time-stamp: "2010-08-09 01:46:45" - OpenAccessDriver.cpp
// x-----------------------------------------------------------------x // x-----------------------------------------------------------------x
// | This file is part of the hurricaneAMS Software. | // | This file is part of the hurricaneAMS Software. |
// | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved | // | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved |
@ -32,8 +32,8 @@ using namespace Hurricane;
#include "OpenAccessCommon.h" #include "OpenAccessCommon.h"
namespace { namespace {
using namespace CRL_OA;
#ifdef HAVE_OPENACCESS #ifdef HAVE_OPENACCESS
using namespace CRL_OA;
/** /**
Class to drive OA to Hurricane Class to drive OA to Hurricane
@ -726,30 +726,30 @@ namespace {
namespace CRL { namespace CRL {
void OpenAccess::oaDriver(const string& path, Cell* cell) { void OpenAccess::oaDriver(const string& path, Cell* cell) {
oaCell* convertedCell = NULL;
#ifdef HAVE_OPENACCESS #ifdef HAVE_OPENACCESS
assert(cell); oaCell* convertedCell = NULL;
cell->materialize(); assert(cell);
//for the moment a driver for hurricaneAMS cell->materialize();
//save the Cell only and all used Cell //for the moment a driver for hurricaneAMS
cerr << "Saving " << cell << " in " << path << endl; //save the Cell only and all used Cell
try { cerr << "Saving " << cell << " in " << path << endl;
oaDesignInit(oacAPIMajorRevNumber, try {
oacAPIMinorRevNumber, oaDesignInit(oacAPIMajorRevNumber,
oacDataModelRevNumber); oacAPIMinorRevNumber,
oacDataModelRevNumber);
OADriver oaDriver(path);
convertedCell = oaDriver.getOACellForCell(cell); OADriver oaDriver(path);
}catch (oaException &e) { convertedCell = oaDriver.getOACellForCell(cell);
}catch (oaException &e) {
cerr << "OA::ERROR => " << e.getMsg() << endl; cerr << "OA::ERROR => " << e.getMsg() << endl;
exit(1); exit(1);
}catch(std::exception& e){ }catch(std::exception& e){
cerr << "STD::ERROR => " << e.what() << endl; cerr << "STD::ERROR => " << e.what() << endl;
exit(2); exit(2);
} }
#else #else
cerr << "\nDummy OpenAccess driver call for " << path << endl; cerr << "\nDummy OpenAccess driver call for " << path << endl;
#endif #endif
return; return;
} }
} }

View File

@ -1,5 +1,5 @@
// -*-compile-command:"cd ../../../../.. && make"-*- // -*-compile-command:"cd ../../../../.. && make"-*-
// Time-stamp: "2010-08-06 01:40:58" - OpenAccessParser.cpp // Time-stamp: "2010-08-09 01:47:18" - OpenAccessParser.cpp
// x-----------------------------------------------------------------x // x-----------------------------------------------------------------x
// | This file is part of the hurricaneAMS Software. | // | This file is part of the hurricaneAMS Software. |
// | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved | // | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved |
@ -28,8 +28,8 @@ using namespace Hurricane;
#include "OpenAccessCommon.h" #include "OpenAccessCommon.h"
namespace { namespace {
using namespace CRL_OA;
#ifdef HAVE_OPENACCESS #ifdef HAVE_OPENACCESS
using namespace CRL_OA;
class OAParser{ class OAParser{
private: private:
typedef map<oaLib*, Library*> OALib2LibMap; typedef map<oaLib*, Library*> OALib2LibMap;