* ./hurricane/src/hurricane :
- Bug : double deletion of ExtensionSlice, one in Cell and one in ExtensionGo::unmaterialize() when the last ExtensionGo is removed. Keep the one in unmaterialize. - Bug : missing "_preDestroy()" in ExtensionGo (not really a bug but may be useful in the future). - Modification : begin to uses "ltrace(level)" instead of "trace()". Levels affecteds to Hurricane are 0-10 (the lowest).
This commit is contained in:
parent
6101ba0b3a
commit
a9191bb93f
|
@ -39,7 +39,6 @@ namespace Hurricane {
|
|||
{
|
||||
ExtensionSliceMap::iterator islice = _extensionSlices.find ( slice->getName() );
|
||||
if ( islice != _extensionSlices.end() ) {
|
||||
islice->second->_destroy ();
|
||||
_extensionSlices.erase ( islice );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@ Entity::Entity()
|
|||
{
|
||||
}
|
||||
|
||||
void Entity::_preDestroy()
|
||||
// **********************
|
||||
{
|
||||
// trace << "entering Entity::_preDestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
void Entity::_preDestroy()
|
||||
{
|
||||
//ltrace(10) << "Entity::_preDestroy() - " << (void*)this << endl;
|
||||
//ltracein(10);
|
||||
|
||||
vector<Entity*> slaveEntities;
|
||||
SlaveEntityMap::iterator it;
|
||||
|
@ -65,9 +65,9 @@ void Entity::_preDestroy()
|
|||
|
||||
Inherit::_preDestroy();
|
||||
|
||||
// trace << "exiting Entity::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
//ltrace(10) << "Entity::_preDestroy() - exit" << endl;
|
||||
//ltraceout(10);
|
||||
}
|
||||
|
||||
string Entity::_getString() const
|
||||
// ******************************
|
||||
|
|
|
@ -42,6 +42,13 @@ namespace Hurricane {
|
|||
{ }
|
||||
|
||||
|
||||
void ExtensionGo::_preDestroy ()
|
||||
{
|
||||
ltrace(10) << "ExtensionGo::_preDestroy() - " << (void*)this << endl;
|
||||
Go::_preDestroy ();
|
||||
}
|
||||
|
||||
|
||||
void ExtensionGo::materialize ()
|
||||
{
|
||||
if ( !isMaterialized() ) {
|
||||
|
@ -60,6 +67,9 @@ namespace Hurricane {
|
|||
|
||||
void ExtensionGo::unmaterialize ()
|
||||
{
|
||||
//ltrace(9) << "ExtensionGo::unmaterialize() - " << (void*)this << endl;
|
||||
//ltracein(9);
|
||||
|
||||
if ( isMaterialized() ) {
|
||||
ExtensionSlice* slice = _cell->getExtensionSlice ( getName() );
|
||||
if ( slice ) {
|
||||
|
@ -68,6 +78,9 @@ namespace Hurricane {
|
|||
if ( slice->isEmpty() ) slice->_destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
//ltrace(9) << "ExtensionGo::unmaterialize() - exit" << endl;
|
||||
//ltraceout(9);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace Hurricane {
|
|||
|
||||
ExtensionSlice::~ExtensionSlice ()
|
||||
{
|
||||
ltrace(10) << "ExtensionSlice::~ExtensionSlice() - " << (void*)this << endl;
|
||||
_cell->_removeSlice ( this );
|
||||
}
|
||||
|
||||
|
|
|
@ -51,18 +51,19 @@ void Go::_postCreate()
|
|||
if (!autoMaterializationIsDisabled()) materialize(); // materialized after entire post creation
|
||||
}
|
||||
|
||||
|
||||
void Go::_preDestroy()
|
||||
// ******************
|
||||
{
|
||||
// trace << "entering Go::_preDestroy: " << this << endl;
|
||||
// trace_in();
|
||||
//ltrace(10) << "Go::_preDestroy() - " << (void*)this << endl;
|
||||
//ltracein(10);
|
||||
|
||||
unmaterialize(); // unmaterialized before starting pre destruction
|
||||
//ltrace(10) << "Unmaterialize successful" << endl;
|
||||
|
||||
Inherit::_preDestroy();
|
||||
|
||||
// trace << "exiting Go::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
//ltrace(10) << "Go::_preDestroy() - exit" << endl;
|
||||
//ltraceout(10);
|
||||
}
|
||||
|
||||
string Go::_getString() const
|
||||
|
|
|
@ -52,8 +52,9 @@ namespace Hurricane {
|
|||
Cell* _cell;
|
||||
|
||||
protected:
|
||||
// Internal: Constructor.
|
||||
// Internal: Constructor & destructors.
|
||||
ExtensionGo ( Cell* );
|
||||
virtual void _preDestroy ();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ namespace Hurricane {
|
|||
// Constructor.
|
||||
static Technology* create ( DataBase* , const Name& );
|
||||
// Accessors.
|
||||
inline bool isMetal ( const Layer* ) const;
|
||||
inline DataBase* getDataBase () const;
|
||||
inline const Name& getName () const;
|
||||
inline Layer* getLayer ( const Name& ) const;
|
||||
|
@ -125,6 +126,7 @@ namespace Hurricane {
|
|||
|
||||
|
||||
// Inline Functions.
|
||||
inline bool Technology::isMetal ( const Layer* layer ) const { return _metalMask.contains(layer->getMask()); }
|
||||
inline DataBase* Technology::getDataBase () const { return _dataBase; }
|
||||
inline const Name& Technology::getName () const { return _name; }
|
||||
inline Layer* Technology::getLayer ( const Name& name ) const { return _layerMap.getElement(name); }
|
||||
|
|
|
@ -23,30 +23,31 @@
|
|||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include <QMouseEvent>
|
||||
# include <QKeyEvent>
|
||||
# include <QAction>
|
||||
# include <QPainter>
|
||||
# include <QStylePainter>
|
||||
# include <QBitmap>
|
||||
# include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QAction>
|
||||
#include <QPainter>
|
||||
#include <QStylePainter>
|
||||
#include <QBitmap>
|
||||
#include <QLabel>
|
||||
|
||||
# include "hurricane/DataBase.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/Cell.h"
|
||||
# include "hurricane/Instance.h"
|
||||
# include "hurricane/Slice.h"
|
||||
# include "hurricane/Segment.h"
|
||||
# include "hurricane/Contact.h"
|
||||
# include "hurricane/Pad.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Slice.h"
|
||||
#include "hurricane/Segment.h"
|
||||
#include "hurricane/Contact.h"
|
||||
#include "hurricane/Pad.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
|
||||
# include "hurricane/viewer/Graphics.h"
|
||||
# include "hurricane/viewer/HPaletteEntry.h"
|
||||
# include "hurricane/viewer/HPalette.h"
|
||||
// # include "MapView.h"
|
||||
# include "hurricane/viewer/Command.h"
|
||||
# include "hurricane/viewer/CellWidget.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "hurricane/viewer/HPaletteEntry.h"
|
||||
#include "hurricane/viewer/HPalette.h"
|
||||
// #include "MapView.h"
|
||||
#include "hurricane/viewer/Command.h"
|
||||
#include "hurricane/viewer/CellWidget.h"
|
||||
|
||||
|
||||
|
||||
|
@ -331,6 +332,12 @@ namespace Hurricane {
|
|||
_cellWidget->drawBox ( transformation.getBox(pad->getBoundingBox(basicLayer)) );
|
||||
return;
|
||||
}
|
||||
|
||||
const RoutingPad* rp = dynamic_cast<const RoutingPad*>(go);
|
||||
if ( rp ) {
|
||||
_cellWidget->drawBox ( transformation.getBox(rp->getBoundingBox(basicLayer)) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue