* ./crlcore:
- Change: In ToolEngine, adds a static method "destroyAll()" that must be called *before* the Hurricane database destruction. This is to avoid a mis-oredering in destruction. ToolEngines are stored in a property, property are part of the DBo base object so are destroyed *after* the Cell derived object has been. Thus ToolEngine are deleted *after* the Cell components and if they still refers to it, we are doomed. - Change: In display.xml, color support for displaying references.
This commit is contained in:
parent
bc295bda31
commit
fe7acbc389
|
@ -39,6 +39,7 @@
|
||||||
<drawingstyle name="ghost" color="255,255,255" border="1"/>
|
<drawingstyle name="ghost" color="255,255,255" border="1"/>
|
||||||
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
|
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
|
||||||
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
|
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
|
||||||
|
<drawingstyle name="text.reference" color="255,255,255" border="1" threshold="20.0"/>
|
||||||
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
|
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
|
||||||
</group>
|
</group>
|
||||||
<group name="Active Layers">
|
<group name="Active Layers">
|
||||||
|
@ -123,6 +124,7 @@
|
||||||
<drawingstyle name="ghost" color="255,255,255" border="1"/>
|
<drawingstyle name="ghost" color="255,255,255" border="1"/>
|
||||||
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
|
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
|
||||||
<drawingstyle name="text.instance" color="255,255,255" border="1" threshold="4.0"/>
|
<drawingstyle name="text.instance" color="255,255,255" border="1" threshold="4.0"/>
|
||||||
|
<drawingstyle name="text.reference" color="255,255,255" border="1" threshold="20.0"/>
|
||||||
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
|
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
|
||||||
</group>
|
</group>
|
||||||
<group name="Active Layers">
|
<group name="Active Layers">
|
||||||
|
@ -186,6 +188,7 @@
|
||||||
<drawingstyle name="ghost" color="0,0,0" border="1"/>
|
<drawingstyle name="ghost" color="0,0,0" border="1"/>
|
||||||
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
|
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
|
||||||
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
|
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
|
||||||
|
<drawingstyle name="text.reference" color="0,0,0" border="1" threshold="20.0"/>
|
||||||
<drawingstyle name="undef" color="0,0,0" border="0" pattern="2244118822441188"/>
|
<drawingstyle name="undef" color="0,0,0" border="0" pattern="2244118822441188"/>
|
||||||
</group>
|
</group>
|
||||||
</displaystyle>
|
</displaystyle>
|
||||||
|
@ -241,6 +244,7 @@
|
||||||
<drawingstyle name="grid" color="0,0,0" border="1" threshold="2.0"/>
|
<drawingstyle name="grid" color="0,0,0" border="1" threshold="2.0"/>
|
||||||
<drawingstyle name="spot" color="0,0,0" border="1" threshold="2.0"/>
|
<drawingstyle name="spot" color="0,0,0" border="1" threshold="2.0"/>
|
||||||
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
|
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
|
||||||
|
<drawingstyle name="text.reference" color="0,0,0" border="1" threshold="20.0"/>
|
||||||
</group>
|
</group>
|
||||||
<group name="Active Layers">
|
<group name="Active Layers">
|
||||||
<drawingstyle name="active" color="175,175,175" pattern="0000000000000000" threshold="1.50" border="2"/>
|
<drawingstyle name="active" color="175,175,175" pattern="0000000000000000" threshold="1.50" border="2"/>
|
||||||
|
|
|
@ -26,6 +26,8 @@ namespace {
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
using std::set;
|
||||||
|
using std::vector;
|
||||||
using Hurricane::ForEachIterator;
|
using Hurricane::ForEachIterator;
|
||||||
using Hurricane::_TName;
|
using Hurricane::_TName;
|
||||||
using Hurricane::Error;
|
using Hurricane::Error;
|
||||||
|
@ -47,6 +49,7 @@ namespace {
|
||||||
public:
|
public:
|
||||||
// Static Methods.
|
// Static Methods.
|
||||||
static ToolEnginesRelation* getToolEnginesRelation ( const Cell* cell );
|
static ToolEnginesRelation* getToolEnginesRelation ( const Cell* cell );
|
||||||
|
static void destroyAllToolEnginesRelations ();
|
||||||
// Constructor.
|
// Constructor.
|
||||||
static ToolEnginesRelation* create ( Cell* masterOwner );
|
static ToolEnginesRelation* create ( Cell* masterOwner );
|
||||||
// Methods.
|
// Methods.
|
||||||
|
@ -57,19 +60,23 @@ namespace {
|
||||||
inline unsigned int updateRoutingModificationFlag ();
|
inline unsigned int updateRoutingModificationFlag ();
|
||||||
virtual string _getTypeName () const;
|
virtual string _getTypeName () const;
|
||||||
virtual Record* _getRecord () const;
|
virtual Record* _getRecord () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Internal: Attributes
|
|
||||||
unsigned int _placementModificationFlag;
|
|
||||||
unsigned int _routingModificationFlag;
|
|
||||||
|
|
||||||
// Internal: Constructor.
|
// Internal: Constructor.
|
||||||
ToolEnginesRelation ( Cell* masterOwner );
|
ToolEnginesRelation ( Cell* masterOwner );
|
||||||
protected:
|
protected:
|
||||||
virtual void _preDestroy ();
|
virtual void _preDestroy ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Internal: Attributes
|
||||||
|
static set<ToolEnginesRelation*> _toolEnginesRelations;
|
||||||
|
unsigned int _placementModificationFlag;
|
||||||
|
unsigned int _routingModificationFlag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
set<ToolEnginesRelation*> ToolEnginesRelation::_toolEnginesRelations;
|
||||||
|
|
||||||
|
|
||||||
ToolEnginesRelation::ToolEnginesRelation ( Cell* masterOwner )
|
ToolEnginesRelation::ToolEnginesRelation ( Cell* masterOwner )
|
||||||
: Relation (masterOwner)
|
: Relation (masterOwner)
|
||||||
, _placementModificationFlag(0)
|
, _placementModificationFlag(0)
|
||||||
|
@ -82,6 +89,7 @@ namespace {
|
||||||
ToolEnginesRelation* enginesRelation = new ToolEnginesRelation(masterOwner);
|
ToolEnginesRelation* enginesRelation = new ToolEnginesRelation(masterOwner);
|
||||||
|
|
||||||
enginesRelation->_postCreate();
|
enginesRelation->_postCreate();
|
||||||
|
_toolEnginesRelations.insert ( enginesRelation );
|
||||||
|
|
||||||
return enginesRelation;
|
return enginesRelation;
|
||||||
}
|
}
|
||||||
|
@ -149,6 +157,22 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ToolEnginesRelation::destroyAllToolEnginesRelations ()
|
||||||
|
{
|
||||||
|
set<ToolEnginesRelation*>::iterator irelation = _toolEnginesRelations.begin();
|
||||||
|
for ( ; irelation != _toolEnginesRelations.end() ; ++irelation ) {
|
||||||
|
vector<ToolEngine*> tools;
|
||||||
|
forEach ( ToolEngine*, itool, (*irelation)->getSlaveOwners().getSubSet<ToolEngine*>() )
|
||||||
|
tools.push_back ( *itool );
|
||||||
|
|
||||||
|
for ( size_t i=0 ; i<tools.size() ; ++i ) {
|
||||||
|
tools[i]->destroy ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_toolEnginesRelations.clear ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // End of anonymous namespace.
|
} // End of anonymous namespace.
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,6 +225,12 @@ namespace CRL {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ToolEngine::destroyAll ()
|
||||||
|
{
|
||||||
|
ToolEnginesRelation::destroyAllToolEnginesRelations ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string ToolEngine::_getTypeName () const
|
string ToolEngine::_getTypeName () const
|
||||||
{
|
{
|
||||||
return _TName ( "ToolEngine" );
|
return _TName ( "ToolEngine" );
|
||||||
|
@ -300,10 +330,9 @@ namespace CRL {
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for_each_toolengine(toolengine, relation->getSlaveOwners().getSubSet<ToolEngine*>()) {
|
forEach ( ToolEngine*, itool, relation->getSlaveOwners().getSubSet<ToolEngine*>()) {
|
||||||
if (toolengine->getName() == name)
|
if (itool->getName() == name)
|
||||||
return toolengine;
|
return *itool;
|
||||||
end_for;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "hurricane/Commons.h"
|
#include "hurricane/Commons.h"
|
||||||
#include "hurricane/DBo.h"
|
#include "hurricane/DBo.h"
|
||||||
|
@ -46,6 +47,7 @@ namespace CRL {
|
||||||
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
using std::vector;
|
||||||
using Hurricane::Record;
|
using Hurricane::Record;
|
||||||
using Hurricane::Name;
|
using Hurricane::Name;
|
||||||
using Hurricane::DBo;
|
using Hurricane::DBo;
|
||||||
|
@ -61,6 +63,7 @@ namespace CRL {
|
||||||
// Static Methods.
|
// Static Methods.
|
||||||
static ToolEngines get ( const Cell* cell );
|
static ToolEngines get ( const Cell* cell );
|
||||||
static ToolEngine* get ( const Cell* cell, const Name& name );
|
static ToolEngine* get ( const Cell* cell, const Name& name );
|
||||||
|
static void destroyAll ();
|
||||||
// Methods.
|
// Methods.
|
||||||
virtual const Name& getName () const = 0;
|
virtual const Name& getName () const = 0;
|
||||||
inline Cell* getCell () const;
|
inline Cell* getCell () const;
|
||||||
|
|
Loading…
Reference in New Issue