cleaning in progress in Hurricane
This commit is contained in:
parent
001c6323f5
commit
af0c4a4609
|
@ -69,7 +69,7 @@ void CellEditor::zoomOut() {
|
|||
|
||||
void CellEditor::fitToWindow() {
|
||||
if (cell) {
|
||||
Box area(cell->GetBoundingBox());
|
||||
Box area(cell->getBoundingBox());
|
||||
QRectF rect;
|
||||
boxToRectangle(area, rect);
|
||||
view->fitInView(rect);
|
||||
|
|
|
@ -17,14 +17,14 @@ CellGraphicsItem::CellGraphicsItem(Cell* c):
|
|||
//QTransform transform;
|
||||
//transform.setMatrix(1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
//setTransform(transform);
|
||||
//for_each_instance(instance, cell->GetInstances()) {
|
||||
//for_each_instance(instance, cell->getInstances()) {
|
||||
// new InstanceGraphicsItem(this, instance);
|
||||
// end_for;
|
||||
//}
|
||||
|
||||
unsigned zValue = 10;
|
||||
for_each_slice(slice, cell->GetSlices()) {
|
||||
for_each_go(go, slice->GetGos()) {
|
||||
for_each_slice(slice, cell->getSlices()) {
|
||||
for_each_go(go, slice->getGos()) {
|
||||
Segment* segment = dynamic_cast<Segment*>(go);
|
||||
if (segment) {
|
||||
SegmentGraphicsItem* segmentItem = new SegmentGraphicsItem(this, segment);
|
||||
|
@ -38,18 +38,18 @@ CellGraphicsItem::CellGraphicsItem(Cell* c):
|
|||
}
|
||||
|
||||
CellGraphicsItem::CellGraphicsItem(InstanceGraphicsItem* master, Cell* c) : QGraphicsItem(master), cell(c) {
|
||||
//for_each_instance(instance, cell->GetInstances()) {
|
||||
//for_each_instance(instance, cell->getInstances()) {
|
||||
// new InstanceGraphicsItem(this, instance);
|
||||
// end_for;
|
||||
//}
|
||||
//for_each_slice(slice, cell->GetSlices()) {
|
||||
//for_each_slice(slice, cell->getSlices()) {
|
||||
// new SliceFigure(this, slice);
|
||||
// end_for;
|
||||
//}
|
||||
}
|
||||
|
||||
QRectF CellGraphicsItem::boundingRect() const {
|
||||
Box box = cell->GetBoundingBox();
|
||||
Box box = cell->getBoundingBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
//rect = transform().mapRect(rect);
|
||||
|
@ -65,7 +65,7 @@ void CellGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*
|
|||
void CellGraphicsItem::drawBoundary(QPainter* painter) {
|
||||
QPen pen(Qt::black);
|
||||
painter->setPen(pen);
|
||||
Box box = cell->GetAbutmentBox();
|
||||
Box box = cell->getAbutmentBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
painter->drawRect(rect);
|
||||
|
@ -73,7 +73,7 @@ void CellGraphicsItem::drawBoundary(QPainter* painter) {
|
|||
|
||||
void CellGraphicsItem::drawPhantom(QPainter* painter) {
|
||||
painter->setBrush(Qt::red);
|
||||
Box box = cell->GetAbutmentBox();
|
||||
Box box = cell->getAbutmentBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
painter->drawRect(rect);
|
||||
|
|
|
@ -13,9 +13,9 @@ using namespace H;
|
|||
|
||||
//InstanceGraphicsItem::InstanceGraphicsItem(Instance* inst)
|
||||
// : instance(inst),
|
||||
// cell(instance->GetMasterCell())
|
||||
// cell(instance->getMasterCell())
|
||||
//{
|
||||
// Transformation transformation = instance->GetTransformation();
|
||||
// Transformation transformation = instance->getTransformation();
|
||||
// QTransform transform;
|
||||
// QPoint pos;
|
||||
// HurricanePositionToQtPosition(transformation, transform, pos);
|
||||
|
@ -34,9 +34,9 @@ InstanceGraphicsItem::InstanceGraphicsItem(Cell* c)
|
|||
//InstanceGraphicsItem::InstanceGraphicsItem(InstanceGraphicsItem* parent, Instance* inst)
|
||||
// : QGraphicsItem(parent),
|
||||
// instance(inst),
|
||||
// cell(instance->GetMasterCell())
|
||||
// cell(instance->getMasterCell())
|
||||
//{
|
||||
// Transformation transformation = instance->GetTransformation();
|
||||
// Transformation transformation = instance->getTransformation();
|
||||
// QTransform transform;
|
||||
// QPoint pos;
|
||||
// HurricanePositionToQtPosition(transformation, transform, pos);
|
||||
|
@ -46,14 +46,14 @@ InstanceGraphicsItem::InstanceGraphicsItem(Cell* c)
|
|||
//}
|
||||
|
||||
void InstanceGraphicsItem::constructSubInstances() {
|
||||
for_each_instance(instance, cell->GetInstances()) {
|
||||
for_each_instance(instance, cell->getInstances()) {
|
||||
//new InstanceGraphicsItem(this, instance);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
QRectF InstanceGraphicsItem::boundingRect() const {
|
||||
Box box = cell->GetAbutmentBox();
|
||||
Box box = cell->getAbutmentBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
return rect;
|
||||
|
@ -70,18 +70,18 @@ void InstanceGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsIt
|
|||
}
|
||||
|
||||
void InstanceGraphicsItem::drawElements(QPainter* painter) {
|
||||
for_each_slice(slice, cell->GetSlices()) {
|
||||
for_each_slice(slice, cell->getSlices()) {
|
||||
painter->save();
|
||||
BasicLayer* layer = dynamic_cast<BasicLayer*>(slice->GetLayer());
|
||||
BasicLayer* layer = dynamic_cast<BasicLayer*>(slice->getLayer());
|
||||
if (layer) {
|
||||
painter->setBrush(QColor(layer->getRedValue(), layer->getGreenValue(), layer->getBlueValue()));
|
||||
} else {
|
||||
painter->setBrush(Qt::blue);
|
||||
}
|
||||
for_each_go(go, slice->GetGos()) {
|
||||
for_each_go(go, slice->getGos()) {
|
||||
Segment* segment = dynamic_cast<Segment*>(go);
|
||||
if (segment) {
|
||||
Box box = segment->GetBoundingBox();
|
||||
Box box = segment->getBoundingBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
painter->drawRect(rect);
|
||||
|
@ -97,7 +97,7 @@ void InstanceGraphicsItem::drawElements(QPainter* painter) {
|
|||
void InstanceGraphicsItem::drawBoundary(QPainter* painter) {
|
||||
QPen pen(Qt::black);
|
||||
painter->setPen(pen);
|
||||
Box box = cell->GetAbutmentBox();
|
||||
Box box = cell->getAbutmentBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
painter->drawRect(rect);
|
||||
|
@ -105,7 +105,7 @@ void InstanceGraphicsItem::drawBoundary(QPainter* painter) {
|
|||
|
||||
void InstanceGraphicsItem::drawPhantom(QPainter* painter) {
|
||||
painter->setBrush(Qt::red);
|
||||
Box box = cell->GetAbutmentBox();
|
||||
Box box = cell->getAbutmentBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
painter->drawRect(rect);
|
||||
|
|
|
@ -66,7 +66,7 @@ SegmentGraphicsItem::SegmentGraphicsItem(CellGraphicsItem* master, Segment* s):
|
|||
}
|
||||
|
||||
QRectF SegmentGraphicsItem::boundingRect() const {
|
||||
Box box = segment->GetBoundingBox();
|
||||
Box box = segment->getBoundingBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
return rect;
|
||||
|
@ -75,10 +75,10 @@ QRectF SegmentGraphicsItem::boundingRect() const {
|
|||
void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
|
||||
//if (option->levelOfDetail > 1.0) {
|
||||
painter->setClipRect(option->exposedRect);
|
||||
Box box = segment->GetBoundingBox();
|
||||
Box box = segment->getBoundingBox();
|
||||
QRectF rect;
|
||||
boxToRectangle(box, rect);
|
||||
BasicLayer* blayer = dynamic_cast<BasicLayer*>(segment->GetLayer());
|
||||
BasicLayer* blayer = dynamic_cast<BasicLayer*>(segment->getLayer());
|
||||
if (blayer) {
|
||||
QColor layerColor(blayer->getRedValue(),
|
||||
blayer->getGreenValue(),
|
||||
|
@ -86,14 +86,14 @@ void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
|||
QBrush brush(layerColor);
|
||||
brush.setStyle(Qt::Dense1Pattern);
|
||||
painter->setBrush(brush);
|
||||
//painter->setBrush(getBrush(blayer->GetFillPattern(),
|
||||
// blayer->GetRedValue(),
|
||||
// blayer->GetGreenValue(),
|
||||
// blayer->GetBlueValue()));
|
||||
//painter->setBrush(getBrush(blayer->getFillPattern(),
|
||||
// blayer->getRedValue(),
|
||||
// blayer->getGreenValue(),
|
||||
// blayer->getBlueValue()));
|
||||
painter->setPen(layerColor);
|
||||
painter->drawRect(rect);
|
||||
} else {
|
||||
CompositeLayer* clayer = dynamic_cast<CompositeLayer*>(segment->GetLayer());
|
||||
CompositeLayer* clayer = dynamic_cast<CompositeLayer*>(segment->getLayer());
|
||||
if (clayer) {
|
||||
for_each_basic_layer(basiclayer, clayer->getBasicLayers()) {
|
||||
QColor layerColor(basiclayer->getRedValue(),
|
||||
|
@ -102,10 +102,10 @@ void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
|||
QBrush brush(layerColor);
|
||||
brush.setStyle(Qt::Dense1Pattern);
|
||||
painter->setBrush(brush);
|
||||
//painter->setBrush(getBrush(basiclayer->GetFillPattern(),
|
||||
// basiclayer->GetRedValue(),
|
||||
// basiclayer->GetGreenValue(),
|
||||
// basiclayer->GetBlueValue()));
|
||||
//painter->setBrush(getBrush(basiclayer->getFillPattern(),
|
||||
// basiclayer->getRedValue(),
|
||||
// basiclayer->getGreenValue(),
|
||||
// basiclayer->getBlueValue()));
|
||||
painter->setPen(layerColor);
|
||||
painter->drawRect(rect);
|
||||
end_for;
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
using namespace H;
|
||||
|
||||
inline void boxToRectangle(const Box& box, QRectF& rec) {
|
||||
double xmin = GetValue(box.getXMin());
|
||||
double xmax = GetValue(box.getXMax());
|
||||
double ymin = GetValue(box.getYMin());
|
||||
double ymax = GetValue(box.getYMax());
|
||||
double xmin = getValue(box.getXMin());
|
||||
double xmax = getValue(box.getXMax());
|
||||
double ymin = getValue(box.getYMin());
|
||||
double ymax = getValue(box.getYMax());
|
||||
rec.setCoords(xmin, ymin, xmax, ymax);
|
||||
}
|
||||
|
||||
inline void hurricanePositionToQtPosition(const Transformation& transformation, QTransform& transform, QPoint& position) {
|
||||
double tx = GetValue(transformation.getTx());
|
||||
double ty = GetValue(transformation.getTy());
|
||||
double tx = getValue(transformation.getTx());
|
||||
double ty = getValue(transformation.getTy());
|
||||
|
||||
position.setX((int)tx);
|
||||
position.setY((int)ty);
|
||||
|
|
|
@ -37,14 +37,14 @@ class BasicLayer_BasicLayers : public Collection<BasicLayer*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual BasicLayer* GetElement() const;
|
||||
public: virtual Hurricane::Locator<BasicLayer*>* GetClone() const;
|
||||
public: virtual BasicLayer* getElement() const;
|
||||
public: virtual Hurricane::Locator<BasicLayer*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -67,13 +67,13 @@ class BasicLayer_BasicLayers : public Collection<BasicLayer*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<BasicLayer*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<BasicLayer*>* GetLocator() const;
|
||||
public: virtual Collection<BasicLayer*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<BasicLayer*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -102,7 +102,7 @@ BasicLayer* BasicLayer::create(Technology* technology, const Name& name, const T
|
|||
BasicLayer* basicLayer =
|
||||
new BasicLayer(technology, name, type, extractNumber, minimalSize, minimalSpacing);
|
||||
|
||||
basicLayer->_PostCreate();
|
||||
basicLayer->_postCreate();
|
||||
|
||||
return basicLayer;
|
||||
}
|
||||
|
@ -139,11 +139,11 @@ void BasicLayer::setFillPattern(const string& fillPattern)
|
|||
}
|
||||
}
|
||||
|
||||
void BasicLayer::_PostCreate()
|
||||
void BasicLayer::_postCreate()
|
||||
// ***************************
|
||||
{
|
||||
Mask basicLayersMask = 0;
|
||||
for_each_basic_layer(basicLayer, getTechnology()->GetBasicLayers()) {
|
||||
for_each_basic_layer(basicLayer, getTechnology()->getBasicLayers()) {
|
||||
basicLayersMask |= basicLayer->getMask();
|
||||
end_for;
|
||||
}
|
||||
|
@ -165,40 +165,40 @@ void BasicLayer::_PostCreate()
|
|||
_setExtractMask(extractMask);
|
||||
}
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void BasicLayer::_PreDelete()
|
||||
void BasicLayer::_preDestroy()
|
||||
// **************************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
CompositeLayers compositeLayers = getTechnology()->GetCompositeLayers();
|
||||
CompositeLayers compositeLayers = getTechnology()->getCompositeLayers();
|
||||
for_each_composite_layer(compositeLayer, compositeLayers) {
|
||||
if (compositeLayer->contains(this)) compositeLayer->remove(this);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
string BasicLayer::_GetString() const
|
||||
string BasicLayer::_getString() const
|
||||
// **********************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
// s.insert(s.length() - 1, " " + GetString(_type));
|
||||
string s = Inherit::_getString();
|
||||
// s.insert(s.length() - 1, " " + getString(_type));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* BasicLayer::_GetRecord() const
|
||||
Record* BasicLayer::_getRecord() const
|
||||
// *****************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Type", &_type));
|
||||
record->Add(GetSlot("RedValue", &_redValue));
|
||||
record->Add(GetSlot("GreenValue", &_greenValue));
|
||||
record->Add(GetSlot("BlueValue", &_blueValue));
|
||||
record->Add(GetSlot("FillPattern", &_fillPattern));
|
||||
record->Add(GetSlot("DisplayThreshold", &_displayThreshold));
|
||||
record->Add(getSlot("Type", &_type));
|
||||
record->Add(getSlot("RedValue", &_redValue));
|
||||
record->Add(getSlot("GreenValue", &_greenValue));
|
||||
record->Add(getSlot("BlueValue", &_blueValue));
|
||||
record->Add(getSlot("FillPattern", &_fillPattern));
|
||||
record->Add(getSlot("DisplayThreshold", &_displayThreshold));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -228,23 +228,23 @@ BasicLayer_BasicLayers& BasicLayer_BasicLayers::operator=(const BasicLayer_Basic
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<BasicLayer*>* BasicLayer_BasicLayers::GetClone() const
|
||||
Collection<BasicLayer*>* BasicLayer_BasicLayers::getClone() const
|
||||
// **************************************************************
|
||||
{
|
||||
return new BasicLayer_BasicLayers(*this);
|
||||
}
|
||||
|
||||
Locator<BasicLayer*>* BasicLayer_BasicLayers::GetLocator() const
|
||||
Locator<BasicLayer*>* BasicLayer_BasicLayers::getLocator() const
|
||||
// *************************************************************
|
||||
{
|
||||
return new Locator(_basicLayer);
|
||||
}
|
||||
|
||||
string BasicLayer_BasicLayers::_GetString() const
|
||||
string BasicLayer_BasicLayers::_getString() const
|
||||
// **********************************************
|
||||
{
|
||||
string s = "<" + _TName("BasicLayer::BasicLayers");
|
||||
if (_basicLayer) s += " " + GetString(_basicLayer);
|
||||
if (_basicLayer) s += " " + getString(_basicLayer);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -276,13 +276,13 @@ BasicLayer_BasicLayers::Locator& BasicLayer_BasicLayers::Locator::operator=(cons
|
|||
return *this;
|
||||
}
|
||||
|
||||
BasicLayer* BasicLayer_BasicLayers::Locator::GetElement() const
|
||||
BasicLayer* BasicLayer_BasicLayers::Locator::getElement() const
|
||||
// ************************************************************
|
||||
{
|
||||
return (BasicLayer*)_basicLayer;
|
||||
}
|
||||
|
||||
Locator<BasicLayer*>* BasicLayer_BasicLayers::Locator::GetClone() const
|
||||
Locator<BasicLayer*>* BasicLayer_BasicLayers::Locator::getClone() const
|
||||
// ********************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -300,11 +300,11 @@ void BasicLayer_BasicLayers::Locator::Progress()
|
|||
_basicLayer = NULL;
|
||||
}
|
||||
|
||||
string BasicLayer_BasicLayers::Locator::_GetString() const
|
||||
string BasicLayer_BasicLayers::Locator::_getString() const
|
||||
// *******************************************************
|
||||
{
|
||||
string s = "<" + _TName("BasicLayer::BasicLayers::Locator");
|
||||
if (_basicLayer) s += " " + GetString(_basicLayer);
|
||||
if (_basicLayer) s += " " + getString(_basicLayer);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -334,17 +334,17 @@ BasicLayer::Type& BasicLayer::Type::operator=(const Type& type)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string BasicLayer::Type::_GetString() const
|
||||
string BasicLayer::Type::_getString() const
|
||||
// ****************************************
|
||||
{
|
||||
return GetString(_code);
|
||||
return getString(_code);
|
||||
}
|
||||
|
||||
Record* BasicLayer::Type::_GetRecord() const
|
||||
Record* BasicLayer::Type::_getRecord() const
|
||||
// ***********************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", &_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", &_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ class BasicLayer : public Layer {
|
|||
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("BasicLayer::Type"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("BasicLayer::Type"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -91,13 +91,13 @@ class BasicLayer : public Layer {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("BasicLayer");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("BasicLayer");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: virtual BasicLayer* _getSymbolicBasicLayer() {return this;};
|
||||
|
||||
public: void _fill(View* view, const Box& box) const;
|
||||
|
@ -128,8 +128,8 @@ template<>
|
|||
template<>
|
||||
inline Record* ProxyRecord<BasicLayer::Type::Code> ( const BasicLayer::Type::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<BasicLayer*> BasicLayerFilter;
|
|||
#define for_each_basic_layer(basicLayer, basicLayers)\
|
||||
/****************************************************/\
|
||||
{\
|
||||
BasicLayerLocator _locator = basicLayers.GetLocator();\
|
||||
BasicLayerLocator _locator = basicLayers.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
BasicLayer* basicLayer = _locator.GetElement();\
|
||||
BasicLayer* basicLayer = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -255,8 +255,8 @@ Box& Box::shrinkByFactor(double factor)
|
|||
// **************************************
|
||||
{
|
||||
assert((0 <= factor) && (factor <= 1));
|
||||
Unit dx=GetUnit(0.5*(1- factor) * (GetValue(_xMax) - GetValue(_xMin)));
|
||||
Unit dy=GetUnit(0.5*(1- factor) * (GetValue(_yMax) - GetValue(_yMin)));
|
||||
Unit dx=getUnit(0.5*(1- factor) * (getValue(_xMax) - getValue(_xMin)));
|
||||
Unit dy=getUnit(0.5*(1- factor) * (getValue(_yMax) - getValue(_yMin)));
|
||||
return inflate(-dx, -dy);
|
||||
}
|
||||
|
||||
|
@ -314,28 +314,28 @@ Box& Box::translate(const Unit& dx, const Unit& dy)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Box::_GetString() const
|
||||
string Box::_getString() const
|
||||
// ***************************
|
||||
{
|
||||
if (isEmpty())
|
||||
return "<" + _TName("Box") + " empty>";
|
||||
else
|
||||
return "<" + _TName("Box") + " " +
|
||||
GetValueString(_xMin) + " " + GetValueString(_yMin) + " " +
|
||||
GetValueString(_xMax) + " " + GetValueString(_yMax) +
|
||||
getValueString(_xMin) + " " + getValueString(_yMin) + " " +
|
||||
getValueString(_xMax) + " " + getValueString(_yMax) +
|
||||
">";
|
||||
}
|
||||
|
||||
Record* Box::_GetRecord() const
|
||||
Record* Box::_getRecord() const
|
||||
// **********************
|
||||
{
|
||||
if (isEmpty()) return NULL;
|
||||
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("XMin", &_xMin));
|
||||
record->Add(GetSlot("YMin", &_yMin));
|
||||
record->Add(GetSlot("XMax", &_xMax));
|
||||
record->Add(GetSlot("YMax", &_yMax));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("XMin", &_xMin));
|
||||
record->Add(getSlot("YMin", &_yMin));
|
||||
record->Add(getSlot("XMax", &_xMax));
|
||||
record->Add(getSlot("YMax", &_yMax));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
// 21-10-2003 added ManhattanDistance & ShrinkByFactor
|
||||
|
||||
#ifndef HURRICANE_BOX
|
||||
#define HURRICANE_BOX
|
||||
|
@ -110,9 +109,9 @@ class Box {
|
|||
// ******
|
||||
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Box"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Box"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ typedef GenericFilter<Box> BoxFilter;
|
|||
#define for_each_box(box, boxes)\
|
||||
/*******************************/\
|
||||
{\
|
||||
BoxLocator _locator = boxes.GetLocator();\
|
||||
BoxLocator _locator = boxes.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Box box = _locator.GetElement();\
|
||||
Box box = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ Cell::Cell(Library* library, const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't create " + _TName("Cell") + " : empty name");
|
||||
|
||||
if (_library->GetCell(_name))
|
||||
throw Error("Can't create " + _TName("Cell") + " " + GetString(_name) + " : already exists");
|
||||
if (_library->getCell(_name))
|
||||
throw Error("Can't create " + _TName("Cell") + " " + getString(_name) + " : already exists");
|
||||
}
|
||||
|
||||
Cell* Cell::Create(Library* library, const Name& name)
|
||||
|
@ -60,20 +60,20 @@ Cell* Cell::Create(Library* library, const Name& name)
|
|||
{
|
||||
Cell* cell = new Cell(library, name);
|
||||
|
||||
cell->_PostCreate();
|
||||
cell->_postCreate();
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
Box Cell::GetBoundingBox() const
|
||||
Box Cell::getBoundingBox() const
|
||||
// *****************************
|
||||
{
|
||||
if (_boundingBox.isEmpty()) {
|
||||
Box& boundingBox = (Box&)_boundingBox;
|
||||
boundingBox = _abutmentBox;
|
||||
boundingBox.merge(_quadTree.GetBoundingBox());
|
||||
for_each_slice(slice, GetSlices()) {
|
||||
boundingBox.merge(slice->GetBoundingBox());
|
||||
boundingBox.merge(_quadTree.getBoundingBox());
|
||||
for_each_slice(slice, getSlices()) {
|
||||
boundingBox.merge(slice->getBoundingBox());
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ bool Cell::IsLeaf() const
|
|||
bool Cell::IsCalledBy(Cell* cell) const
|
||||
// ************************************
|
||||
{
|
||||
for_each_instance(instance, cell->GetInstances()) {
|
||||
Cell* masterCell = instance->GetMasterCell();
|
||||
for_each_instance(instance, cell->getInstances()) {
|
||||
Cell* masterCell = instance->getMasterCell();
|
||||
if (masterCell == this) return true;
|
||||
if (IsCalledBy(masterCell)) return true;
|
||||
end_for;
|
||||
|
@ -106,12 +106,12 @@ void Cell::SetName(const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't change " + _TName("Cell") + " name : empty name");
|
||||
|
||||
if (_library->GetCell(name))
|
||||
if (_library->getCell(name))
|
||||
throw Error("Can't change " + _TName("Cell") + " name : already exists");
|
||||
|
||||
_library->_GetCellMap()._Remove(this);
|
||||
_library->_getCellMap()._Remove(this);
|
||||
_name = name;
|
||||
_library->_GetCellMap()._Insert(this);
|
||||
_library->_getCellMap()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,40 +132,40 @@ void Cell::FlattenNets(bool buildRings)
|
|||
{
|
||||
OpenUpdateSession ();
|
||||
|
||||
for_each_occurrence ( occurrence, GetHyperNetRootNetOccurrences() ) {
|
||||
for_each_occurrence ( occurrence, getHyperNetRootNetOccurrences() ) {
|
||||
HyperNet hyperNet ( occurrence );
|
||||
if ( !occurrence.GetPath().IsEmpty() ) {
|
||||
if ( !occurrence.getPath().IsEmpty() ) {
|
||||
DeepNet* deepNet = DeepNet::Create ( hyperNet );
|
||||
if (deepNet) deepNet->_CreateRoutingPads ( buildRings );
|
||||
} else {
|
||||
RoutingPad* previousRP = NULL;
|
||||
RoutingPad* currentRP = NULL;
|
||||
Net* net = static_cast<Net*>(occurrence.GetEntity());
|
||||
Net* net = static_cast<Net*>(occurrence.getEntity());
|
||||
|
||||
for_each_component ( component, net->GetComponents() ) {
|
||||
for_each_component ( component, net->getComponents() ) {
|
||||
Plug* primaryPlug = dynamic_cast<Plug*>( component );
|
||||
if ( primaryPlug ) {
|
||||
if ( !primaryPlug->GetBodyHook()->GetSlaveHooks().IsEmpty() ) {
|
||||
if ( !primaryPlug->getBodyHook()->getSlaveHooks().IsEmpty() ) {
|
||||
cerr << "[ERROR] " << primaryPlug << "\n"
|
||||
<< " has attached components, not managed yet." << endl;
|
||||
} else {
|
||||
primaryPlug->GetBodyHook()->Detach ();
|
||||
primaryPlug->getBodyHook()->Detach ();
|
||||
}
|
||||
}
|
||||
end_for
|
||||
}
|
||||
|
||||
for_each_occurrence ( plugOccurrence, hyperNet.GetLeafPlugOccurrences() ) {
|
||||
for_each_occurrence ( plugOccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
currentRP = CreateRoutingPad ( net, plugOccurrence );
|
||||
currentRP->Materialize ();
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->GetBodyHook()->Attach ( previousRP->GetBodyHook() );
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
Plug* plug = static_cast<Plug*>( plugOccurrence.GetEntity() );
|
||||
if ( plugOccurrence.GetPath().IsEmpty() ) {
|
||||
plug->GetBodyHook()->Attach ( currentRP->GetBodyHook() );
|
||||
plug->GetBodyHook()->Detach ();
|
||||
Plug* plug = static_cast<Plug*>( plugOccurrence.getEntity() );
|
||||
if ( plugOccurrence.getPath().IsEmpty() ) {
|
||||
plug->getBodyHook()->Attach ( currentRP->getBodyHook() );
|
||||
plug->getBodyHook()->Detach ();
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
@ -173,16 +173,16 @@ void Cell::FlattenNets(bool buildRings)
|
|||
end_for
|
||||
}
|
||||
|
||||
for_each_component ( component, net->GetComponents() ) {
|
||||
for_each_component ( component, net->getComponents() ) {
|
||||
Pin* pin = dynamic_cast<Pin*>( component );
|
||||
if ( pin ) {
|
||||
currentRP = CreateRoutingPad ( pin );
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->GetBodyHook()->Attach ( previousRP->GetBodyHook() );
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
pin->GetBodyHook()->Attach ( currentRP->GetBodyHook() );
|
||||
pin->GetBodyHook()->Detach ();
|
||||
pin->getBodyHook()->Attach ( currentRP->getBodyHook() );
|
||||
pin->getBodyHook()->Detach ();
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
@ -199,74 +199,72 @@ void Cell::FlattenNets(bool buildRings)
|
|||
void Cell::Materialize()
|
||||
// *********************
|
||||
{
|
||||
for_each_instance(instance, GetInstances()) instance->Materialize(); end_for;
|
||||
for_each_net(net, GetNets()) net->Materialize(); end_for;
|
||||
for_each_marker(marker, GetMarkers()) marker->Materialize(); end_for;
|
||||
for_each_instance(instance, getInstances()) instance->Materialize(); end_for;
|
||||
for_each_net(net, getNets()) net->Materialize(); end_for;
|
||||
for_each_marker(marker, getMarkers()) marker->Materialize(); end_for;
|
||||
}
|
||||
|
||||
void Cell::Unmaterialize()
|
||||
// ***********************
|
||||
{
|
||||
for_each_instance(instance, GetInstances()) instance->Unmaterialize(); end_for;
|
||||
for_each_net(net, GetNets()) net->Unmaterialize(); end_for;
|
||||
for_each_marker(marker, GetMarkers()) marker->Unmaterialize(); end_for;
|
||||
for_each_instance(instance, getInstances()) instance->Unmaterialize(); end_for;
|
||||
for_each_net(net, getNets()) net->Unmaterialize(); end_for;
|
||||
for_each_marker(marker, getMarkers()) marker->Unmaterialize(); end_for;
|
||||
}
|
||||
|
||||
void Cell::_PostCreate()
|
||||
void Cell::_postCreate()
|
||||
// *********************
|
||||
{
|
||||
_library->_GetCellMap()._Insert(this);
|
||||
_library->_getCellMap()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Cell::_PreDelete()
|
||||
void Cell::_preDestroy()
|
||||
// ********************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
while(_slaveEntityMap.size()) {
|
||||
_slaveEntityMap.begin()->second->Delete();
|
||||
_slaveEntityMap.begin()->second->destroy();
|
||||
}
|
||||
|
||||
//for_each_view(view, GetViews()) view->SetCell(NULL); end_for;
|
||||
for_each_marker(marker, GetMarkers()) marker->Delete(); end_for;
|
||||
for_each_instance(slaveInstance, GetSlaveInstances()) slaveInstance->Delete(); end_for;
|
||||
for_each_instance(instance, GetInstances()) instance->Delete(); end_for;
|
||||
for_each_net(net, GetNets()) net->Delete(); end_for;
|
||||
for_each_slice(slice, GetSlices()) slice->_Delete(); end_for;
|
||||
//for_each_view(view, getViews()) view->SetCell(NULL); end_for;
|
||||
for_each_marker(marker, getMarkers()) marker->destroy(); end_for;
|
||||
for_each_instance(slaveInstance, getSlaveInstances()) slaveInstance->destroy(); end_for;
|
||||
for_each_instance(instance, getInstances()) instance->destroy(); end_for;
|
||||
for_each_net(net, getNets()) net->destroy(); end_for;
|
||||
for_each_slice(slice, getSlices()) slice->_destroy(); end_for;
|
||||
|
||||
_library->_GetCellMap()._Remove(this);
|
||||
_library->_getCellMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Cell::_GetString() const
|
||||
string Cell::_getString() const
|
||||
// ****************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Cell::_GetRecord() const
|
||||
Record* Cell::_getRecord() const
|
||||
// ***********************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Library", _library));
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("Instances", &_instanceMap));
|
||||
record->Add(GetSlot("QuadTree", &_quadTree));
|
||||
record->Add(GetSlot("SlaveInstances", &_slaveInstanceSet));
|
||||
record->Add(GetSlot("Nets", &_netMap));
|
||||
record->Add(GetSlot("Pins", &_pinMap));
|
||||
record->Add(GetSlot("Slices", &_sliceMap));
|
||||
record->Add(GetSlot("Markers", &_markerSet));
|
||||
//record->Add(GetSlot("Views", &_viewSet));
|
||||
record->Add(GetSlot("AbutmentBox", &_abutmentBox));
|
||||
record->Add(GetSlot("BoundingBox", &_boundingBox));
|
||||
record->Add(GetSlot("IsTerminal", &_isTerminal));
|
||||
record->Add(GetSlot("IsFlattenLeaf", &_isFlattenLeaf));
|
||||
//record->Add(GetSlot("Symbol", _symbol));
|
||||
record->Add(getSlot("Library", _library));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("Instances", &_instanceMap));
|
||||
record->Add(getSlot("QuadTree", &_quadTree));
|
||||
record->Add(getSlot("SlaveInstances", &_slaveInstanceSet));
|
||||
record->Add(getSlot("Nets", &_netMap));
|
||||
record->Add(getSlot("Pins", &_pinMap));
|
||||
record->Add(getSlot("Slices", &_sliceMap));
|
||||
record->Add(getSlot("Markers", &_markerSet));
|
||||
record->Add(getSlot("AbutmentBox", &_abutmentBox));
|
||||
record->Add(getSlot("BoundingBox", &_boundingBox));
|
||||
record->Add(getSlot("IsTerminal", &_isTerminal));
|
||||
record->Add(getSlot("IsFlattenLeaf", &_isFlattenLeaf));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -278,8 +276,8 @@ void Cell::_Fit(const Box& box)
|
|||
if (_boundingBox.isEmpty()) return;
|
||||
if (_boundingBox.contains(box)) return;
|
||||
_boundingBox.merge(box);
|
||||
for_each_instance(instance, GetSlaveInstances()) {
|
||||
instance->GetCell()->_Fit(instance->GetTransformation().getBox(box));
|
||||
for_each_instance(instance, getSlaveInstances()) {
|
||||
instance->getCell()->_Fit(instance->getTransformation().getBox(box));
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
@ -291,8 +289,8 @@ void Cell::_Unfit(const Box& box)
|
|||
if (_boundingBox.isEmpty()) return;
|
||||
if (!_boundingBox.isConstrainedBy(box)) return;
|
||||
_boundingBox.makeEmpty();
|
||||
for_each_instance(instance, GetSlaveInstances()) {
|
||||
instance->GetCell()->_Unfit(instance->GetTransformation().getBox(box));
|
||||
for_each_instance(instance, getSlaveInstances()) {
|
||||
instance->getCell()->_Unfit(instance->getTransformation().getBox(box));
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +298,7 @@ void Cell::_Unfit(const Box& box)
|
|||
void Cell::_AddSlaveEntity(Entity* entity, Entity* slaveEntity)
|
||||
// ************************************************************************
|
||||
{
|
||||
assert(entity->GetCell() == this);
|
||||
assert(entity->getCell() == this);
|
||||
|
||||
_slaveEntityMap.insert(pair<Entity*,Entity*>(entity,slaveEntity));
|
||||
}
|
||||
|
@ -308,7 +306,7 @@ void Cell::_AddSlaveEntity(Entity* entity, Entity* slaveEntity)
|
|||
void Cell::_RemoveSlaveEntity(Entity* entity, Entity* slaveEntity)
|
||||
// ***************************************************************************
|
||||
{
|
||||
assert(entity->GetCell() == this);
|
||||
assert(entity->getCell() == this);
|
||||
|
||||
pair<SlaveEntityMap::iterator,SlaveEntityMap::iterator>
|
||||
bounds = _slaveEntityMap.equal_range(entity);
|
||||
|
@ -321,147 +319,20 @@ void Cell::_RemoveSlaveEntity(Entity* entity, Entity* slaveEntity)
|
|||
}
|
||||
}
|
||||
|
||||
void Cell::_GetSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end)
|
||||
void Cell::_getSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end)
|
||||
// *********************************************************************************************************
|
||||
{
|
||||
begin = _slaveEntityMap.begin();
|
||||
end = _slaveEntityMap.end();
|
||||
}
|
||||
|
||||
void Cell::_GetSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end)
|
||||
void Cell::_getSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end)
|
||||
// *********************************************************************************************************
|
||||
{
|
||||
begin = _slaveEntityMap.lower_bound(entity);
|
||||
end = _slaveEntityMap.upper_bound(entity);
|
||||
}
|
||||
|
||||
//bool Cell::_IsDrawable(View* view) const
|
||||
//// *************************************
|
||||
//{
|
||||
// return true;
|
||||
// //if (view->GetCell() == this) return true;
|
||||
//
|
||||
// //if (is_a<MapView*>(view)) return true;
|
||||
//
|
||||
// //return (1 < (double)view->GetScreenSize(_boundingBox.GetHeight()));
|
||||
//// return (100 < ((double)view->GetScreenSize(_boundingBox.GetWidth()) *
|
||||
//// (double)view->GetScreenSize(_boundingBox.GetHeight())));
|
||||
//}
|
||||
//
|
||||
//bool Cell::_ContentIsDrawable(View* view) const
|
||||
//// ********************************************
|
||||
//{
|
||||
// if (IsTerminal()) return false;
|
||||
//
|
||||
// return true;
|
||||
//
|
||||
// //if (view->GetCell() == this) return true;
|
||||
//
|
||||
// //if (is_a<MapView*>(view)) return false;
|
||||
//
|
||||
// //return (40 < (double)view->GetScreenSize(_boundingBox.GetHeight()));
|
||||
//// return (400 < ((double)view->GetScreenSize(_boundingBox.GetWidth()) *
|
||||
//// (double)view->GetScreenSize(_boundingBox.GetHeight())));
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawPhantoms(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// **********************************************************************************************
|
||||
//{
|
||||
//// if (_IsDrawable(view)) { // To avoid irregular display of instances phantoms
|
||||
//// if (!_ContentIsDrawable(view))
|
||||
//// view->FillRectangle(transformation.GetBox(GetAbutmentBox()));
|
||||
//// else {
|
||||
//// for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
//// instance->_DrawPhantoms(view, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawBoundaries(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// ************************************************************************************************
|
||||
//{
|
||||
// // if (_IsDrawable(view)) { // To avoid irregular display of instances phantoms
|
||||
// // view->DrawRectangle(transformation.GetBox(GetAbutmentBox()));
|
||||
// // if (_ContentIsDrawable(view)) {
|
||||
// // for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
// // instance->_DrawBoundaries(view, updateArea, transformation);
|
||||
// // end_for;
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawContent(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
|
||||
//// ****************************************************************************************************
|
||||
//{
|
||||
//// if (_IsDrawable(view)) {
|
||||
//// if (_ContentIsDrawable(view)) {
|
||||
//// view->CheckForDisplayInterruption();
|
||||
//// for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
//// instance->_Draw(view, basicLayer, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// for_each_slice(slice, GetSlices()) {
|
||||
//// slice->_Draw(view, basicLayer, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawRubbers(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// *********************************************************************************************
|
||||
//{
|
||||
//// if (_IsDrawable(view)) {
|
||||
//// if (_ContentIsDrawable(view)) {
|
||||
//// for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
//// instance->_DrawRubbers(view, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// for_each_rubber(rubber, GetRubbersUnder(updateArea)) {
|
||||
//// rubber->_Draw(view, NULL, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawMarkers(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// *********************************************************************************************
|
||||
//{
|
||||
//// if (_IsDrawable(view)) {
|
||||
//// if (_ContentIsDrawable(view)) {
|
||||
//// for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
//// instance->_DrawMarkers(view, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// for_each_marker(marker, GetMarkersUnder(updateArea)) {
|
||||
//// marker->_Draw(view, NULL, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
//
|
||||
//void Cell::_DrawDisplaySlots(View* view, const Box& area, const Box& updateArea, const Transformation& transformation)
|
||||
//// ********************************************************************************************************************
|
||||
//{
|
||||
//// if (_IsDrawable(view)) {
|
||||
//// if (_ContentIsDrawable(view)) {
|
||||
//// for_each_instance(instance, GetInstancesUnder(updateArea)) {
|
||||
//// instance->_DrawDisplaySlots(view, area, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// for_each_display_slot(displaySlot, GetDisplaySlots(this)) {
|
||||
//// view->_DrawDisplaySlot(displaySlot, area, updateArea, transformation);
|
||||
//// end_for;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
//
|
||||
// ****************************************************************************************************
|
||||
// Cell::InstanceMap implementation
|
||||
// ****************************************************************************************************
|
||||
|
@ -472,22 +343,22 @@ Cell::InstanceMap::InstanceMap()
|
|||
{
|
||||
}
|
||||
|
||||
Name Cell::InstanceMap::_GetKey(Instance* instance) const
|
||||
Name Cell::InstanceMap::_getKey(Instance* instance) const
|
||||
// ******************************************************
|
||||
{
|
||||
return instance->GetName();
|
||||
return instance->getName();
|
||||
}
|
||||
|
||||
unsigned Cell::InstanceMap::_GetHashValue(Name name) const
|
||||
unsigned Cell::InstanceMap::_getHashValue(Name name) const
|
||||
// *******************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8;
|
||||
return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8;
|
||||
}
|
||||
|
||||
Instance* Cell::InstanceMap::_GetNextElement(Instance* instance) const
|
||||
Instance* Cell::InstanceMap::_getNextElement(Instance* instance) const
|
||||
// *******************************************************************
|
||||
{
|
||||
return instance->_GetNextOfCellInstanceMap();
|
||||
return instance->_getNextOfCellInstanceMap();
|
||||
}
|
||||
|
||||
void Cell::InstanceMap::_SetNextElement(Instance* instance, Instance* nextInstance) const
|
||||
|
@ -508,16 +379,16 @@ Cell::SlaveInstanceSet::SlaveInstanceSet()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned Cell::SlaveInstanceSet::_GetHashValue(Instance* slaveInstance) const
|
||||
unsigned Cell::SlaveInstanceSet::_getHashValue(Instance* slaveInstance) const
|
||||
// **************************************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)slaveInstance ) ) / 8;
|
||||
}
|
||||
|
||||
Instance* Cell::SlaveInstanceSet::_GetNextElement(Instance* slaveInstance) const
|
||||
Instance* Cell::SlaveInstanceSet::_getNextElement(Instance* slaveInstance) const
|
||||
// *****************************************************************************
|
||||
{
|
||||
return slaveInstance->_GetNextOfCellSlaveInstanceSet();
|
||||
return slaveInstance->_getNextOfCellSlaveInstanceSet();
|
||||
}
|
||||
|
||||
void Cell::SlaveInstanceSet::_SetNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const
|
||||
|
@ -538,22 +409,22 @@ Cell::NetMap::NetMap()
|
|||
{
|
||||
}
|
||||
|
||||
Name Cell::NetMap::_GetKey(Net* net) const
|
||||
Name Cell::NetMap::_getKey(Net* net) const
|
||||
// ***************************************
|
||||
{
|
||||
return net->GetName();
|
||||
return net->getName();
|
||||
}
|
||||
|
||||
unsigned Cell::NetMap::_GetHashValue(Name name) const
|
||||
unsigned Cell::NetMap::_getHashValue(Name name) const
|
||||
// **************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8;
|
||||
return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8;
|
||||
}
|
||||
|
||||
Net* Cell::NetMap::_GetNextElement(Net* net) const
|
||||
Net* Cell::NetMap::_getNextElement(Net* net) const
|
||||
// ***********************************************
|
||||
{
|
||||
return net->_GetNextOfCellNetMap();
|
||||
return net->_getNextOfCellNetMap();
|
||||
}
|
||||
|
||||
void Cell::NetMap::_SetNextElement(Net* net, Net* nextNet) const
|
||||
|
@ -573,22 +444,22 @@ Cell::PinMap::PinMap()
|
|||
{
|
||||
}
|
||||
|
||||
Name Cell::PinMap::_GetKey(Pin* pin) const
|
||||
Name Cell::PinMap::_getKey(Pin* pin) const
|
||||
// ***************************************
|
||||
{
|
||||
return pin->GetName();
|
||||
return pin->getName();
|
||||
}
|
||||
|
||||
unsigned Cell::PinMap::_GetHashValue(Name name) const
|
||||
unsigned Cell::PinMap::_getHashValue(Name name) const
|
||||
// **************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8;
|
||||
return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8;
|
||||
}
|
||||
|
||||
Pin* Cell::PinMap::_GetNextElement(Pin* pin) const
|
||||
Pin* Cell::PinMap::_getNextElement(Pin* pin) const
|
||||
// ***********************************************
|
||||
{
|
||||
return pin->_GetNextOfCellPinMap();
|
||||
return pin->_getNextOfCellPinMap();
|
||||
}
|
||||
|
||||
void Cell::PinMap::_SetNextElement(Pin* pin, Pin* nextPin) const
|
||||
|
@ -608,22 +479,22 @@ Cell::SliceMap::SliceMap()
|
|||
{
|
||||
}
|
||||
|
||||
const Layer* Cell::SliceMap::_GetKey(Slice* slice) const
|
||||
const Layer* Cell::SliceMap::_getKey(Slice* slice) const
|
||||
// *****************************************************
|
||||
{
|
||||
return slice->GetLayer();
|
||||
return slice->getLayer();
|
||||
}
|
||||
|
||||
unsigned Cell::SliceMap::_GetHashValue(const Layer* layer) const
|
||||
unsigned Cell::SliceMap::_getHashValue(const Layer* layer) const
|
||||
// *************************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)layer ) ) / 8;
|
||||
}
|
||||
|
||||
Slice* Cell::SliceMap::_GetNextElement(Slice* slice) const
|
||||
Slice* Cell::SliceMap::_getNextElement(Slice* slice) const
|
||||
// *******************************************************
|
||||
{
|
||||
return slice->_GetNextOfCellSliceMap();
|
||||
return slice->_getNextOfCellSliceMap();
|
||||
}
|
||||
|
||||
void Cell::SliceMap::_SetNextElement(Slice* slice, Slice* nextSlice) const
|
||||
|
@ -644,16 +515,16 @@ Cell::MarkerSet::MarkerSet()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned Cell::MarkerSet::_GetHashValue(Marker* marker) const
|
||||
unsigned Cell::MarkerSet::_getHashValue(Marker* marker) const
|
||||
// **********************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)marker ) ) / 8;
|
||||
}
|
||||
|
||||
Marker* Cell::MarkerSet::_GetNextElement(Marker* marker) const
|
||||
Marker* Cell::MarkerSet::_getNextElement(Marker* marker) const
|
||||
// ***********************************************************
|
||||
{
|
||||
return marker->_GetNextOfCellMarkerSet();
|
||||
return marker->_getNextOfCellMarkerSet();
|
||||
}
|
||||
|
||||
void Cell::MarkerSet::_SetNextElement(Marker* marker, Marker* nextMarker) const
|
||||
|
@ -662,38 +533,6 @@ void Cell::MarkerSet::_SetNextElement(Marker* marker, Marker* nextMarker) const
|
|||
marker->_SetNextOfCellMarkerSet(nextMarker);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//// ****************************************************************************************************
|
||||
//// Cell::ViewSet implementation
|
||||
//// ****************************************************************************************************
|
||||
//
|
||||
//Cell::ViewSet::ViewSet()
|
||||
//// *********************
|
||||
//: Inherit()
|
||||
//{
|
||||
//}
|
||||
//
|
||||
//unsigned Cell::ViewSet::_GetHashValue(View* view) const
|
||||
//// ****************************************************
|
||||
//{
|
||||
// return ( (unsigned int)( (unsigned long)view ) ) / 8;
|
||||
//}
|
||||
//
|
||||
//View* Cell::ViewSet::_GetNextElement(View* view) const
|
||||
//// ***************************************************
|
||||
//{
|
||||
// return view->_GetNextOfCellViewSet();
|
||||
//}
|
||||
//
|
||||
//void Cell::ViewSet::_SetNextElement(View* view, View* nextView) const
|
||||
//// ******************************************************************
|
||||
//{
|
||||
// view->_SetNextOfCellViewSet(nextView);
|
||||
//}
|
||||
//
|
||||
//
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -59,9 +59,9 @@ class Cell : public Entity {
|
|||
|
||||
public: InstanceMap();
|
||||
|
||||
public: virtual Name _GetKey(Instance* instance) const;
|
||||
public: virtual unsigned _GetHashValue(Name name) const;
|
||||
public: virtual Instance* _GetNextElement(Instance* instance) const;
|
||||
public: virtual Name _getKey(Instance* instance) const;
|
||||
public: virtual unsigned _getHashValue(Name name) const;
|
||||
public: virtual Instance* _getNextElement(Instance* instance) const;
|
||||
public: virtual void _SetNextElement(Instance* instance, Instance* nextInstance) const;
|
||||
|
||||
};
|
||||
|
@ -73,8 +73,8 @@ class Cell : public Entity {
|
|||
|
||||
public: SlaveInstanceSet();
|
||||
|
||||
public: virtual unsigned _GetHashValue(Instance* slaveInstance) const;
|
||||
public: virtual Instance* _GetNextElement(Instance* slaveInstance) const;
|
||||
public: virtual unsigned _getHashValue(Instance* slaveInstance) const;
|
||||
public: virtual Instance* _getNextElement(Instance* slaveInstance) const;
|
||||
public: virtual void _SetNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const;
|
||||
|
||||
};
|
||||
|
@ -86,9 +86,9 @@ class Cell : public Entity {
|
|||
|
||||
public: NetMap();
|
||||
|
||||
public: virtual Name _GetKey(Net* net) const;
|
||||
public: virtual unsigned _GetHashValue(Name name) const;
|
||||
public: virtual Net* _GetNextElement(Net* net) const;
|
||||
public: virtual Name _getKey(Net* net) const;
|
||||
public: virtual unsigned _getHashValue(Name name) const;
|
||||
public: virtual Net* _getNextElement(Net* net) const;
|
||||
public: virtual void _SetNextElement(Net* net, Net* nextNet) const;
|
||||
|
||||
};
|
||||
|
@ -100,9 +100,9 @@ class Cell : public Entity {
|
|||
|
||||
public: PinMap();
|
||||
|
||||
public: virtual Name _GetKey(Pin* pin) const;
|
||||
public: virtual unsigned _GetHashValue(Name name) const;
|
||||
public: virtual Pin* _GetNextElement(Pin* pin) const;
|
||||
public: virtual Name _getKey(Pin* pin) const;
|
||||
public: virtual unsigned _getHashValue(Name name) const;
|
||||
public: virtual Pin* _getNextElement(Pin* pin) const;
|
||||
public: virtual void _SetNextElement(Pin* pin, Pin* nextPin) const;
|
||||
|
||||
};
|
||||
|
@ -114,9 +114,9 @@ class Cell : public Entity {
|
|||
|
||||
public: SliceMap();
|
||||
|
||||
public: virtual const Layer* _GetKey(Slice* slice) const;
|
||||
public: virtual unsigned _GetHashValue(const Layer* layer) const;
|
||||
public: virtual Slice* _GetNextElement(Slice* slice) const;
|
||||
public: virtual const Layer* _getKey(Slice* slice) const;
|
||||
public: virtual unsigned _getHashValue(const Layer* layer) const;
|
||||
public: virtual Slice* _getNextElement(Slice* slice) const;
|
||||
public: virtual void _SetNextElement(Slice* slice, Slice* nextSlice) const;
|
||||
|
||||
};
|
||||
|
@ -128,25 +128,12 @@ class Cell : public Entity {
|
|||
|
||||
public: MarkerSet();
|
||||
|
||||
public: virtual unsigned _GetHashValue(Marker* marker) const;
|
||||
public: virtual Marker* _GetNextElement(Marker* marker) const;
|
||||
public: virtual unsigned _getHashValue(Marker* marker) const;
|
||||
public: virtual Marker* _getNextElement(Marker* marker) const;
|
||||
public: virtual void _SetNextElement(Marker* marker, Marker* nextMarker) const;
|
||||
|
||||
};
|
||||
|
||||
//public: class ViewSet : public IntrusiveSet<View> {
|
||||
//// **********************************************
|
||||
|
||||
// public: typedef IntrusiveSet<View> Inherit;
|
||||
//
|
||||
// public: ViewSet();
|
||||
|
||||
// public: virtual unsigned _GetHashValue(View* view) const;
|
||||
// public: virtual View* _GetNextElement(View* view) const;
|
||||
// public: virtual void _SetNextElement(View* view, View* nextView) const;
|
||||
|
||||
//};
|
||||
|
||||
// Attributes
|
||||
// **********
|
||||
|
||||
|
@ -159,7 +146,6 @@ class Cell : public Entity {
|
|||
private: PinMap _pinMap;
|
||||
private: SliceMap _sliceMap;
|
||||
private: MarkerSet _markerSet;
|
||||
//private: ViewSet _viewSet;
|
||||
private: Box _abutmentBox;
|
||||
private: Box _boundingBox;
|
||||
private: bool _isTerminal;
|
||||
|
@ -177,24 +163,24 @@ class Cell : public Entity {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Cell");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Cell");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: InstanceMap& _GetInstanceMap() {return _instanceMap;};
|
||||
public: QuadTree* _GetQuadTree() {return &_quadTree;};
|
||||
public: SlaveInstanceSet& _GetSlaveInstanceSet() {return _slaveInstanceSet;};
|
||||
public: NetMap& _GetNetMap() {return _netMap;};
|
||||
public: PinMap& _GetPinMap() {return _pinMap;};
|
||||
public: SliceMap& _GetSliceMap() {return _sliceMap;};
|
||||
public: MarkerSet& _GetMarkerSet() {return _markerSet;};
|
||||
//public: ViewSet& _GetViewSet() {return _viewSet;};
|
||||
public: Cell* _GetNextOfLibraryCellMap() const {return _nextOfLibraryCellMap;};
|
||||
public: Cell* _GetNextOfSymbolCellSet() const {return _nextOfSymbolCellSet;};
|
||||
public: InstanceMap& _getInstanceMap() {return _instanceMap;};
|
||||
public: QuadTree* _getQuadTree() {return &_quadTree;};
|
||||
public: SlaveInstanceSet& _getSlaveInstanceSet() {return _slaveInstanceSet;};
|
||||
public: NetMap& _getNetMap() {return _netMap;};
|
||||
public: PinMap& _getPinMap() {return _pinMap;};
|
||||
public: SliceMap& _getSliceMap() {return _sliceMap;};
|
||||
public: MarkerSet& _getMarkerSet() {return _markerSet;};
|
||||
//public: ViewSet& _getViewSet() {return _viewSet;};
|
||||
public: Cell* _getNextOfLibraryCellMap() const {return _nextOfLibraryCellMap;};
|
||||
public: Cell* _getNextOfSymbolCellSet() const {return _nextOfSymbolCellSet;};
|
||||
|
||||
public: void _SetNextOfLibraryCellMap(Cell* cell) {_nextOfLibraryCellMap = cell;};
|
||||
public: void _SetNextOfSymbolCellSet(Cell* cell) {_nextOfSymbolCellSet = cell;};
|
||||
|
@ -204,8 +190,8 @@ class Cell : public Entity {
|
|||
|
||||
public: void _AddSlaveEntity(Entity* entity, Entity* slaveEntity);
|
||||
public: void _RemoveSlaveEntity(Entity* entity, Entity* slaveEntity);
|
||||
public: void _GetSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
|
||||
public: void _GetSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
|
||||
public: void _getSlaveEntities(SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
|
||||
public: void _getSlaveEntities(Entity* entity, SlaveEntityMap::iterator& begin, SlaveEntityMap::iterator& end);
|
||||
|
||||
//public: bool _IsDrawable(View* view) const;
|
||||
//public: bool _ContentIsDrawable(View* view) const;
|
||||
|
@ -226,65 +212,65 @@ class Cell : public Entity {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const {return (Cell*)this;};
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: Library* GetLibrary() const {return _library;};
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: Instance* GetInstance(const Name& name) const {return _instanceMap.GetElement(name);};
|
||||
public: Instances GetInstances() const {return _instanceMap.GetElements();};
|
||||
public: Instances GetPlacedInstances() const;
|
||||
public: Instances GetFixedInstances() const;
|
||||
public: Instances GetUnplacedInstances() const;
|
||||
public: Instances GetNotUnplacedInstances() const;
|
||||
public: Instances GetInstancesUnder(const Box& area) const;
|
||||
public: Instances GetPlacedInstancesUnder(const Box& area) const;
|
||||
public: Instances GetFixedInstancesUnder(const Box& area) const;
|
||||
public: Instances GetUnplacedInstancesUnder(const Box& area) const;
|
||||
public: Instances GetNotUnplacedInstancesUnder(const Box& area) const;
|
||||
public: Instances GetSlaveInstances() const; // {return _slaveInstanceSet.GetElements();}; NOON!!
|
||||
public: Instances GetTerminalInstances() const;
|
||||
public: Instances GetTerminalInstancesUnder(const Box& area) const;
|
||||
public: Instances GetNonTerminalInstances() const;
|
||||
public: Instances GetNonTerminalInstancesUnder(const Box& area) const;
|
||||
public: Instances GetLeafInstances() const;
|
||||
public: Instances GetLeafInstancesUnder(const Box& area) const;
|
||||
public: Instances GetNonLeafInstances() const;
|
||||
public: Instances GetNonLeafInstancesUnder(const Box& area) const;
|
||||
public: Net* GetNet(const Name& name) const {return _netMap.GetElement(name);};
|
||||
public: Nets GetNets() const {return _netMap.GetElements();};
|
||||
public: Nets GetGlobalNets() const;
|
||||
public: Nets GetExternalNets() const;
|
||||
public: Nets GetInternalNets() const;
|
||||
public: Nets GetClockNets() const;
|
||||
public: Nets GetSupplyNets() const;
|
||||
public: Nets GetPowerNets() const;
|
||||
public: Nets GetGroundNets() const;
|
||||
public: Pin* GetPin(const Name& name) const {return _pinMap.GetElement(name);};
|
||||
public: Pins GetPins() const {return _pinMap.GetElements();};
|
||||
public: Slice* GetSlice(const Layer* layer) const {return _sliceMap.GetElement(layer);};
|
||||
public: Slices GetSlices(const Layer::Mask& mask = ~0) const;
|
||||
// public: Views GetViews() const {return _viewSet.GetElements();};
|
||||
// public: MainViews GetMainViews() const;
|
||||
// public: MainViews GetImpactedMainViews() const;
|
||||
public: Rubbers GetRubbers() const;
|
||||
public: Rubbers GetRubbersUnder(const Box& area) const;
|
||||
public: Markers GetMarkers() const {return _markerSet.GetElements();};
|
||||
public: Markers GetMarkersUnder(const Box& area) const;
|
||||
public: References GetReferences() const;
|
||||
public: Components GetComponents(const Layer::Mask& mask = ~0) const;
|
||||
public: Components GetComponentsUnder(const Box& area, const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences GetOccurrences(unsigned searchDepth = (unsigned)-1) const;
|
||||
public: Occurrences GetOccurrencesUnder(const Box& area, unsigned searchDepth = (unsigned)-1) const;
|
||||
public: Occurrences GetTerminalInstanceOccurrences() const;
|
||||
public: Occurrences GetTerminalInstanceOccurrencesUnder(const Box& area) const;
|
||||
public: Occurrences GetLeafInstanceOccurrences() const;
|
||||
public: Occurrences GetLeafInstanceOccurrencesUnder(const Box& area) const;
|
||||
public: Occurrences GetComponentOccurrences(const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences GetComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences GetHyperNetRootNetOccurrences() const;
|
||||
public: Cells GetSubCells() const;
|
||||
public: Pathes GetRecursiveSlavePathes() const;
|
||||
public: const Box& GetAbutmentBox() const {return _abutmentBox;};
|
||||
public: virtual Cell* getCell() const {return (Cell*)this;};
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: Library* getLibrary() const {return _library;};
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: Instance* getInstance(const Name& name) const {return _instanceMap.getElement(name);};
|
||||
public: Instances getInstances() const {return _instanceMap.getElements();};
|
||||
public: Instances getPlacedInstances() const;
|
||||
public: Instances getFixedInstances() const;
|
||||
public: Instances getUnplacedInstances() const;
|
||||
public: Instances getNotUnplacedInstances() const;
|
||||
public: Instances getInstancesUnder(const Box& area) const;
|
||||
public: Instances getPlacedInstancesUnder(const Box& area) const;
|
||||
public: Instances getFixedInstancesUnder(const Box& area) const;
|
||||
public: Instances getUnplacedInstancesUnder(const Box& area) const;
|
||||
public: Instances getNotUnplacedInstancesUnder(const Box& area) const;
|
||||
public: Instances getSlaveInstances() const; // {return _slaveInstanceSet.getElements();}; NOON!!
|
||||
public: Instances getTerminalInstances() const;
|
||||
public: Instances getTerminalInstancesUnder(const Box& area) const;
|
||||
public: Instances getNonTerminalInstances() const;
|
||||
public: Instances getNonTerminalInstancesUnder(const Box& area) const;
|
||||
public: Instances getLeafInstances() const;
|
||||
public: Instances getLeafInstancesUnder(const Box& area) const;
|
||||
public: Instances getNonLeafInstances() const;
|
||||
public: Instances getNonLeafInstancesUnder(const Box& area) const;
|
||||
public: Net* getNet(const Name& name) const {return _netMap.getElement(name);};
|
||||
public: Nets getNets() const {return _netMap.getElements();};
|
||||
public: Nets getGlobalNets() const;
|
||||
public: Nets getExternalNets() const;
|
||||
public: Nets getInternalNets() const;
|
||||
public: Nets getClockNets() const;
|
||||
public: Nets getSupplyNets() const;
|
||||
public: Nets getPowerNets() const;
|
||||
public: Nets getGroundNets() const;
|
||||
public: Pin* getPin(const Name& name) const {return _pinMap.getElement(name);};
|
||||
public: Pins getPins() const {return _pinMap.getElements();};
|
||||
public: Slice* getSlice(const Layer* layer) const {return _sliceMap.getElement(layer);};
|
||||
public: Slices getSlices(const Layer::Mask& mask = ~0) const;
|
||||
// public: Views getViews() const {return _viewSet.getElements();};
|
||||
// public: MainViews getMainViews() const;
|
||||
// public: MainViews getImpactedMainViews() const;
|
||||
public: Rubbers getRubbers() const;
|
||||
public: Rubbers getRubbersUnder(const Box& area) const;
|
||||
public: Markers getMarkers() const {return _markerSet.getElements();};
|
||||
public: Markers getMarkersUnder(const Box& area) const;
|
||||
public: References getReferences() const;
|
||||
public: Components getComponents(const Layer::Mask& mask = ~0) const;
|
||||
public: Components getComponentsUnder(const Box& area, const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences getOccurrences(unsigned searchDepth = (unsigned)-1) const;
|
||||
public: Occurrences getOccurrencesUnder(const Box& area, unsigned searchDepth = (unsigned)-1) const;
|
||||
public: Occurrences getTerminalInstanceOccurrences() const;
|
||||
public: Occurrences getTerminalInstanceOccurrencesUnder(const Box& area) const;
|
||||
public: Occurrences getLeafInstanceOccurrences() const;
|
||||
public: Occurrences getLeafInstanceOccurrencesUnder(const Box& area) const;
|
||||
public: Occurrences getComponentOccurrences(const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences getComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask = ~0) const;
|
||||
public: Occurrences getHyperNetRootNetOccurrences() const;
|
||||
public: Cells getSubCells() const;
|
||||
public: Pathes getRecursiveSlavePathes() const;
|
||||
public: const Box& getAbutmentBox() const {return _abutmentBox;};
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,9 +46,9 @@ typedef GenericFilter<Cell*> CellFilter;
|
|||
#define for_each_cell(cell, cells)\
|
||||
/*********************************/\
|
||||
{\
|
||||
CellLocator _locator = cells.GetLocator();\
|
||||
CellLocator _locator = cells.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Cell* cell = _locator.GetElement();\
|
||||
Cell* cell = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -58,16 +58,16 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Type>* GetClone() const = 0;
|
||||
public: virtual Collection<Type>* getClone() const = 0;
|
||||
|
||||
public: virtual Locator<Type>* GetLocator() const = 0;
|
||||
public: virtual Locator<Type>* getLocator() const = 0;
|
||||
|
||||
public: virtual unsigned GetSize() const
|
||||
public: virtual unsigned getSize() const
|
||||
// *************************************
|
||||
{
|
||||
unsigned size = 0;
|
||||
// we use a GenericLocator to delete the locator allocated by GetLocator()
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
// we use a GenericLocator to delete the locator allocated by getLocator()
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
size++;
|
||||
locator.Progress();
|
||||
|
@ -75,30 +75,30 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
return size;
|
||||
}
|
||||
|
||||
public: Type GetFirst() const
|
||||
public: Type getFirst() const
|
||||
// **************************
|
||||
{
|
||||
// we use a GenericLocator to delete the locator allocated by GetLocator()
|
||||
return GenericLocator<Type>(GetLocator()).GetElement();
|
||||
// we use a GenericLocator to delete the locator allocated by getLocator()
|
||||
return GenericLocator<Type>(getLocator()).getElement();
|
||||
}
|
||||
|
||||
public: GenericCollection<Type> GetSubSet(const Filter<Type>& filter) const
|
||||
public: GenericCollection<Type> getSubSet(const Filter<Type>& filter) const
|
||||
// ************************************************************************
|
||||
{
|
||||
return SubSetCollection<Type>(*this, filter);
|
||||
}
|
||||
|
||||
public: template<class SubType> GenericCollection<SubType> GetSubSet() const
|
||||
public: template<class SubType> GenericCollection<SubType> getSubSet() const
|
||||
// *************************************************************************
|
||||
{
|
||||
return SubTypeCollection<Type, SubType>(this);
|
||||
}
|
||||
|
||||
public: template<class SubType>
|
||||
GenericCollection<SubType> GetSubSet(const Filter<SubType>& filter) const
|
||||
GenericCollection<SubType> getSubSet(const Filter<SubType>& filter) const
|
||||
// ******************************************************************************
|
||||
{
|
||||
return GetSubSet<SubType>().GetSubSet(filter);
|
||||
return getSubSet<SubType>().getSubSet(filter);
|
||||
}
|
||||
|
||||
// Predicates
|
||||
|
@ -107,8 +107,8 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
public: bool IsEmpty() const
|
||||
// *************************
|
||||
{
|
||||
// we use a GenericLocator to delete the locator allocated by GetLocator()
|
||||
return !GenericLocator<Type>(GetLocator()).IsValid();
|
||||
// we use a GenericLocator to delete the locator allocated by getLocator()
|
||||
return !GenericLocator<Type>(getLocator()).IsValid();
|
||||
}
|
||||
|
||||
// Utilitarians
|
||||
|
@ -117,9 +117,9 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
public: void Fill(list<Type>& list) const
|
||||
// **************************************
|
||||
{
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
list.push_back(locator.GetElement());
|
||||
list.push_back(locator.getElement());
|
||||
locator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
public: void Fill(set<Type>& set) const
|
||||
// ************************************
|
||||
{
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
set.insert(locator.GetElement());
|
||||
set.insert(locator.getElement());
|
||||
locator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
public: template<class Compare> void Fill(set<Type, Compare>& set) const
|
||||
// *********************************************************************
|
||||
{
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
set.insert(locator.GetElement());
|
||||
set.insert(locator.getElement());
|
||||
locator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -147,9 +147,9 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
public: void Fill(vector<Type>& vector) const
|
||||
// ******************************************
|
||||
{
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
vector.push_back(locator.GetElement());
|
||||
vector.push_back(locator.getElement());
|
||||
locator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -157,26 +157,26 @@ template<class Type> class Collection : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("Collection<Type>");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const = 0;
|
||||
public: virtual string _getString() const = 0;
|
||||
|
||||
public: Record* _GetRecord() const
|
||||
public: Record* _getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (!IsEmpty()) {
|
||||
record = new Record(GetString(this));
|
||||
record = new Record(getString(this));
|
||||
unsigned n = 1;
|
||||
GenericLocator<Type> locator = GetLocator();
|
||||
GenericLocator<Type> locator = getLocator();
|
||||
while (locator.IsValid()) {
|
||||
string slotName = GetString(n++);
|
||||
Type slotRecord = locator.GetElement();
|
||||
record->Add(GetSlot(slotName, slotRecord));
|
||||
string slotName = getString(n++);
|
||||
Type slotRecord = locator.getElement();
|
||||
record->Add(getSlot(slotName, slotRecord));
|
||||
locator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -217,14 +217,14 @@ template<class Type> class GenericCollection : public Collection<Type> {
|
|||
public: GenericCollection(const Collection<Type>& collection)
|
||||
// **********************************************************
|
||||
: Inherit(),
|
||||
_collection(collection.GetClone())
|
||||
_collection(collection.getClone())
|
||||
{
|
||||
}
|
||||
|
||||
public: GenericCollection(const GenericCollection<Type>& genericCollection)
|
||||
// ************************************************************************
|
||||
: Inherit(),
|
||||
_collection(genericCollection.GetClone())
|
||||
_collection(genericCollection.getClone())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ template<class Type> class GenericCollection : public Collection<Type> {
|
|||
// *********************************************************************
|
||||
{
|
||||
if (_collection) delete _collection;
|
||||
_collection = collection.GetClone();
|
||||
_collection = collection.getClone();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ template<class Type> class GenericCollection : public Collection<Type> {
|
|||
// *****************************************************************************
|
||||
{
|
||||
if (_collection) delete _collection;
|
||||
_collection = genericCollection.GetClone();
|
||||
_collection = genericCollection.getClone();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -278,40 +278,40 @@ template<class Type> class GenericCollection : public Collection<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Type>* GetClone() const
|
||||
public: virtual Collection<Type>* getClone() const
|
||||
// ***********************************************
|
||||
{
|
||||
return (_collection) ? _collection->GetClone() : NULL;
|
||||
return (_collection) ? _collection->getClone() : NULL;
|
||||
}
|
||||
|
||||
public: virtual Locator<Type>* GetLocator() const
|
||||
public: virtual Locator<Type>* getLocator() const
|
||||
// **********************************************
|
||||
{
|
||||
return (_collection) ? _collection->GetLocator() : NULL;
|
||||
return (_collection) ? _collection->getLocator() : NULL;
|
||||
}
|
||||
|
||||
public: virtual unsigned GetSize() const
|
||||
public: virtual unsigned getSize() const
|
||||
// *************************************
|
||||
{
|
||||
return (_collection) ? _collection->GetSize() : 0;
|
||||
return (_collection) ? _collection->getSize() : 0;
|
||||
}
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("GenericCollection");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_collection)
|
||||
return "<" + _GetTypeName() + " unbound>";
|
||||
return "<" + _getTypeName() + " unbound>";
|
||||
else
|
||||
return "<" + _GetTypeName()+ " " + GetString(_collection) + ">";
|
||||
return "<" + _getTypeName()+ " " + getString(_collection) + ">";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -341,18 +341,18 @@ template<class Type> class ElementCollection : public Collection<Type> {
|
|||
|
||||
// Accessors
|
||||
// *********
|
||||
public: virtual ElType GetElement () const { return const_cast<ElType>(_element); };
|
||||
public: virtual Locator<ElType>* GetClone () const { return new Locator(*this); };
|
||||
public: virtual ElType getElement () const { return const_cast<ElType>(_element); };
|
||||
public: virtual Locator<ElType>* getClone () const { return new Locator(*this); };
|
||||
public: virtual bool IsValid () const { return !_done; };
|
||||
public: virtual void Progress () { _done = true; };
|
||||
|
||||
// Hurricane Management
|
||||
// ********************
|
||||
public: virtual string _GetString () const {
|
||||
public: virtual string _getString () const {
|
||||
if (!_element)
|
||||
return "<" + _TName("ElementCollection::Locator") + " unbound>";
|
||||
else
|
||||
return "<" + _TName("ElementCollection::Locator") + " " + GetString(_element) + ">";
|
||||
return "<" + _TName("ElementCollection::Locator") + " " + getString(_element) + ">";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -394,19 +394,19 @@ template<class Type> class ElementCollection : public Collection<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Type>* GetClone() const
|
||||
public: virtual Collection<Type>* getClone() const
|
||||
// ***********************************************
|
||||
{
|
||||
return ( new ElementCollection (*this) );
|
||||
}
|
||||
|
||||
public: virtual Locator<Type>* GetLocator() const
|
||||
public: virtual Locator<Type>* getLocator() const
|
||||
// **********************************************
|
||||
{
|
||||
return ( new Locator<Type> (_element) );
|
||||
}
|
||||
|
||||
public: virtual unsigned GetSize() const
|
||||
public: virtual unsigned getSize() const
|
||||
// *************************************
|
||||
{
|
||||
return (_element) ? 1 : 0;
|
||||
|
@ -415,13 +415,13 @@ template<class Type> class ElementCollection : public Collection<Type> {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_element)
|
||||
return "<" + _TName("ElementCollection") + " unbound>";
|
||||
else
|
||||
return "<" + _TName("ElementCollection") + " " + GetString(_element) + ">";
|
||||
return "<" + _TName("ElementCollection") + " " + getString(_element) + ">";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -459,41 +459,41 @@ template<class Type, class SubType> class SubTypeCollection : public Collection<
|
|||
public: Locator(const GenericCollection<Type>& collection)
|
||||
// ********************************************************
|
||||
: Inherit(),
|
||||
_locator(collection.GetLocator())
|
||||
_locator(collection.getLocator())
|
||||
{
|
||||
while (_locator.IsValid() && !is_a<SubType>(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !is_a<SubType>(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
public: Locator(const GenericLocator<Type>& genericLocator)
|
||||
// ********************************************************
|
||||
: Inherit(),
|
||||
_locator(genericLocator.GetClone())
|
||||
_locator(genericLocator.getClone())
|
||||
{
|
||||
while (_locator.IsValid() && !is_a<SubType>(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !is_a<SubType>(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual SubType GetElement() const
|
||||
public: virtual SubType getElement() const
|
||||
// ***************************************
|
||||
{
|
||||
return (_locator.IsValid()) ? (SubType)_locator.GetElement() : SubType();
|
||||
return (_locator.IsValid()) ? (SubType)_locator.getElement() : SubType();
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<SubType>* GetClone() const
|
||||
public: virtual Hurricane::Locator<SubType>* getClone() const
|
||||
// **********************************************************
|
||||
{
|
||||
return new Locator(_locator);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<SubType>* GetLocator() // 21-10-03
|
||||
public: virtual Hurricane::Locator<SubType>* getLocator() // 21-10-03
|
||||
// *************************************************
|
||||
{
|
||||
return dynamic_cast<Hurricane::Locator<SubType>*> (
|
||||
_locator.GetLocator()->GetLocator() );
|
||||
_locator.getLocator()->getLocator() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -515,7 +515,7 @@ template<class Type, class SubType> class SubTypeCollection : public Collection<
|
|||
if (_locator.IsValid()) {
|
||||
do {
|
||||
_locator.Progress();
|
||||
} while (_locator.IsValid() && !is_a<SubType>(_locator.GetElement()));
|
||||
} while (_locator.IsValid() && !is_a<SubType>(_locator.getElement()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ template<class Type, class SubType> class SubTypeCollection : public Collection<
|
|||
public: SubTypeCollection(const Collection<Type>* collection)
|
||||
// **********************************************************
|
||||
: Inherit(),
|
||||
_collection(collection->GetClone())
|
||||
_collection(collection->getClone())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -570,13 +570,13 @@ template<class Type, class SubType> class SubTypeCollection : public Collection<
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<SubType>* GetClone() const
|
||||
public: virtual Collection<SubType>* getClone() const
|
||||
// **************************************************
|
||||
{
|
||||
return new SubTypeCollection(_collection);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<SubType>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<SubType>* getLocator() const
|
||||
// ************************************************************
|
||||
{
|
||||
return new Locator(_collection);
|
||||
|
@ -585,10 +585,10 @@ template<class Type, class SubType> class SubTypeCollection : public Collection<
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
return "<" + _TName("SubTypeCollection") + " " + GetString(_collection) + ">";
|
||||
return "<" + _TName("SubTypeCollection") + " " + getString(_collection) + ">";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -627,30 +627,30 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
public: Locator(const SubSetCollection<Type>& collection, const Filter<Type>& filter)
|
||||
// **********************************************************************************
|
||||
: Inherit(),
|
||||
_locator(collection.GetLocator()),
|
||||
_locator(collection.getLocator()),
|
||||
_filter(filter)
|
||||
{
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
public: Locator(const Collection<Type>& collection, const Filter<Type>& filter)
|
||||
// ****************************************************************************
|
||||
: Inherit(),
|
||||
_locator(collection.GetLocator()),
|
||||
_locator(collection.getLocator()),
|
||||
_filter(filter)
|
||||
{
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
public: Locator(const GenericCollection<Type>& genericCollection, const Filter<Type>& filter)
|
||||
// ******************************************************************************************
|
||||
: Inherit(),
|
||||
_locator(genericCollection.GetLocator()),
|
||||
_locator(genericCollection.getLocator()),
|
||||
_filter(filter)
|
||||
{
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
|
@ -660,29 +660,29 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
_locator(genericLocator),
|
||||
_filter(filter)
|
||||
{
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.GetElement()))
|
||||
while (_locator.IsValid() && !_filter.Accept(_locator.getElement()))
|
||||
_locator.Progress();
|
||||
}
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Type GetElement() const
|
||||
public: virtual Type getElement() const
|
||||
// ************************************
|
||||
{
|
||||
return (_locator.IsValid()) ? _locator.GetElement() : Type();
|
||||
return (_locator.IsValid()) ? _locator.getElement() : Type();
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<Type>* GetClone() const
|
||||
public: virtual Hurricane::Locator<Type>* getClone() const
|
||||
// *******************************************************
|
||||
{
|
||||
return new Locator(_locator, _filter);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<Type>* GetLocator() // 21-10-03
|
||||
public: virtual Hurricane::Locator<Type>* getLocator() // 21-10-03
|
||||
// ***************************************************
|
||||
{
|
||||
return ( _locator.GetLocator()->GetLocator() );
|
||||
return ( _locator.getLocator()->getLocator() );
|
||||
}
|
||||
|
||||
// Predicates
|
||||
|
@ -703,7 +703,7 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
if (_locator.IsValid()) {
|
||||
do {
|
||||
_locator.Progress();
|
||||
} while (_locator.IsValid() && !_filter.Accept(_locator.GetElement()));
|
||||
} while (_locator.IsValid() && !_filter.Accept(_locator.getElement()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -756,13 +756,13 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Type>* GetClone() const
|
||||
public: virtual Collection<Type>* getClone() const
|
||||
// ***********************************************
|
||||
{
|
||||
return new SubSetCollection(_collection, _filter);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<Type>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<Type>* getLocator() const
|
||||
// *********************************************************
|
||||
{
|
||||
return new Locator(_collection, _filter);
|
||||
|
@ -771,10 +771,10 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
return "<" + _TName("SubSetCollection") + " " + GetString(_collection) + ">";
|
||||
return "<" + _TName("SubSetCollection") + " " + getString(_collection) + ">";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -799,17 +799,17 @@ template<class Type> class SubSetCollection : public Collection<Type> {
|
|||
#define for_each_object(Type, element, collection)\
|
||||
/*************************************************/\
|
||||
{\
|
||||
GenericLocator<Type> _locator = collection.GetLocator();\
|
||||
GenericLocator<Type> _locator = collection.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Type element = _locator.GetElement();\
|
||||
Type element = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
#define for_each_element(Type, element, collection)\
|
||||
/*************************************************/\
|
||||
{\
|
||||
ElementCollection<Type>::Locator<Type>* _locator = collection.GetLocator();\
|
||||
ElementCollection<Type>::Locator<Type>* _locator = collection.getLocator();\
|
||||
while (_locator->IsValid()) {\
|
||||
Type element = _locator->GetElement();\
|
||||
Type element = _locator->getElement();\
|
||||
_locator->Progress();
|
||||
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ using namespace std;
|
|||
|
||||
|
||||
// x-----------------------------------------------------------------x
|
||||
// | GetString() Overloads for POD/STL types |
|
||||
// | getString() Overloads for POD/STL types |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
// Note: we are outside the Hurricane namespace.
|
||||
|
|
|
@ -44,7 +44,7 @@ class Component_IsUnderFilter : public Filter<Component*> {
|
|||
return *this;
|
||||
};
|
||||
|
||||
public: virtual Filter<Component*>* GetClone() const
|
||||
public: virtual Filter<Component*>* getClone() const
|
||||
// *************************************************
|
||||
{
|
||||
return new Component_IsUnderFilter(*this);
|
||||
|
@ -53,13 +53,13 @@ class Component_IsUnderFilter : public Filter<Component*> {
|
|||
public: virtual bool Accept(Component* component) const
|
||||
// ****************************************************
|
||||
{
|
||||
return _area.intersect(component->GetBoundingBox());
|
||||
return _area.intersect(component->getBoundingBox());
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
return "<" + _TName("Component::IsUnderFilter") + " " + GetString(_area) + ">";
|
||||
return "<" + _TName("Component::IsUnderFilter") + " " + getString(_area) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -91,14 +91,14 @@ class Component_Hooks : public Collection<Hook*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Hook* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetClone() const;
|
||||
public: virtual Hook* getElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -121,13 +121,13 @@ class Component_Hooks : public Collection<Hook*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Hook*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetLocator() const;
|
||||
public: virtual Collection<Hook*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -159,14 +159,14 @@ class Component_ConnexComponents : public Collection<Component*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Component* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Component*>* GetClone() const;
|
||||
public: virtual Component* getElement() const;
|
||||
public: virtual Hurricane::Locator<Component*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -189,13 +189,13 @@ class Component_ConnexComponents : public Collection<Component*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Component*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Component*>* GetLocator() const;
|
||||
public: virtual Collection<Component*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Component*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -227,14 +227,14 @@ class Component_SlaveComponents : public Collection<Component*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Component* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Component*>* GetClone() const;
|
||||
public: virtual Component* getElement() const;
|
||||
public: virtual Hurricane::Locator<Component*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -257,13 +257,13 @@ class Component_SlaveComponents : public Collection<Component*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Component*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Component*>* GetLocator() const;
|
||||
public: virtual Collection<Component*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Component*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -284,31 +284,31 @@ Component::Component(Net* net, bool inPlugCreate)
|
|||
throw Error("Can't create " + _TName("Component") + " : null net");
|
||||
}
|
||||
|
||||
Cell* Component::GetCell() const
|
||||
Cell* Component::getCell() const
|
||||
// *****************************
|
||||
{
|
||||
return _net->GetCell();
|
||||
return _net->getCell();
|
||||
}
|
||||
|
||||
Hooks Component::GetHooks() const
|
||||
Hooks Component::getHooks() const
|
||||
// ******************************
|
||||
{
|
||||
return Component_Hooks(this);
|
||||
}
|
||||
|
||||
Components Component::GetConnexComponents() const
|
||||
Components Component::getConnexComponents() const
|
||||
// **********************************************
|
||||
{
|
||||
return Component_ConnexComponents(this);
|
||||
}
|
||||
|
||||
Components Component::GetSlaveComponents() const
|
||||
Components Component::getSlaveComponents() const
|
||||
// *********************************************
|
||||
{
|
||||
return Component_SlaveComponents(this);
|
||||
}
|
||||
|
||||
ComponentFilter Component::GetIsUnderFilter(const Box& area)
|
||||
ComponentFilter Component::getIsUnderFilter(const Box& area)
|
||||
// *********************************************************
|
||||
{
|
||||
return Component_IsUnderFilter(area);
|
||||
|
@ -320,14 +320,14 @@ void Component::Materialize()
|
|||
// trace << "Materialize() - " << this << endl;
|
||||
|
||||
if (!IsMaterialized()) {
|
||||
Cell* cell = GetCell();
|
||||
Layer* layer = GetLayer();
|
||||
Cell* cell = getCell();
|
||||
Layer* layer = getLayer();
|
||||
if (cell && layer) {
|
||||
Slice* slice = cell->GetSlice(layer);
|
||||
if (!slice) slice = Slice::_Create(cell, layer);
|
||||
QuadTree* quadTree = slice->_GetQuadTree();
|
||||
Slice* slice = cell->getSlice(layer);
|
||||
if (!slice) slice = Slice::_create(cell, layer);
|
||||
QuadTree* quadTree = slice->_getQuadTree();
|
||||
quadTree->Insert(this);
|
||||
cell->_Fit(quadTree->GetBoundingBox());
|
||||
cell->_Fit(quadTree->getBoundingBox());
|
||||
} else {
|
||||
//cerr << "[WARNING] " << this << " not inserted into QuadTree." << endl;
|
||||
}
|
||||
|
@ -340,12 +340,12 @@ void Component::Unmaterialize()
|
|||
// trace << "Unmaterializing " << this << endl;
|
||||
|
||||
if (IsMaterialized()) {
|
||||
Cell* cell = GetCell();
|
||||
Slice* slice = cell->GetSlice(GetLayer());
|
||||
Cell* cell = getCell();
|
||||
Slice* slice = cell->getSlice(getLayer());
|
||||
if (slice) {
|
||||
cell->_Unfit(GetBoundingBox());
|
||||
slice->_GetQuadTree()->Remove(this);
|
||||
if (slice->IsEmpty()) slice->_Delete();
|
||||
cell->_Unfit(getBoundingBox());
|
||||
slice->_getQuadTree()->Remove(this);
|
||||
if (slice->IsEmpty()) slice->_destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -356,41 +356,41 @@ void Component::Invalidate(bool propagateFlag)
|
|||
Inherit::Invalidate(false);
|
||||
|
||||
if (propagateFlag) {
|
||||
Rubber* rubber = GetRubber();
|
||||
Rubber* rubber = getRubber();
|
||||
if (rubber) rubber->Invalidate();
|
||||
for_each_component(component, GetSlaveComponents()) {
|
||||
for_each_component(component, getSlaveComponents()) {
|
||||
component->Invalidate(false);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Component::_PostCreate()
|
||||
void Component::_postCreate()
|
||||
// **************************
|
||||
{
|
||||
if (_net) _net->_GetComponentSet()._Insert(this);
|
||||
if (_net) _net->_getComponentSet()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Component::_PreDelete()
|
||||
void Component::_preDestroy()
|
||||
// *************************
|
||||
{
|
||||
// trace << "entering Component::_PreDelete: " << this << endl;
|
||||
// trace << "entering Component::_Predestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
ClearProperties();
|
||||
clearProperties();
|
||||
|
||||
set<Component*> componentSet;
|
||||
GetSlaveComponents().Fill(componentSet);
|
||||
getSlaveComponents().Fill(componentSet);
|
||||
|
||||
set<Hook*> masterHookSet;
|
||||
componentSet.insert(this);
|
||||
for_each_component(component, GetCollection(componentSet)) {
|
||||
for_each_component(component, getCollection(componentSet)) {
|
||||
component->Unmaterialize();
|
||||
for_each_hook(hook, component->GetHooks()) {
|
||||
for_each_hook(hook, hook->GetHooks()) {
|
||||
if (hook->IsMaster() && (componentSet.find(hook->GetComponent()) == componentSet.end()))
|
||||
for_each_hook(hook, component->getHooks()) {
|
||||
for_each_hook(hook, hook->getHooks()) {
|
||||
if (hook->IsMaster() && (componentSet.find(hook->getComponent()) == componentSet.end()))
|
||||
masterHookSet.insert(hook);
|
||||
end_for;
|
||||
}
|
||||
|
@ -401,15 +401,15 @@ void Component::_PreDelete()
|
|||
}
|
||||
|
||||
componentSet.erase(this);
|
||||
for_each_component(component, GetCollection(componentSet)) {
|
||||
component->Delete();
|
||||
for_each_component(component, getCollection(componentSet)) {
|
||||
component->destroy();
|
||||
end_for;
|
||||
}
|
||||
|
||||
set<Rubber*> rubberSet;
|
||||
set<Hook*> mainMasterHookSet;
|
||||
for_each_hook(hook, GetCollection(masterHookSet)) {
|
||||
Rubber* rubber = hook->GetComponent()->GetRubber();
|
||||
for_each_hook(hook, getCollection(masterHookSet)) {
|
||||
Rubber* rubber = hook->getComponent()->getRubber();
|
||||
if (!rubber)
|
||||
mainMasterHookSet.insert(hook);
|
||||
else {
|
||||
|
@ -421,7 +421,7 @@ void Component::_PreDelete()
|
|||
end_for;
|
||||
}
|
||||
Hook* masterHook = NULL;
|
||||
for_each_hook(hook, GetCollection(mainMasterHookSet)) {
|
||||
for_each_hook(hook, getCollection(mainMasterHookSet)) {
|
||||
if (!masterHook)
|
||||
masterHook = hook;
|
||||
else
|
||||
|
@ -432,34 +432,34 @@ void Component::_PreDelete()
|
|||
|
||||
_bodyHook.Detach();
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
if (_net) _net->_GetComponentSet()._Remove(this);
|
||||
if (_net) _net->_getComponentSet()._Remove(this);
|
||||
|
||||
|
||||
// trace << "exiting Component::_PreDelete:" << endl;
|
||||
// trace << "exiting Component::_Predestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string Component::_GetString() const
|
||||
string Component::_getString() const
|
||||
// *********************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
string s = Inherit::_getString();
|
||||
if (!_net)
|
||||
s.insert(s.length() - 1, " UNCONNECTED");
|
||||
else
|
||||
s.insert(s.length() - 1, " " + GetString(_net->GetName()));
|
||||
s.insert(s.length() - 1, " " + getString(_net->getName()));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Component::_GetRecord() const
|
||||
Record* Component::_getRecord() const
|
||||
// ****************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Net", _net));
|
||||
record->Add(GetSlot("Rubber", _rubber));
|
||||
record->Add(GetSlot("BodyHook", &_bodyHook));
|
||||
record->Add(getSlot("Net", _net));
|
||||
record->Add(getSlot("Rubber", _rubber));
|
||||
record->Add(getSlot("BodyHook", &_bodyHook));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -468,9 +468,9 @@ void Component::_SetNet(Net* net)
|
|||
// ******************************
|
||||
{
|
||||
if (net != _net) {
|
||||
if (_net) _net->_GetComponentSet()._Remove(this);
|
||||
if (_net) _net->_getComponentSet()._Remove(this);
|
||||
_net = net;
|
||||
if (_net) _net->_GetComponentSet()._Insert(this);
|
||||
if (_net) _net->_getComponentSet()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -489,8 +489,8 @@ void Component::_SetRubber(Rubber* rubber)
|
|||
//{
|
||||
// Box area(point);
|
||||
// area.Inflate(aperture);
|
||||
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
|
||||
// if (view->IsVisible(basicLayer) && GetBoundingBox(basicLayer).intersect(area))
|
||||
// for_each_basic_layer(basicLayer, getLayer()->getBasicLayers()) {
|
||||
// if (view->IsVisible(basicLayer) && getBoundingBox(basicLayer).intersect(area))
|
||||
// return true;
|
||||
// end_for;
|
||||
// }
|
||||
|
@ -501,7 +501,7 @@ void Component::_SetRubber(Rubber* rubber)
|
|||
//void Component::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// ************************************************************************************************
|
||||
//{
|
||||
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
|
||||
// for_each_basic_layer(basicLayer, getLayer()->getBasicLayers()) {
|
||||
// _Draw(view, basicLayer, updateArea, transformation);
|
||||
// end_for;
|
||||
// }
|
||||
|
@ -525,16 +525,16 @@ Component::BodyHook::BodyHook(Component* component)
|
|||
BODY_HOOK_OFFSET = (unsigned long)this - (unsigned long)component;
|
||||
}
|
||||
|
||||
Component* Component::BodyHook::GetComponent() const
|
||||
Component* Component::BodyHook::getComponent() const
|
||||
// *************************************************
|
||||
{
|
||||
return (Component*)((unsigned long)this - BODY_HOOK_OFFSET);
|
||||
}
|
||||
|
||||
string Component::BodyHook::_GetString() const
|
||||
string Component::BodyHook::_getString() const
|
||||
// *******************************************
|
||||
{
|
||||
return "<" + _TName("Component::BodyHook") + " " + GetString(GetComponent()) + ">";
|
||||
return "<" + _TName("Component::BodyHook") + " " + getString(getComponent()) + ">";
|
||||
}
|
||||
|
||||
// ****************************************************************************************************
|
||||
|
@ -562,23 +562,23 @@ Component_Hooks& Component_Hooks::operator=(const Component_Hooks& hooks)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Hook*>* Component_Hooks::GetClone() const
|
||||
Collection<Hook*>* Component_Hooks::getClone() const
|
||||
// *************************************************
|
||||
{
|
||||
return new Component_Hooks(*this);
|
||||
}
|
||||
|
||||
Locator<Hook*>* Component_Hooks::GetLocator() const
|
||||
Locator<Hook*>* Component_Hooks::getLocator() const
|
||||
// ************************************************
|
||||
{
|
||||
return new Locator(_component);
|
||||
}
|
||||
|
||||
string Component_Hooks::_GetString() const
|
||||
string Component_Hooks::_getString() const
|
||||
// ***************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::Hooks");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ Component_Hooks::Locator::Locator(const Component* component)
|
|||
_component(component),
|
||||
_hook(NULL)
|
||||
{
|
||||
if (_component) _hook = ((Component*)_component)->GetBodyHook();
|
||||
if (_component) _hook = ((Component*)_component)->getBodyHook();
|
||||
}
|
||||
|
||||
Component_Hooks::Locator::Locator(const Locator& locator)
|
||||
|
@ -614,13 +614,13 @@ Component_Hooks::Locator& Component_Hooks::Locator::operator=(const Locator& loc
|
|||
return *this;
|
||||
}
|
||||
|
||||
Hook* Component_Hooks::Locator::GetElement() const
|
||||
Hook* Component_Hooks::Locator::getElement() const
|
||||
// ***********************************************
|
||||
{
|
||||
return _hook;
|
||||
}
|
||||
|
||||
Locator<Hook*>* Component_Hooks::Locator::GetClone() const
|
||||
Locator<Hook*>* Component_Hooks::Locator::getClone() const
|
||||
// *******************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -638,11 +638,11 @@ void Component_Hooks::Locator::Progress()
|
|||
_hook = NULL;
|
||||
}
|
||||
|
||||
string Component_Hooks::Locator::_GetString() const
|
||||
string Component_Hooks::Locator::_getString() const
|
||||
// ************************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::Hooks::Locator");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -675,23 +675,23 @@ Component_ConnexComponents&
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Component*>* Component_ConnexComponents::GetClone() const
|
||||
Collection<Component*>* Component_ConnexComponents::getClone() const
|
||||
// *****************************************************************
|
||||
{
|
||||
return new Component_ConnexComponents(*this);
|
||||
}
|
||||
|
||||
Locator<Component*>* Component_ConnexComponents::GetLocator() const
|
||||
Locator<Component*>* Component_ConnexComponents::getLocator() const
|
||||
// ****************************************************************
|
||||
{
|
||||
return new Locator(_component);
|
||||
}
|
||||
|
||||
string Component_ConnexComponents::_GetString() const
|
||||
string Component_ConnexComponents::_getString() const
|
||||
// **************************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::ConnexComponents");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -733,13 +733,13 @@ Component_ConnexComponents::Locator& Component_ConnexComponents::Locator::operat
|
|||
return *this;
|
||||
}
|
||||
|
||||
Component* Component_ConnexComponents::Locator::GetElement() const
|
||||
Component* Component_ConnexComponents::Locator::getElement() const
|
||||
// ***************************************************************
|
||||
{
|
||||
return _componentStack.top();
|
||||
}
|
||||
|
||||
Locator<Component*>* Component_ConnexComponents::Locator::GetClone() const
|
||||
Locator<Component*>* Component_ConnexComponents::Locator::getClone() const
|
||||
// ***********************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -757,18 +757,18 @@ void Component_ConnexComponents::Locator::Progress()
|
|||
if (!_componentStack.empty()) {
|
||||
Component* component = _componentStack.top();
|
||||
_componentStack.pop();
|
||||
for_each_hook(componentHook, component->GetHooks()) {
|
||||
Hook* masterHook = componentHook->GetMasterHook();
|
||||
for_each_hook(componentHook, component->getHooks()) {
|
||||
Hook* masterHook = componentHook->getMasterHook();
|
||||
if (masterHook) {
|
||||
for_each_hook(slaveHook, masterHook->GetSlaveHooks()) {
|
||||
Component* component = slaveHook->GetComponent();
|
||||
for_each_hook(slaveHook, masterHook->getSlaveHooks()) {
|
||||
Component* component = slaveHook->getComponent();
|
||||
if (_componentSet.find(component) == _componentSet.end()) {
|
||||
_componentSet.insert(component);
|
||||
_componentStack.push(component);
|
||||
}
|
||||
end_for;
|
||||
}
|
||||
Component* component = masterHook->GetComponent();
|
||||
Component* component = masterHook->getComponent();
|
||||
if (_componentSet.find(component) == _componentSet.end()) {
|
||||
_componentSet.insert(component);
|
||||
_componentStack.push(component);
|
||||
|
@ -779,11 +779,11 @@ void Component_ConnexComponents::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
string Component_ConnexComponents::Locator::_GetString() const
|
||||
string Component_ConnexComponents::Locator::_getString() const
|
||||
// ***********************************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::ConnexComponents::Locator");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -816,23 +816,23 @@ Component_SlaveComponents&
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Component*>* Component_SlaveComponents::GetClone() const
|
||||
Collection<Component*>* Component_SlaveComponents::getClone() const
|
||||
// ****************************************************************
|
||||
{
|
||||
return new Component_SlaveComponents(*this);
|
||||
}
|
||||
|
||||
Locator<Component*>* Component_SlaveComponents::GetLocator() const
|
||||
Locator<Component*>* Component_SlaveComponents::getLocator() const
|
||||
// ***************************************************************
|
||||
{
|
||||
return new Locator(_component);
|
||||
}
|
||||
|
||||
string Component_SlaveComponents::_GetString() const
|
||||
string Component_SlaveComponents::_getString() const
|
||||
// *************************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::SlaveComponents");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -852,9 +852,9 @@ Component_SlaveComponents::Locator::Locator(const Component* component)
|
|||
{
|
||||
if (_component) {
|
||||
_componentSet.insert((Component*)_component);
|
||||
Hook* masterHook = ((Component*)_component)->GetBodyHook();
|
||||
for_each_hook(slaveHook, masterHook->GetSlaveHooks()) {
|
||||
Component* component = slaveHook->GetComponent();
|
||||
Hook* masterHook = ((Component*)_component)->getBodyHook();
|
||||
for_each_hook(slaveHook, masterHook->getSlaveHooks()) {
|
||||
Component* component = slaveHook->getComponent();
|
||||
if (_componentSet.find(component) == _componentSet.end()) {
|
||||
_componentSet.insert(component);
|
||||
_componentStack.push(component);
|
||||
|
@ -883,13 +883,13 @@ Component_SlaveComponents::Locator&
|
|||
return *this;
|
||||
}
|
||||
|
||||
Component* Component_SlaveComponents::Locator::GetElement() const
|
||||
Component* Component_SlaveComponents::Locator::getElement() const
|
||||
// **************************************************************
|
||||
{
|
||||
return _componentStack.top();
|
||||
}
|
||||
|
||||
Locator<Component*>* Component_SlaveComponents::Locator::GetClone() const
|
||||
Locator<Component*>* Component_SlaveComponents::Locator::getClone() const
|
||||
// **********************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -907,9 +907,9 @@ void Component_SlaveComponents::Locator::Progress()
|
|||
if (!_componentStack.empty()) {
|
||||
Component* component = _componentStack.top();
|
||||
_componentStack.pop();
|
||||
Hook* masterHook = component->GetBodyHook();
|
||||
for_each_hook(slaveHook, masterHook->GetSlaveHooks()) {
|
||||
Component* component = slaveHook->GetComponent();
|
||||
Hook* masterHook = component->getBodyHook();
|
||||
for_each_hook(slaveHook, masterHook->getSlaveHooks()) {
|
||||
Component* component = slaveHook->getComponent();
|
||||
if (_componentSet.find(component) == _componentSet.end()) {
|
||||
_componentSet.insert(component);
|
||||
_componentStack.push(component);
|
||||
|
@ -919,21 +919,21 @@ void Component_SlaveComponents::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
string Component_SlaveComponents::Locator::_GetString() const
|
||||
string Component_SlaveComponents::Locator::_getString() const
|
||||
// **********************************************************
|
||||
{
|
||||
string s = "<" + _TName("Component::SlaveComponents::Locator");
|
||||
if (_component) s += " " + GetString(_component);
|
||||
if (_component) s += " " + getString(_component);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
double GetArea ( Component* component )
|
||||
double getArea ( Component* component )
|
||||
//**************************************
|
||||
{
|
||||
Box bb = component->GetBoundingBox ();
|
||||
Box bb = component->getBoundingBox ();
|
||||
|
||||
return GetValue(bb.getWidth()) * GetValue(bb.getHeight());
|
||||
return getValue(bb.getWidth()) * getValue(bb.getHeight());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,12 +42,12 @@ class Component : public Go {
|
|||
|
||||
private: BodyHook(Component* component);
|
||||
|
||||
public: virtual Component* GetComponent() const;
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return true;};
|
||||
|
||||
public: virtual string _GetTypeName() const { return _TName("Component::BodyHook"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getTypeName() const { return _TName("Component::BodyHook"); };
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -67,20 +67,20 @@ class Component : public Go {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const;
|
||||
public: Net* GetNet() const {return _net;};
|
||||
public: Rubber* GetRubber() const {return _rubber;};
|
||||
public: Hook* GetBodyHook() {return &_bodyHook;};
|
||||
public: virtual Hooks GetHooks() const;
|
||||
public: virtual Unit GetX() const = 0;
|
||||
public: virtual Unit GetY() const = 0;
|
||||
public: virtual Point GetPosition() const {return Point(GetX(), GetY());};
|
||||
public: virtual Point GetCenter() const {return GetPosition();};
|
||||
public: virtual Layer* GetLayer() const = 0;
|
||||
public: virtual Box GetBoundingBox() const = 0;
|
||||
public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const = 0;
|
||||
public: Components GetConnexComponents() const;
|
||||
public: Components GetSlaveComponents() const;
|
||||
public: virtual Cell* getCell() const;
|
||||
public: Net* getNet() const {return _net;};
|
||||
public: Rubber* getRubber() const {return _rubber;};
|
||||
public: Hook* getBodyHook() {return &_bodyHook;};
|
||||
public: virtual Hooks getHooks() const;
|
||||
public: virtual Unit getX() const = 0;
|
||||
public: virtual Unit getY() const = 0;
|
||||
public: virtual Point getPosition() const {return Point(getX(), getY());};
|
||||
public: virtual Point getCenter() const {return getPosition();};
|
||||
public: virtual Layer* getLayer() const = 0;
|
||||
public: virtual Box getBoundingBox() const = 0;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const = 0;
|
||||
public: Components getConnexComponents() const;
|
||||
public: Components getSlaveComponents() const;
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -92,30 +92,27 @@ class Component : public Go {
|
|||
// Filters
|
||||
// *******
|
||||
|
||||
public: static ComponentFilter GetIsUnderFilter(const Box& area);
|
||||
public: static ComponentFilter getIsUnderFilter(const Box& area);
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: Component* _GetNextOfNetComponentSet() const {return _nextOfNetComponentSet;};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: Component* _getNextOfNetComponentSet() const {return _nextOfNetComponentSet;};
|
||||
|
||||
public: void _SetNet(Net* net);
|
||||
public: void _SetRubber(Rubber* rubber);
|
||||
public: void _SetNextOfNetComponentSet(Component* component) {_nextOfNetComponentSet = component;};
|
||||
|
||||
//public: virtual bool _IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const;
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
|
||||
};
|
||||
|
||||
|
||||
double GetArea ( Component* component );
|
||||
double getArea ( Component* component );
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Component*> ComponentFilter;
|
|||
#define for_each_component(component, components)\
|
||||
/************************************************/\
|
||||
{\
|
||||
ComponentLocator _locator = components.GetLocator();\
|
||||
ComponentLocator _locator = components.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Component* component = _locator.GetElement();\
|
||||
Component* component = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ CompositeLayer* CompositeLayer::create(Technology* technology, const Name& name,
|
|||
CompositeLayer* compositeLayer =
|
||||
new CompositeLayer(technology, name, type, minimalSize, minimalSpacing);
|
||||
|
||||
compositeLayer->_PostCreate();
|
||||
compositeLayer->_postCreate();
|
||||
|
||||
return compositeLayer;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ CompositeLayer* CompositeLayer::create(Technology* technology, const Name& name,
|
|||
BasicLayers CompositeLayer::getBasicLayers() const
|
||||
// ***********************************************
|
||||
{
|
||||
return GetCollection(_basicLayerList);
|
||||
return getCollection(_basicLayerList);
|
||||
}
|
||||
|
||||
Unit CompositeLayer::getContactSize(const BasicLayer* basicLayer) const
|
||||
|
@ -142,16 +142,16 @@ void CompositeLayer::remove(BasicLayer* basicLayer)
|
|||
_setExtractMask(extractMask);
|
||||
}
|
||||
|
||||
string CompositeLayer::_GetString() const
|
||||
string CompositeLayer::_getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
string s = Inherit::_getString();
|
||||
/*
|
||||
s.insert(s.length() - 1, " " + GetString(_type));
|
||||
s.insert(s.length() - 1, " " + getString(_type));
|
||||
s.insert(s.length() - 1, " {");
|
||||
string separator = "";
|
||||
for_each_basic_layer(basicLayer, GetBasicLayers()) {
|
||||
s.insert(s.length() - 1, separator + GetString(basicLayer->GetName()));
|
||||
for_each_basic_layer(basicLayer, getBasicLayers()) {
|
||||
s.insert(s.length() - 1, separator + getString(basicLayer->getName()));
|
||||
separator = "|";
|
||||
end_for;
|
||||
}
|
||||
|
@ -160,21 +160,21 @@ string CompositeLayer::_GetString() const
|
|||
return s;
|
||||
}
|
||||
|
||||
Record* CompositeLayer::_GetRecord() const
|
||||
Record* CompositeLayer::_getRecord() const
|
||||
// ***************************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Type", &_type));
|
||||
record->Add(GetSlot("BasicLayers", &_basicLayerList));
|
||||
record->Add(GetSlot("ContactSizes", &_contactSizeMap));
|
||||
record->Add(GetSlot("SegmentSizes", &_segmentSizeMap));
|
||||
record->Add(GetSlot("SegmentExtentions", &_segmentExtentionMap));
|
||||
record->Add(GetSlot("PadSizes", &_padSizeMap));
|
||||
record->Add(GetSlot("MaximalContactSize", &_maximalContactSize));
|
||||
record->Add(GetSlot("MaximalSegmentSize", &_maximalSegmentSize));
|
||||
record->Add(GetSlot("MaximalSegmentExtention", &_maximalSegmentExtention));
|
||||
record->Add(GetSlot("MaximalPadSize", &_maximalPadSize));
|
||||
record->Add(getSlot("Type", &_type));
|
||||
record->Add(getSlot("BasicLayers", &_basicLayerList));
|
||||
record->Add(getSlot("ContactSizes", &_contactSizeMap));
|
||||
record->Add(getSlot("SegmentSizes", &_segmentSizeMap));
|
||||
record->Add(getSlot("SegmentExtentions", &_segmentExtentionMap));
|
||||
record->Add(getSlot("PadSizes", &_padSizeMap));
|
||||
record->Add(getSlot("MaximalContactSize", &_maximalContactSize));
|
||||
record->Add(getSlot("MaximalSegmentSize", &_maximalSegmentSize));
|
||||
record->Add(getSlot("MaximalSegmentExtention", &_maximalSegmentExtention));
|
||||
record->Add(getSlot("MaximalPadSize", &_maximalPadSize));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ CompositeLayer::Type& CompositeLayer::Type::operator=(const Type& type)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string CompositeLayer::Type::_GetString() const
|
||||
string CompositeLayer::Type::_getString() const
|
||||
// ********************************************
|
||||
{
|
||||
switch (_code) {
|
||||
|
@ -229,11 +229,11 @@ string CompositeLayer::Type::_GetString() const
|
|||
return "ABNORMAL";
|
||||
}
|
||||
|
||||
Record* CompositeLayer::Type::_GetRecord() const
|
||||
Record* CompositeLayer::Type::_getRecord() const
|
||||
// *********************************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", (int)_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", (int)_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ class CompositeLayer : public Layer {
|
|||
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("CompositeLayer::Type"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("CompositeLayer::Type"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -97,9 +97,9 @@ class CompositeLayer : public Layer {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("CompositeLayer");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("CompositeLayer");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: virtual BasicLayer* _getSymbolicBasicLayer() {return _symbolicBasicLayer;};
|
||||
public: BasicLayerList& _getBasicLayerList() {return _basicLayerList;};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<CompositeLayer*> CompositeLayerFilter;
|
|||
#define for_each_composite_layer(compositeLayer, compositeLayers)\
|
||||
/****************************************************************/\
|
||||
{\
|
||||
CompositeLayerLocator _locator = compositeLayers.GetLocator();\
|
||||
CompositeLayerLocator _locator = compositeLayers.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
CompositeLayer* compositeLayer = _locator.GetElement();\
|
||||
CompositeLayer* compositeLayer = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -40,14 +40,14 @@ class Contact_Hooks : public Collection<Hook*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Hook* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetClone() const;
|
||||
public: virtual Hook* getElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -70,13 +70,13 @@ class Contact_Hooks : public Collection<Hook*> {
|
|||
// Accessors
|
||||
// ********^
|
||||
|
||||
public: virtual Collection<Hook*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetLocator() const;
|
||||
public: virtual Collection<Hook*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -113,16 +113,16 @@ Contact::Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, cons
|
|||
if (!anchor)
|
||||
throw Error("Can't create " + _TName("Contact") + " : null anchor");
|
||||
|
||||
if (!anchor->GetNet())
|
||||
if (!anchor->getNet())
|
||||
throw Error("Can't create " + _TName("Contact") + " : unconnected anchor");
|
||||
|
||||
if (anchor->GetNet() != GetNet())
|
||||
if (anchor->getNet() != getNet())
|
||||
throw Error("Can't create " + _TName("Contact") + " : incompatible anchor");
|
||||
|
||||
if (!_layer)
|
||||
throw Error("Can't create " + _TName("Contact") + " : null layer");
|
||||
|
||||
_anchorHook.Attach(anchor->GetBodyHook());
|
||||
_anchorHook.Attach(anchor->getBodyHook());
|
||||
}
|
||||
|
||||
Contact* Contact::Create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
|
@ -130,7 +130,7 @@ Contact* Contact::Create(Net* net, Layer* layer, const Unit& x, const Unit& y, c
|
|||
{
|
||||
Contact* contact = new Contact(net, layer, x, y, width, height);
|
||||
|
||||
contact->_PostCreate();
|
||||
contact->_postCreate();
|
||||
|
||||
return contact;
|
||||
}
|
||||
|
@ -141,63 +141,63 @@ Contact* Contact::Create(Component* anchor, Layer* layer, const Unit& dx, const
|
|||
if (!anchor)
|
||||
throw Error("Can't create " + _TName("Contact") + " : null anchor");
|
||||
|
||||
Contact* contact = new Contact(anchor->GetNet(), anchor, layer, dx, dy, width, height);
|
||||
Contact* contact = new Contact(anchor->getNet(), anchor, layer, dx, dy, width, height);
|
||||
|
||||
contact->_PostCreate();
|
||||
contact->_postCreate();
|
||||
|
||||
return contact;
|
||||
}
|
||||
|
||||
Hooks Contact::GetHooks() const
|
||||
Hooks Contact::getHooks() const
|
||||
// ****************************
|
||||
{
|
||||
return Contact_Hooks(this);
|
||||
}
|
||||
|
||||
Unit Contact::GetX() const
|
||||
Unit Contact::getX() const
|
||||
// ***********************
|
||||
{
|
||||
Component* anchor = GetAnchor();
|
||||
return (!anchor) ? _dx : anchor->GetX() + _dx;
|
||||
Component* anchor = getAnchor();
|
||||
return (!anchor) ? _dx : anchor->getX() + _dx;
|
||||
}
|
||||
|
||||
Unit Contact::GetY() const
|
||||
Unit Contact::getY() const
|
||||
// ***********************
|
||||
{
|
||||
Component* anchor = GetAnchor();
|
||||
return (!anchor) ? _dy : anchor->GetY() + _dy;
|
||||
Component* anchor = getAnchor();
|
||||
return (!anchor) ? _dy : anchor->getY() + _dy;
|
||||
}
|
||||
|
||||
Point Contact::GetPosition() const
|
||||
Point Contact::getPosition() const
|
||||
// *******************************
|
||||
{
|
||||
Component* anchor = GetAnchor();
|
||||
return (!anchor) ? Point(_dx, _dy) : anchor->GetPosition().translate(_dx, _dy);
|
||||
Component* anchor = getAnchor();
|
||||
return (!anchor) ? Point(_dx, _dy) : anchor->getPosition().translate(_dx, _dy);
|
||||
}
|
||||
|
||||
Box Contact::GetBoundingBox() const
|
||||
Box Contact::getBoundingBox() const
|
||||
// ********************************
|
||||
{
|
||||
Unit size = _GetSize();
|
||||
Unit size = _getSize();
|
||||
|
||||
return Box(GetPosition()).inflate(GetHalfWidth() + size, GetHalfHeight() + size);
|
||||
return Box(getPosition()).inflate(getHalfWidth() + size, getHalfHeight() + size);
|
||||
}
|
||||
|
||||
Box Contact::GetBoundingBox(const BasicLayer* basicLayer) const
|
||||
Box Contact::getBoundingBox(const BasicLayer* basicLayer) const
|
||||
// ******************************************************
|
||||
{
|
||||
if (!_layer->contains(basicLayer)) return Box();
|
||||
|
||||
Unit size = _GetSize(basicLayer);
|
||||
Unit size = _getSize(basicLayer);
|
||||
|
||||
return Box(GetPosition()).inflate(GetHalfWidth() + size, GetHalfHeight() + size);
|
||||
return Box(getPosition()).inflate(getHalfWidth() + size, getHalfHeight() + size);
|
||||
}
|
||||
|
||||
Component* Contact::GetAnchor() const
|
||||
Component* Contact::getAnchor() const
|
||||
// **********************************
|
||||
{
|
||||
Hook* masterHook = _anchorHook.GetMasterHook();
|
||||
return (masterHook) ? masterHook->GetComponent() : NULL;
|
||||
Hook* masterHook = _anchorHook.getMasterHook();
|
||||
return (masterHook) ? masterHook->getComponent() : NULL;
|
||||
}
|
||||
|
||||
void Contact::Translate(const Unit& dx, const Unit& dy)
|
||||
|
@ -253,23 +253,23 @@ void Contact::SetSizes(const Unit& width, const Unit& height)
|
|||
void Contact::SetX(const Unit& x)
|
||||
// ******************************
|
||||
{
|
||||
SetPosition(x, GetY());
|
||||
SetPosition(x, getY());
|
||||
}
|
||||
|
||||
void Contact::SetY(const Unit& y)
|
||||
// ******************************
|
||||
{
|
||||
SetPosition(GetX(), y);
|
||||
SetPosition(getX(), y);
|
||||
}
|
||||
|
||||
void Contact::SetPosition(const Unit& x, const Unit& y)
|
||||
// ****************************************************
|
||||
{
|
||||
Component* anchor = GetAnchor();
|
||||
Component* anchor = getAnchor();
|
||||
if (!anchor)
|
||||
SetOffset(x, y);
|
||||
else
|
||||
SetOffset(x - anchor->GetX(), y - anchor->GetY());
|
||||
SetOffset(x - anchor->getX(), y - anchor->getY());
|
||||
}
|
||||
|
||||
void Contact::SetPosition(const Point& position)
|
||||
|
@ -300,64 +300,64 @@ void Contact::SetOffset(const Unit& dx, const Unit& dy)
|
|||
}
|
||||
}
|
||||
|
||||
void Contact::_PreDelete()
|
||||
void Contact::_preDestroy()
|
||||
// ***********************
|
||||
{
|
||||
// trace << "entering Contact::PreDelete: " << this << endl;
|
||||
// trace << "entering Contact::PreDestroy " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_anchorHook.Detach();
|
||||
|
||||
// trace << "exiting Contact::PreDelete:" << endl;
|
||||
// trace << "exiting Contact::PreDestroy" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string Contact::_GetString() const
|
||||
string Contact::_getString() const
|
||||
// *******************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_layer->getName()));
|
||||
s.insert(s.length() - 1, " [" + GetValueString(GetX()));
|
||||
s.insert(s.length() - 1, " " + GetValueString(GetY()));
|
||||
s.insert(s.length() - 1, "] " + GetValueString(_width));
|
||||
s.insert(s.length() - 1, "x" + GetValueString(_height));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_layer->getName()));
|
||||
s.insert(s.length() - 1, " [" + getValueString(getX()));
|
||||
s.insert(s.length() - 1, " " + getValueString(getY()));
|
||||
s.insert(s.length() - 1, "] " + getValueString(_width));
|
||||
s.insert(s.length() - 1, "x" + getValueString(_height));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Contact::_GetRecord() const
|
||||
Record* Contact::_getRecord() const
|
||||
// **************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("AnchorHook", &_anchorHook));
|
||||
record->Add(GetSlot("Anchor", GetAnchor()));
|
||||
record->Add(GetSlot("Layer", _layer));
|
||||
record->Add(GetSlot("Dx", &_dx));
|
||||
record->Add(GetSlot("Dy", &_dy));
|
||||
record->Add(GetSlot("Width", &_width));
|
||||
record->Add(GetSlot("Height", &_height));
|
||||
record->Add(getSlot("AnchorHook", &_anchorHook));
|
||||
record->Add(getSlot("Anchor", getAnchor()));
|
||||
record->Add(getSlot("Layer", _layer));
|
||||
record->Add(getSlot("Dx", &_dx));
|
||||
record->Add(getSlot("Dy", &_dy));
|
||||
record->Add(getSlot("Width", &_width));
|
||||
record->Add(getSlot("Height", &_height));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
Unit Contact::_GetSize() const
|
||||
Unit Contact::_getSize() const
|
||||
// ***************************
|
||||
{
|
||||
Unit size = 0;
|
||||
|
||||
Layer* layer = GetLayer();
|
||||
Layer* layer = getLayer();
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
size = ((CompositeLayer*)layer)->getMaximalContactSize();
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Unit Contact::_GetSize(const BasicLayer* basicLayer) const
|
||||
Unit Contact::_getSize(const BasicLayer* basicLayer) const
|
||||
// *******************************************************
|
||||
{
|
||||
Layer* layer = GetLayer();
|
||||
Layer* layer = getLayer();
|
||||
|
||||
if (!layer->contains(basicLayer)) return 0;
|
||||
|
||||
|
@ -386,16 +386,16 @@ Contact::AnchorHook::AnchorHook(Contact* contact)
|
|||
ANCHOR_HOOK_OFFSET = (unsigned long)this - (unsigned long)contact;
|
||||
}
|
||||
|
||||
Component* Contact::AnchorHook::GetComponent() const
|
||||
Component* Contact::AnchorHook::getComponent() const
|
||||
// *************************************************
|
||||
{
|
||||
return (Component*)((unsigned long)this - ANCHOR_HOOK_OFFSET);
|
||||
}
|
||||
|
||||
string Contact::AnchorHook::_GetString() const
|
||||
string Contact::AnchorHook::_getString() const
|
||||
// *******************************************
|
||||
{
|
||||
return "<" + _TName("Contact::AnchorHook") + " " + GetString(GetComponent()) + ">";
|
||||
return "<" + _TName("Contact::AnchorHook") + " " + getString(getComponent()) + ">";
|
||||
}
|
||||
|
||||
|
||||
|
@ -425,23 +425,23 @@ Contact_Hooks& Contact_Hooks::operator=(const Contact_Hooks& hooks)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Hook*>* Contact_Hooks::GetClone() const
|
||||
Collection<Hook*>* Contact_Hooks::getClone() const
|
||||
// ***********************************************
|
||||
{
|
||||
return new Contact_Hooks(*this);
|
||||
}
|
||||
|
||||
Locator<Hook*>* Contact_Hooks::GetLocator() const
|
||||
Locator<Hook*>* Contact_Hooks::getLocator() const
|
||||
// **********************************************
|
||||
{
|
||||
return new Locator(_contact);
|
||||
}
|
||||
|
||||
string Contact_Hooks::_GetString() const
|
||||
string Contact_Hooks::_getString() const
|
||||
// *************************************
|
||||
{
|
||||
string s = "<" + _TName("Contact::Hooks");
|
||||
if (_contact) s += " " + GetString(_contact);
|
||||
if (_contact) s += " " + getString(_contact);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ Contact_Hooks::Locator::Locator(const Contact* contact)
|
|||
_contact(contact),
|
||||
_hook(NULL)
|
||||
{
|
||||
if (_contact) _hook = ((Contact*)_contact)->GetBodyHook();
|
||||
if (_contact) _hook = ((Contact*)_contact)->getBodyHook();
|
||||
}
|
||||
|
||||
Contact_Hooks::Locator::Locator(const Locator& locator)
|
||||
|
@ -477,13 +477,13 @@ Contact_Hooks::Locator& Contact_Hooks::Locator::operator=(const Locator& locator
|
|||
return *this;
|
||||
}
|
||||
|
||||
Hook* Contact_Hooks::Locator::GetElement() const
|
||||
Hook* Contact_Hooks::Locator::getElement() const
|
||||
// *********************************************
|
||||
{
|
||||
return _hook;
|
||||
}
|
||||
|
||||
Locator<Hook*>* Contact_Hooks::Locator::GetClone() const
|
||||
Locator<Hook*>* Contact_Hooks::Locator::getClone() const
|
||||
// *****************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -499,18 +499,18 @@ void Contact_Hooks::Locator::Progress()
|
|||
// ************************************
|
||||
{
|
||||
if (_hook) {
|
||||
if (_hook == ((Contact*)_contact)->GetBodyHook())
|
||||
_hook = ((Contact*)_contact)->GetAnchorHook();
|
||||
if (_hook == ((Contact*)_contact)->getBodyHook())
|
||||
_hook = ((Contact*)_contact)->getAnchorHook();
|
||||
else
|
||||
_hook = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
string Contact_Hooks::Locator::_GetString() const
|
||||
string Contact_Hooks::Locator::_getString() const
|
||||
// **********************************************
|
||||
{
|
||||
string s = "<" + _TName("Contact::Hooks::Locator");
|
||||
if (_contact) s += " " + GetString(_contact);
|
||||
if (_contact) s += " " + getString(_contact);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -35,12 +35,12 @@ class Contact : public Component {
|
|||
|
||||
private: AnchorHook(Contact* contact);
|
||||
|
||||
public: virtual Component* GetComponent() const;
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return false;};
|
||||
|
||||
public: virtual string _GetTypeName() const { return _TName("Contact::AnchorHook"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getTypeName() const { return _TName("Contact::AnchorHook"); };
|
||||
public: virtual string _getString() const;
|
||||
};
|
||||
|
||||
// Attributes
|
||||
|
@ -65,21 +65,21 @@ class Contact : public Component {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Hooks GetHooks() const;
|
||||
public: virtual Unit GetX() const;
|
||||
public: virtual Unit GetY() const;
|
||||
public: virtual Point GetPosition() const;
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: virtual Layer* GetLayer() const {return _layer;};
|
||||
public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Hook* GetAnchorHook() {return &_anchorHook;};
|
||||
public: Component* GetAnchor() const;
|
||||
public: const Unit& GetDx() const {return _dx;};
|
||||
public: const Unit& GetDy() const {return _dy;};
|
||||
public: const Unit& GetWidth() const {return _width;};
|
||||
public: Unit GetHalfWidth() const {return (_width / 2);};
|
||||
public: const Unit& GetHeight() const {return _height;};
|
||||
public: Unit GetHalfHeight() const {return (_height / 2);};
|
||||
public: virtual Hooks getHooks() const;
|
||||
public: virtual Unit getX() const;
|
||||
public: virtual Unit getY() const;
|
||||
public: virtual Point getPosition() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Layer* getLayer() const {return _layer;};
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Hook* getAnchorHook() {return &_anchorHook;};
|
||||
public: Component* getAnchor() const;
|
||||
public: const Unit& getDx() const {return _dx;};
|
||||
public: const Unit& getDy() const {return _dy;};
|
||||
public: const Unit& getWidth() const {return _width;};
|
||||
public: Unit getHalfWidth() const {return (_width / 2);};
|
||||
public: const Unit& getHeight() const {return _height;};
|
||||
public: Unit getHalfHeight() const {return (_height / 2);};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -101,17 +101,14 @@ class Contact : public Component {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Contact");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Contact");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: Unit _GetSize() const;
|
||||
public: Unit _GetSize(const BasicLayer* basicLayer) const;
|
||||
|
||||
//public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation);
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
public: Unit _getSize() const;
|
||||
public: Unit _getSize(const BasicLayer* basicLayer) const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Contact*> ContactFilter;
|
|||
#define for_each_contact(contact, contacts)\
|
||||
/******************************************/\
|
||||
{\
|
||||
ContactLocator _locator = contacts.GetLocator();\
|
||||
ContactLocator _locator = contacts.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Contact* contact = _locator.GetElement();\
|
||||
Contact* contact = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -28,50 +28,50 @@ DBo::~DBo()
|
|||
{
|
||||
}
|
||||
|
||||
void DBo::Delete()
|
||||
void DBo::destroy()
|
||||
// ***************
|
||||
{
|
||||
// trace << "entering DBo::Delete: " << this << endl;
|
||||
// trace << "entering DBo::destroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
_PreDelete();
|
||||
_preDestroy();
|
||||
|
||||
delete this;
|
||||
|
||||
// trace << "exiting DBo::Delete:" << endl;
|
||||
// trace << "exiting DBo::destroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
Property* DBo::GetProperty(const Name& name) const
|
||||
Property* DBo::getProperty(const Name& name) const
|
||||
// ***********************************************
|
||||
{
|
||||
PropertySet::const_iterator iterator = _propertySet.begin();
|
||||
while (iterator != _propertySet.end()) {
|
||||
Property* property = *iterator;
|
||||
if (property->GetName() == name) return property;
|
||||
if (property->getName() == name) return property;
|
||||
++iterator;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DBo::Put(Property* property)
|
||||
void DBo::put(Property* property)
|
||||
// ******************************
|
||||
{
|
||||
if (!property)
|
||||
throw Error("Can't put property : null property");
|
||||
|
||||
Property* oldProperty = GetProperty(property->GetName());
|
||||
Property* oldProperty = getProperty(property->getName());
|
||||
if (property != oldProperty) {
|
||||
if (oldProperty) {
|
||||
_propertySet.erase(oldProperty);
|
||||
oldProperty->OnReleasedBy(this);
|
||||
oldProperty->onReleasedBy(this);
|
||||
}
|
||||
_propertySet.insert(property);
|
||||
property->OnCapturedBy(this);
|
||||
property->onCapturedBy(this);
|
||||
}
|
||||
}
|
||||
|
||||
void DBo::Remove(Property* property)
|
||||
void DBo::remove(Property* property)
|
||||
// *********************************
|
||||
{
|
||||
if (!property)
|
||||
|
@ -79,23 +79,23 @@ void DBo::Remove(Property* property)
|
|||
|
||||
if (_propertySet.find(property) != _propertySet.end()) {
|
||||
_propertySet.erase(property);
|
||||
property->OnReleasedBy(this);
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) Delete();
|
||||
property->onReleasedBy(this);
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void DBo::RemoveProperty(const Name& name)
|
||||
void DBo::removeProperty(const Name& name)
|
||||
// ***************************************
|
||||
{
|
||||
Property* property = GetProperty(name);
|
||||
Property* property = getProperty(name);
|
||||
if (property) {
|
||||
_propertySet.erase(property);
|
||||
property->OnReleasedBy(this);
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) Delete();
|
||||
property->onReleasedBy(this);
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void DBo::ClearProperties()
|
||||
void DBo::clearProperties()
|
||||
// ************************
|
||||
{
|
||||
// trace << "entering DBo::ClearProperties: " << this << endl;
|
||||
|
@ -105,53 +105,53 @@ void DBo::ClearProperties()
|
|||
Property* property = *_propertySet.begin();
|
||||
// trace << property << endl;
|
||||
_propertySet.erase(property);
|
||||
property->OnReleasedBy(this);
|
||||
property->onReleasedBy(this);
|
||||
}
|
||||
|
||||
// trace << "exiting DBo::ClearProperties:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
void DBo::_PostCreate()
|
||||
void DBo::_postCreate()
|
||||
// ********************
|
||||
{
|
||||
}
|
||||
|
||||
void DBo::_PreDelete()
|
||||
void DBo::_preDestroy()
|
||||
// *******************
|
||||
{
|
||||
// trace << "entering DBo::_PreDelete: " << this << endl;
|
||||
// trace << "entering DBo::_Predestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
ClearProperties();
|
||||
clearProperties();
|
||||
|
||||
|
||||
// trace << "exiting DBo::_PreDelete:" << endl;
|
||||
// trace << "exiting DBo::_Predestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string DBo::_GetString() const
|
||||
string DBo::_getString() const
|
||||
// ***************************
|
||||
{
|
||||
return "<" + _GetTypeName() + ">";
|
||||
return "<" + _getTypeName() + ">";
|
||||
}
|
||||
|
||||
Record* DBo::_GetRecord() const
|
||||
Record* DBo::_getRecord() const
|
||||
// **********************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
Record* record = new Record(getString(this));
|
||||
if (record) {
|
||||
record->Add(GetSlot("Properties", &_propertySet));
|
||||
record->Add(getSlot("Properties", &_propertySet));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
void DBo::_OnDeleted(Property* property)
|
||||
void DBo::_onDeleted(Property* property)
|
||||
// *************************************
|
||||
{
|
||||
if (property && (_propertySet.find(property) != _propertySet.end())) {
|
||||
_propertySet.erase(property);
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) Delete();
|
||||
if (is_a<Quark*>(this) && _propertySet.empty()) destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Hurricane {
|
|||
class DBo : public NestedSlotAdapter {
|
||||
// *********************************
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
#if !defined(__DOXYGEN_PROCESSOR__)
|
||||
|
||||
// Types
|
||||
// *****
|
||||
|
@ -54,42 +54,42 @@ class DBo : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const = 0;
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: PropertySet& _GetPropertySet() {return _propertySet;};
|
||||
public: virtual string _getTypeName() const = 0;
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: PropertySet& _getPropertySet() {return _propertySet;};
|
||||
|
||||
public: void _OnDeleted(Property* property);
|
||||
public: void _onDeleted(Property* property);
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Destructors
|
||||
// ***********
|
||||
|
||||
public: virtual void Delete();
|
||||
public: virtual void destroy();
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: Property* GetProperty(const Name& name) const;
|
||||
public: Properties GetProperties() const {return GetCollection(_propertySet);};
|
||||
public: Property* getProperty(const Name& name) const;
|
||||
public: Properties getProperties() const {return getCollection(_propertySet);};
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
||||
public: bool HasProperty() const {return !_propertySet.empty();};
|
||||
public: bool hasProperty() const {return !_propertySet.empty();};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
||||
public: void Put(Property* property);
|
||||
public: void Remove(Property* property);
|
||||
public: void RemoveProperty(const Name& name);
|
||||
public: void ClearProperties();
|
||||
public: void put(Property* property);
|
||||
public: void remove(Property* property);
|
||||
public: void removeProperty(const Name& name);
|
||||
public: void clearProperties();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<DBo*> DBoFilter;
|
|||
#define for_each_dbo(dbo, dbos)\
|
||||
/******************************/\
|
||||
{\
|
||||
DBoLocator _locator = dbos.GetLocator();\
|
||||
DBoLocator _locator = dbos.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
DBo* dbo = _locator.GetElement();\
|
||||
DBo* dbo = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ DRCError* DRCError::Create(Cell* cell, const Name& name, const Box& boundingBox)
|
|||
{
|
||||
DRCError* drcError = new DRCError(cell, name, boundingBox);
|
||||
|
||||
drcError->_PostCreate();
|
||||
drcError->_postCreate();
|
||||
|
||||
return drcError;
|
||||
}
|
||||
|
@ -49,46 +49,24 @@ void DRCError::Translate(const Unit& dx, const Unit& dy)
|
|||
}
|
||||
}
|
||||
|
||||
string DRCError::_GetString() const
|
||||
string DRCError::_getString() const
|
||||
// ********************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
s.insert(s.length() - 1, " " + GetString(_boundingBox));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
s.insert(s.length() - 1, " " + getString(_boundingBox));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* DRCError::_GetRecord() const
|
||||
Record* DRCError::_getRecord() const
|
||||
// ***************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("BoundingBox", &_boundingBox));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("BoundingBox", &_boundingBox));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
//bool DRCError::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const
|
||||
//// ****************************************************************************************
|
||||
//{
|
||||
// return GetBoundingBox().Intersect(Box(point).Inflate(aperture));
|
||||
//}
|
||||
//
|
||||
//void DRCError::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
|
||||
//// ****************************************************************************************************
|
||||
//{
|
||||
// assert(!basicLayer);
|
||||
//
|
||||
// view->DrawRectangle(transformation.GetBox(GetBoundingBox()));
|
||||
//}
|
||||
//
|
||||
//void DRCError::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// **********************************************************************************************
|
||||
//{
|
||||
// view->FillRectangle(transformation.GetBox(GetBoundingBox()));
|
||||
//}
|
||||
//
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -41,8 +41,8 @@ class DRCError : public Marker {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Box GetBoundingBox() const {return _boundingBox;};
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: virtual Box getBoundingBox() const {return _boundingBox;};
|
||||
public: const Name& getName() const {return _name;};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -52,14 +52,10 @@ class DRCError : public Marker {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("DRCError");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("DRCError");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
// public: virtual bool _IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const;
|
||||
// public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation);
|
||||
// public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
//
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -37,48 +37,48 @@ DataBase* DataBase::Create()
|
|||
{
|
||||
DataBase* dataBase = new DataBase();
|
||||
|
||||
dataBase->_PostCreate();
|
||||
dataBase->_postCreate();
|
||||
|
||||
return dataBase;
|
||||
}
|
||||
|
||||
void DataBase::_PostCreate()
|
||||
void DataBase::_postCreate()
|
||||
// *************************
|
||||
{
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
|
||||
DATA_BASE = this;
|
||||
}
|
||||
|
||||
void DataBase::_PreDelete()
|
||||
void DataBase::_preDestroy()
|
||||
// ************************
|
||||
{
|
||||
OpenUpdateSession();
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
if (_rootLibrary) _rootLibrary->Delete();
|
||||
if (_technology) _technology->Delete();
|
||||
if (_rootLibrary) _rootLibrary->destroy();
|
||||
if (_technology) _technology->destroy();
|
||||
CloseUpdateSession ();
|
||||
|
||||
DATA_BASE = NULL;
|
||||
}
|
||||
|
||||
string DataBase::_GetString() const
|
||||
string DataBase::_getString() const
|
||||
// ********************************
|
||||
{
|
||||
return Inherit::_GetString();
|
||||
return Inherit::_getString();
|
||||
}
|
||||
|
||||
Record* DataBase::_GetRecord() const
|
||||
Record* DataBase::_getRecord() const
|
||||
// ***************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Technology", _technology));
|
||||
record->Add(GetSlot("RootLibrary", _rootLibrary));
|
||||
record->Add(GetSlot("Precision", GetPrecision()));
|
||||
record->Add(GetSlot("Resolution", GetValueString(1)));
|
||||
record->Add(GetSlot("GridStep", GetValueString(GetGridStep())));
|
||||
record->Add(getSlot("Technology", _technology));
|
||||
record->Add(getSlot("RootLibrary", _rootLibrary));
|
||||
record->Add(getSlot("Precision", getPrecision()));
|
||||
record->Add(getSlot("Resolution", getValueString(1)));
|
||||
record->Add(getSlot("GridStep", getValueString(getGridStep())));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ Record* DataBase::_GetRecord() const
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
DataBase* GetDataBase()
|
||||
DataBase* getDataBase()
|
||||
// ********************
|
||||
{
|
||||
return DATA_BASE;
|
||||
|
|
|
@ -45,13 +45,13 @@ class DataBase : public DBo {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("DataBase");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("DataBase");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: void _SetTechnology(Technology* technology) {_technology = technology;};
|
||||
public: void _SetRootLibrary(Library* rootLibrary) {_rootLibrary = rootLibrary;};
|
||||
|
@ -63,8 +63,8 @@ class DataBase : public DBo {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: Technology* GetTechnology() const {return _technology;};
|
||||
public: Library* GetRootLibrary() const {return _rootLibrary;};
|
||||
public: Technology* getTechnology() const {return _technology;};
|
||||
public: Library* getRootLibrary() const {return _rootLibrary;};
|
||||
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@ class DataBase : public DBo {
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
DataBase* GetDataBase();
|
||||
DataBase* getDataBase();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -96,8 +96,8 @@ namespace {
|
|||
// Constructor : "DeepNet::DeepNet ()".
|
||||
|
||||
DeepNet::DeepNet ( Occurrence& netOccurrence )
|
||||
: Net(netOccurrence.GetOwnerCell()
|
||||
,netOccurrence.GetName()
|
||||
: Net(netOccurrence.getOwnerCell()
|
||||
,netOccurrence.getName()
|
||||
)
|
||||
, _netOccurrence(netOccurrence)
|
||||
{
|
||||
|
@ -107,13 +107,13 @@ DeepNet::DeepNet ( Occurrence& netOccurrence )
|
|||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Inspector Management : "DeepNet::_GetRecord ()".
|
||||
// Inspector Management : "DeepNet::_getRecord ()".
|
||||
|
||||
Record* DeepNet::_GetRecord () const
|
||||
Record* DeepNet::_getRecord () const
|
||||
{
|
||||
Record* record = Net::_GetRecord();
|
||||
Record* record = Net::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("_netOccurrence", &_netOccurrence));
|
||||
record->Add(getSlot("_netOccurrence", &_netOccurrence));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -130,13 +130,13 @@ DeepNet* DeepNet::Create ( HyperNet& hyperNet )
|
|||
if ( !hyperNet.IsValid() )
|
||||
throw Error ( "Can't create " + _TName("DeepNet") + ": occurence is invalid." );
|
||||
|
||||
Occurrence rootNetOccurrence = GetHyperNetRootNetOccurrence ( hyperNet.GetNetOccurrence() );
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hyperNet.getNetOccurrence() );
|
||||
|
||||
if ( rootNetOccurrence.GetMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
if ( rootNetOccurrence.GetPath().IsEmpty() ) return NULL;
|
||||
if ( rootNetOccurrence.getMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
if ( rootNetOccurrence.getPath().IsEmpty() ) return NULL;
|
||||
|
||||
DeepNet* deepNet = new DeepNet ( rootNetOccurrence );
|
||||
deepNet->_PostCreate ();
|
||||
deepNet->_postCreate ();
|
||||
|
||||
return deepNet;
|
||||
}
|
||||
|
@ -154,13 +154,13 @@ size_t DeepNet::_CreateRoutingPads ( bool buildRings )
|
|||
|
||||
RoutingPad* previousRP = NULL;
|
||||
RoutingPad* currentRP = NULL;
|
||||
for_each_occurrence ( plugOccurrence, hyperNet.GetLeafPlugOccurrences() ) {
|
||||
for_each_occurrence ( plugOccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
nbRoutingPads++;
|
||||
|
||||
currentRP = CreateRoutingPad ( this, plugOccurrence );
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->GetBodyHook()->Attach ( previousRP->GetBodyHook() );
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
@ -175,15 +175,15 @@ size_t DeepNet::_CreateRoutingPads ( bool buildRings )
|
|||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
Net* GetDeepNet(HyperNet& hypernet)
|
||||
Net* getDeepNet(HyperNet& hypernet)
|
||||
// ********************************
|
||||
{
|
||||
Occurrence rootNetOccurrence = GetHyperNetRootNetOccurrence ( hypernet.GetNetOccurrence() );
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hypernet.getNetOccurrence() );
|
||||
|
||||
//if ( rootNetOccurrence.GetMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
//if ( rootNetOccurrence.GetPath().IsEmpty() ) return NULL;
|
||||
//if ( rootNetOccurrence.getMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
//if ( rootNetOccurrence.getPath().IsEmpty() ) return NULL;
|
||||
|
||||
return rootNetOccurrence.GetOwnerCell()->GetNet(rootNetOccurrence.GetName());
|
||||
return rootNetOccurrence.getOwnerCell()->getNet(rootNetOccurrence.getName());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ namespace Hurricane {
|
|||
|
||||
// Inspector Management.
|
||||
public:
|
||||
virtual Record* _GetRecord () const;
|
||||
virtual string _GetTypeName() const { return "DeepNet"; };
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getTypeName() const { return "DeepNet"; };
|
||||
|
||||
# endif
|
||||
|
||||
|
@ -99,7 +99,7 @@ namespace Hurricane {
|
|||
|
||||
};
|
||||
|
||||
Net* GetDeepNet(HyperNet& hyperNet);
|
||||
Net* getDeepNet(HyperNet& hyperNet);
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -20,9 +20,9 @@ namespace Hurricane {
|
|||
|
||||
static Name DisplaySlotsCellRelationName("DisplaySlotsCellRelation");
|
||||
|
||||
static StandardRelation* GetDisplaySlotRelation(const Cell* cell)
|
||||
static StandardRelation* getDisplaySlotRelation(const Cell* cell)
|
||||
{
|
||||
Property* property = cell->GetProperty(DisplaySlotsCellRelationName);
|
||||
Property* property = cell->getProperty(DisplaySlotsCellRelationName);
|
||||
if (!property)
|
||||
return NULL;
|
||||
else
|
||||
|
@ -57,19 +57,19 @@ DisplaySlot* DisplaySlot::Create(Cell* cell, const Name& name, unsigned short re
|
|||
{
|
||||
DisplaySlot* displaySlot = new DisplaySlot(cell, name, red1, green1, blue1, pattern1, linewidth1, red2, green2, blue2, pattern2, linewidth2);
|
||||
|
||||
displaySlot->_PostCreate();
|
||||
displaySlot->_postCreate();
|
||||
|
||||
return displaySlot;
|
||||
}
|
||||
|
||||
void DisplaySlot::_PostCreate()
|
||||
void DisplaySlot::_postCreate()
|
||||
// ***********************
|
||||
{
|
||||
Inherit::_PostCreate();
|
||||
StandardRelation* relation = GetDisplaySlotRelation(_cell);
|
||||
Inherit::_postCreate();
|
||||
StandardRelation* relation = getDisplaySlotRelation(_cell);
|
||||
if (!relation)
|
||||
relation = StandardRelation::Create(_cell, DisplaySlotsCellRelationName);
|
||||
Put(relation);
|
||||
relation = StandardRelation::create(_cell, DisplaySlotsCellRelationName);
|
||||
put(relation);
|
||||
}
|
||||
|
||||
void DisplaySlot::Show()
|
||||
|
@ -77,7 +77,7 @@ void DisplaySlot::Show()
|
|||
{
|
||||
if (!_isVisible) {
|
||||
_isVisible = true;
|
||||
//for_each_view(view, _cell->GetViews())
|
||||
//for_each_view(view, _cell->getViews())
|
||||
//{
|
||||
// view->Invalidate();
|
||||
// end_for;
|
||||
|
@ -90,11 +90,6 @@ void DisplaySlot::Hide()
|
|||
{
|
||||
if (_isVisible) {
|
||||
_isVisible = false;
|
||||
//for_each_view(view, _cell->GetViews())
|
||||
//{
|
||||
// view->Invalidate();
|
||||
// end_for;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,91 +98,69 @@ void DisplaySlot::Flush()
|
|||
{
|
||||
OpenUpdateSession();
|
||||
vector<Go*> govect;
|
||||
_quadTree.GetGos().Fill(govect);
|
||||
for (unsigned i = 0 ; i < govect.size() ; i++)
|
||||
{
|
||||
govect[i]->Delete();
|
||||
_quadTree.getGos().Fill(govect);
|
||||
for (unsigned i = 0 ; i < govect.size() ; i++) {
|
||||
govect[i]->destroy();
|
||||
}
|
||||
CloseUpdateSession();
|
||||
}
|
||||
|
||||
//void DisplaySlot::_Draw(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// *********************************************************************************************
|
||||
//{
|
||||
// if (GetBoundingBox().Intersect(updateArea)) {
|
||||
// for_each_go(go, _quadTree.GetGos())
|
||||
// {
|
||||
// go->_Draw(view, NULL, updateArea, transformation);
|
||||
// end_for;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
void DisplaySlot::_PreDelete()
|
||||
// ***************************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
//gdk_gc_destroy(_drawGC);
|
||||
//gdk_gc_destroy(_fillGC);
|
||||
}
|
||||
|
||||
UserGos DisplaySlot::GetUserGos() const
|
||||
UserGos DisplaySlot::getUserGos() const
|
||||
// ************************************
|
||||
{
|
||||
return _quadTree.GetGos().GetSubSet<UserGo*>();
|
||||
return _quadTree.getGos().getSubSet<UserGo*>();
|
||||
}
|
||||
|
||||
UserGos DisplaySlot::GetUserGosUnder(const Box& area) const
|
||||
UserGos DisplaySlot::getUserGosUnder(const Box& area) const
|
||||
// ********************************************************
|
||||
{
|
||||
return _quadTree.GetGosUnder(area).GetSubSet<UserGo*>();
|
||||
return _quadTree.getGosUnder(area).getSubSet<UserGo*>();
|
||||
}
|
||||
|
||||
string DisplaySlot::_GetString() const
|
||||
string DisplaySlot::_getString() const
|
||||
// ***********************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(GetName()));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(getName()));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* DisplaySlot::_GetRecord() const
|
||||
Record* DisplaySlot::_getRecord() const
|
||||
// ******************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Cell", _cell));
|
||||
record->Add(GetSlot("Name", _name));
|
||||
record->Add(GetSlot("QuadTree", &_quadTree));
|
||||
record->Add(GetSlot("Is Visible", _isVisible));
|
||||
record->Add(getSlot("Cell", _cell));
|
||||
record->Add(getSlot("Name", _name));
|
||||
record->Add(getSlot("QuadTree", &_quadTree));
|
||||
record->Add(getSlot("Is Visible", _isVisible));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
DisplaySlots GetDisplaySlots(const Cell* cell)
|
||||
DisplaySlots getDisplaySlots(const Cell* cell)
|
||||
{
|
||||
if (!cell)
|
||||
throw Error("Null pointer on cell while getting display slots");
|
||||
|
||||
StandardRelation* relation = GetDisplaySlotRelation(cell);
|
||||
StandardRelation* relation = getDisplaySlotRelation(cell);
|
||||
if (!relation)
|
||||
return DisplaySlots();
|
||||
return relation->GetSlaveOwners().GetSubSet<DisplaySlot*>();
|
||||
return relation->getSlaveOwners().getSubSet<DisplaySlot*>();
|
||||
}
|
||||
|
||||
DisplaySlot* GetDisplaySlot(const Cell* cell,const Name& name)
|
||||
DisplaySlot* getDisplaySlot(const Cell* cell,const Name& name)
|
||||
{
|
||||
if (!cell)
|
||||
throw Error("Null pointer on cell while getting display slots");
|
||||
|
||||
StandardRelation* relation = GetDisplaySlotRelation(cell);
|
||||
StandardRelation* relation = getDisplaySlotRelation(cell);
|
||||
if (!relation)
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
for_each_display_slot(displaySlot,relation->GetSlaveOwners().GetSubSet<DisplaySlot*>())
|
||||
{
|
||||
if (displaySlot->GetName() == name)
|
||||
for_each_display_slot(displaySlot,relation->getSlaveOwners().getSubSet<DisplaySlot*>()) {
|
||||
if (displaySlot->getName() == name)
|
||||
return displaySlot;
|
||||
end_for;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,6 @@ class DisplaySlot : public DBo {
|
|||
private: Cell* _cell;
|
||||
private: Name _name;
|
||||
private: QuadTree _quadTree;
|
||||
//private: GdkGC* _drawGC;
|
||||
//private: GdkGC* _fillGC;
|
||||
private: bool _isVisible;
|
||||
|
||||
// Constructors
|
||||
|
@ -43,20 +41,15 @@ class DisplaySlot : public DBo {
|
|||
|
||||
protected: DisplaySlot(Cell* cell,const Name& name, unsigned short red1, unsigned short green1, unsigned short blue1, const string& pattern1, unsigned linewidth1, unsigned short red2, unsigned short green2, unsigned short blue2, const string& pattern2, unsigned linewidth2);
|
||||
public: static DisplaySlot* Create(Cell* cell, const Name& name, unsigned short red1, unsigned short green1, unsigned short blue1, const string& pattern1 = "FFFFFFFFFFFFFFFF", unsigned linewidth1=0, unsigned short red2 = 0, unsigned short green2 = 0, unsigned short blue2 = 0, const string& pattern2 = "FFFFFFFFFFFFFFFF", unsigned linewidth2=0);
|
||||
protected: virtual void _PostCreate();
|
||||
|
||||
// Destructor
|
||||
// **********
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: const Box& GetBoundingBox() const {return _quadTree.GetBoundingBox();};
|
||||
public: UserGos GetUserGos() const;
|
||||
public: UserGos GetUserGosUnder(const Box& area) const;
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: const Box& getBoundingBox() const {return _quadTree.getBoundingBox();};
|
||||
public: UserGos getUserGos() const;
|
||||
public: UserGos getUserGosUnder(const Box& area) const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -71,20 +64,17 @@ class DisplaySlot : public DBo {
|
|||
|
||||
// Others
|
||||
// ******
|
||||
//public: GdkGC* _GetDrawGC() const { return _drawGC; }
|
||||
//public: GdkGC* _GetFillGC() const { return _fillGC; }
|
||||
public: QuadTree& _GetQuadTree() { return _quadTree; }
|
||||
//public: virtual void _Draw(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
public: QuadTree& _getQuadTree() { return _quadTree; }
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("DisplaySlot");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("DisplaySlot");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
DisplaySlots GetDisplaySlots(const Cell* cell);
|
||||
DisplaySlots getDisplaySlots(const Cell* cell);
|
||||
|
||||
DisplaySlot* GetDisplaySlot(const Cell* cell, const Name& name);
|
||||
DisplaySlot* getDisplaySlot(const Cell* cell, const Name& name);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ typedef GenericFilter<DisplaySlot*> DisplaySlotFilter;
|
|||
#define for_each_display_slot(displaySlot, displaySlots)\
|
||||
/******************************************************/\
|
||||
{\
|
||||
DisplaySlotLocator _locator = displaySlots.GetLocator();\
|
||||
DisplaySlotLocator _locator = displaySlots.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
DisplaySlot* displaySlot = _locator.GetElement();\
|
||||
DisplaySlot* displaySlot = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Entity*> EntityFilter;
|
|||
#define for_each_entity(entity, entities)\
|
||||
/****************************************/\
|
||||
{\
|
||||
EntityLocator _locator = entities.GetLocator();\
|
||||
EntityLocator _locator = entities.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Entity* entity = _locator.GetElement();\
|
||||
Entity* entity = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -24,65 +24,65 @@ Entity::Entity()
|
|||
{
|
||||
}
|
||||
|
||||
void Entity::_PreDelete()
|
||||
void Entity::_preDestroy()
|
||||
// **********************
|
||||
{
|
||||
// trace << "entering Entity::_PreDelete: " << this << endl;
|
||||
// trace << "entering Entity::_preDestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
vector<Entity*> slaveEntities;
|
||||
SlaveEntityMap::iterator it;
|
||||
SlaveEntityMap::iterator end;
|
||||
GetCell()->_GetSlaveEntities(this,it,end);
|
||||
getCell()->_getSlaveEntities(this,it,end);
|
||||
for(; it != end ; it++)
|
||||
slaveEntities.push_back(it->second);
|
||||
for(; slaveEntities.size() ; slaveEntities.pop_back()) {
|
||||
cerr << "Erasing " << slaveEntities.back() << endl;
|
||||
slaveEntities.back()->Delete();
|
||||
slaveEntities.back()->destroy();
|
||||
}
|
||||
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) quark->Delete();
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) quark->destroy();
|
||||
|
||||
stack<SharedPath*> sharedPathStack;
|
||||
for_each_instance(instance, GetCell()->GetSlaveInstances()) {
|
||||
SharedPath* sharedPath = instance->_GetSharedPath(NULL);
|
||||
for_each_instance(instance, getCell()->getSlaveInstances()) {
|
||||
SharedPath* sharedPath = instance->_getSharedPath(NULL);
|
||||
if (sharedPath) sharedPathStack.push(sharedPath);
|
||||
end_for;
|
||||
}
|
||||
while (!sharedPathStack.empty()) {
|
||||
SharedPath* sharedPath = sharedPathStack.top();
|
||||
sharedPathStack.pop();
|
||||
Quark* quark = _GetQuark(sharedPath);
|
||||
if (quark) quark->Delete();
|
||||
Cell* cell = sharedPath->GetOwnerCell();
|
||||
for_each_instance(instance, cell->GetSlaveInstances()) {
|
||||
SharedPath* sharedPath2 = instance->_GetSharedPath(sharedPath);
|
||||
Quark* quark = _getQuark(sharedPath);
|
||||
if (quark) quark->destroy();
|
||||
Cell* cell = sharedPath->getOwnerCell();
|
||||
for_each_instance(instance, cell->getSlaveInstances()) {
|
||||
SharedPath* sharedPath2 = instance->_getSharedPath(sharedPath);
|
||||
if (sharedPath2) sharedPathStack.push(sharedPath2);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
// trace << "exiting Entity::_PreDelete:" << endl;
|
||||
// trace << "exiting Entity::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string Entity::_GetString() const
|
||||
string Entity::_getString() const
|
||||
// ******************************
|
||||
{
|
||||
return Inherit::_GetString();
|
||||
return Inherit::_getString();
|
||||
}
|
||||
|
||||
Record* Entity::_GetRecord() const
|
||||
Record* Entity::_getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
Occurrence occurrence = Occurrence(this);
|
||||
if (occurrence.HasProperty())
|
||||
record->Add(GetSlot("Occurrence", occurrence));
|
||||
record->Add(getSlot("Occurrence", occurrence));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -41,19 +41,19 @@ class Entity : public DBo {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: Quark* _GetQuark(SharedPath* sharedPath = NULL) const;
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: Quark* _getQuark(SharedPath* sharedPath = NULL) const;
|
||||
|
||||
# endif
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const = 0;
|
||||
public: virtual Box GetBoundingBox() const = 0;
|
||||
public: virtual Cell* getCell() const = 0;
|
||||
public: virtual Box getBoundingBox() const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ Error& Error::operator=(const Error& error)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Error::_GetString() const
|
||||
string Error::_getString() const
|
||||
// *****************************
|
||||
{
|
||||
if (!_code) return "[ERROR] " + _reason;
|
||||
|
||||
return "[ERROR:" + GetString(_code) + "] " + _reason;
|
||||
return "[ERROR:" + getString(_code) + "] " + _reason;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ class Error : public Exception {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: string GetReason() const {return _reason;};
|
||||
public: int GetCode() const {return _code;};
|
||||
public: string getReason() const {return _reason;};
|
||||
public: int getCode() const {return _code;};
|
||||
|
||||
// Modifiers
|
||||
// *********
|
||||
|
@ -57,8 +57,8 @@ class Error : public Exception {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const { return _TName("Error"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getTypeName() const { return _TName("Error"); };
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -40,12 +40,12 @@ class Exception : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: string What() const { return _GetString(); };
|
||||
public: string What() const { return _getString(); };
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const = 0;
|
||||
public: virtual string _getString() const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ template<class Type> class Filter : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Filter<Type>* GetClone() const = 0;
|
||||
public: virtual Filter<Type>* getClone() const = 0;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -59,8 +59,8 @@ template<class Type> class Filter : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const { return _TName("Filter"); };
|
||||
public: virtual string _GetString() const = 0;
|
||||
public: virtual string _getTypeName() const { return _TName("Filter"); };
|
||||
public: virtual string _getString() const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
@ -96,14 +96,14 @@ template<class Type> class GenericFilter : public Filter<Type> {
|
|||
public: GenericFilter(const Filter<Type>& filter)
|
||||
// **********************************************
|
||||
: Inherit(),
|
||||
_filter(filter.GetClone())
|
||||
_filter(filter.getClone())
|
||||
{
|
||||
};
|
||||
|
||||
public: GenericFilter(const GenericFilter<Type>& genericFilter)
|
||||
// ************************************************************
|
||||
: Inherit(),
|
||||
_filter(genericFilter.GetClone())
|
||||
_filter(genericFilter.getClone())
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -132,7 +132,7 @@ template<class Type> class GenericFilter : public Filter<Type> {
|
|||
// *********************************************************
|
||||
{
|
||||
if (_filter) delete _filter;
|
||||
_filter = filter.GetClone();
|
||||
_filter = filter.getClone();
|
||||
return *this;
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,7 @@ template<class Type> class GenericFilter : public Filter<Type> {
|
|||
// *****************************************************************
|
||||
{
|
||||
if (_filter) delete _filter;
|
||||
_filter = genericFilter.GetClone();
|
||||
_filter = genericFilter.getClone();
|
||||
return *this;
|
||||
};
|
||||
|
||||
|
@ -157,10 +157,10 @@ template<class Type> class GenericFilter : public Filter<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Filter<Type>* GetClone() const
|
||||
public: virtual Filter<Type>* getClone() const
|
||||
// *******************************************
|
||||
{
|
||||
return (_filter) ? _filter->GetClone() : NULL;
|
||||
return (_filter) ? _filter->getClone() : NULL;
|
||||
};
|
||||
|
||||
// Predicates
|
||||
|
@ -175,19 +175,19 @@ template<class Type> class GenericFilter : public Filter<Type> {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("GenericFilter");
|
||||
}
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_filter)
|
||||
return "<" + _GetTypeName() + " unbound>";
|
||||
return "<" + _getTypeName() + " unbound>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(_filter) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_filter) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -248,7 +248,7 @@ template<class Type> class NotFilter : public Filter<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Filter<Type>* GetClone() const
|
||||
public: virtual Filter<Type>* getClone() const
|
||||
// *******************************************
|
||||
{
|
||||
return new NotFilter(*this);
|
||||
|
@ -266,16 +266,16 @@ template<class Type> class NotFilter : public Filter<Type> {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("GenericNotFilter");
|
||||
}
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
return "<" + _GetTypeName() + " " + GetString(_genericFilter) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_genericFilter) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -43,40 +43,40 @@ void Go::DisableAutoMaterialization()
|
|||
AUTO_MATERIALIZATION_IS_ENABLED = false;
|
||||
}
|
||||
|
||||
void Go::_PostCreate()
|
||||
void Go::_postCreate()
|
||||
// *******************
|
||||
{
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
|
||||
if (!AutoMaterializationIsDisabled()) Materialize(); // materialized after entire post creation
|
||||
}
|
||||
|
||||
void Go::_PreDelete()
|
||||
void Go::_preDestroy()
|
||||
// ******************
|
||||
{
|
||||
// trace << "entering Go::_PreDelete: " << this << endl;
|
||||
// trace << "entering Go::_preDestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
Unmaterialize(); // unmaterialized before starting pre destruction
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
// trace << "exiting Go::_PreDelete:" << endl;
|
||||
// trace << "exiting Go::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string Go::_GetString() const
|
||||
string Go::_getString() const
|
||||
// **************************
|
||||
{
|
||||
return Inherit::_GetString();
|
||||
return Inherit::_getString();
|
||||
}
|
||||
|
||||
Record* Go::_GetRecord() const
|
||||
Record* Go::_getRecord() const
|
||||
// *********************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("QuadTree", _quadTree));
|
||||
record->Add(getSlot("QuadTree", _quadTree));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -71,20 +71,16 @@ class Go : public Entity {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: Go* _GetNextOfQuadTreeGoSet() const {return _nextOfQuadTreeGoSet;};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: Go* _getNextOfQuadTreeGoSet() const {return _nextOfQuadTreeGoSet;};
|
||||
|
||||
public: void _SetNextOfQuadTreeGoSet(Go* go) {_nextOfQuadTreeGoSet = go;};
|
||||
|
||||
//public: virtual bool _IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const = 0;
|
||||
//public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) = 0;
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Go*> GoFilter;
|
|||
#define for_each_go(go, gos)\
|
||||
/***************************/\
|
||||
{\
|
||||
GoLocator _locator = gos.GetLocator();\
|
||||
GoLocator _locator = gos.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Go* go = _locator.GetElement();\
|
||||
Go* go = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ class Hook_IsMasterFilter : public Filter<Hook*> {
|
|||
|
||||
public: Hook_IsMasterFilter& operator=(const Hook_IsMasterFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Hook*>* GetClone() const {return new Hook_IsMasterFilter(*this);};
|
||||
public: virtual Filter<Hook*>* getClone() const {return new Hook_IsMasterFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Hook* hook) const {return hook->IsMaster();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Hook::IsMasterFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Hook::IsMasterFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -61,14 +61,14 @@ class Hook_Hooks : public Collection<Hook*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Hook* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetClone() const;
|
||||
public: virtual Hook* getElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -91,13 +91,13 @@ class Hook_Hooks : public Collection<Hook*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Hook*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetLocator() const;
|
||||
public: virtual Collection<Hook*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -128,14 +128,14 @@ class Hook_SlaveHooks : public Collection<Hook*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Hook* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetClone() const;
|
||||
public: virtual Hook* getElement() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -158,13 +158,13 @@ class Hook_SlaveHooks : public Collection<Hook*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Hook*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* GetLocator() const;
|
||||
public: virtual Collection<Hook*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Hook*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -187,13 +187,13 @@ Hook::~Hook()
|
|||
throw Error("Abnormal deletion of hook : always attached");
|
||||
}
|
||||
|
||||
Hook* Hook::GetNextHook() const
|
||||
Hook* Hook::getNextHook() const
|
||||
// ****************************
|
||||
{
|
||||
return _nextHook;
|
||||
}
|
||||
|
||||
Hook* Hook::GetPreviousHook() const
|
||||
Hook* Hook::getPreviousHook() const
|
||||
// ********************************
|
||||
{
|
||||
Hook* hook = (Hook*)this;
|
||||
|
@ -201,7 +201,7 @@ Hook* Hook::GetPreviousHook() const
|
|||
return hook;
|
||||
}
|
||||
|
||||
Hook* Hook::GetMasterHook() const
|
||||
Hook* Hook::getMasterHook() const
|
||||
// ******************************
|
||||
{
|
||||
Hook* hook = (Hook*)this;
|
||||
|
@ -212,13 +212,13 @@ Hook* Hook::GetMasterHook() const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
Hook* Hook::GetNextMasterHook() const
|
||||
Hook* Hook::getNextMasterHook() const
|
||||
// **********************************
|
||||
{
|
||||
return _nextHook->GetMasterHook();
|
||||
return _nextHook->getMasterHook();
|
||||
}
|
||||
|
||||
Hook* Hook::GetPreviousMasterHook() const
|
||||
Hook* Hook::getPreviousMasterHook() const
|
||||
// **************************************
|
||||
{
|
||||
Hook* previousMasterHook = NULL;
|
||||
|
@ -230,19 +230,19 @@ Hook* Hook::GetPreviousMasterHook() const
|
|||
return previousMasterHook;
|
||||
}
|
||||
|
||||
Hooks Hook::GetHooks() const
|
||||
Hooks Hook::getHooks() const
|
||||
// *************************
|
||||
{
|
||||
return Hook_Hooks(this);
|
||||
}
|
||||
|
||||
Hooks Hook::GetSlaveHooks() const
|
||||
Hooks Hook::getSlaveHooks() const
|
||||
// ******************************
|
||||
{
|
||||
return Hook_SlaveHooks(this);
|
||||
}
|
||||
|
||||
HookFilter Hook::GetIsMasterFilter()
|
||||
HookFilter Hook::getIsMasterFilter()
|
||||
// *********************************
|
||||
{
|
||||
return Hook_IsMasterFilter();
|
||||
|
@ -252,9 +252,9 @@ bool Hook::IsAttached() const
|
|||
// **************************
|
||||
{
|
||||
if (!IsMaster())
|
||||
return (GetMasterHook() != NULL);
|
||||
return (getMasterHook() != NULL);
|
||||
else
|
||||
return (GetNextMasterHook() != this);
|
||||
return (getNextMasterHook() != this);
|
||||
}
|
||||
|
||||
Hook* Hook::Detach()
|
||||
|
@ -274,8 +274,8 @@ Hook* Hook::Detach()
|
|||
// /*
|
||||
if (IsMaster()) {
|
||||
assert(previousHook->IsMaster());
|
||||
Component* component = GetComponent();
|
||||
Rubber* rubber = component->GetRubber();
|
||||
Component* component = getComponent();
|
||||
Rubber* rubber = component->getRubber();
|
||||
if (rubber) {
|
||||
rubber->_SetHook(previousHook);
|
||||
component->_SetRubber(NULL);
|
||||
|
@ -302,16 +302,16 @@ Hook* Hook::Attach(Hook* hook)
|
|||
if (hook == this)
|
||||
throw Error("Can't attach : itself");
|
||||
|
||||
Hook* masterHook = hook->GetPreviousMasterHook();
|
||||
Hook* masterHook = hook->getPreviousMasterHook();
|
||||
Hook* nextHook = masterHook->_nextHook;
|
||||
masterHook->_nextHook = _nextHook;
|
||||
_nextHook = nextHook;
|
||||
|
||||
// /*
|
||||
if (IsMaster()) {
|
||||
Rubber* rubber = hook->GetComponent()->GetRubber();
|
||||
Rubber* rubber = hook->getComponent()->getRubber();
|
||||
if (rubber)
|
||||
GetComponent()->_SetRubber(rubber);
|
||||
getComponent()->_SetRubber(rubber);
|
||||
else
|
||||
Rubber::_Create(this);
|
||||
}
|
||||
|
@ -324,9 +324,9 @@ void Hook::_SetNextHook(Hook* hook)
|
|||
{
|
||||
if (IsMaster())
|
||||
{
|
||||
Rubber* rubber = hook->GetComponent()->GetRubber();
|
||||
Rubber* rubber = hook->getComponent()->getRubber();
|
||||
if (rubber)
|
||||
rubber->_Delete();
|
||||
rubber->_destroy();
|
||||
}
|
||||
_nextHook = hook;
|
||||
}
|
||||
|
@ -346,28 +346,28 @@ Hook* Hook::Merge(Hook* hook)
|
|||
if (hook == this)
|
||||
throw Error("Can't merge : itself");
|
||||
|
||||
Hook* masterHook = hook->GetPreviousMasterHook();
|
||||
Hook* masterHook = hook->getPreviousMasterHook();
|
||||
Hook* nextHook = masterHook->_nextHook;
|
||||
masterHook->_nextHook = _nextHook;
|
||||
_nextHook = nextHook;
|
||||
|
||||
Rubber* rubber = GetComponent()->GetRubber();
|
||||
if (rubber) rubber->_Delete();
|
||||
rubber = hook->GetComponent()->GetRubber();
|
||||
if (rubber) rubber->_Delete();
|
||||
Rubber* rubber = getComponent()->getRubber();
|
||||
if (rubber) rubber->_destroy();
|
||||
rubber = hook->getComponent()->getRubber();
|
||||
if (rubber) rubber->_destroy();
|
||||
Rubber::_Create(this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
Record* Hook::_GetRecord() const
|
||||
Record* Hook::_getRecord() const
|
||||
// ***********************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (_nextHook != this) {
|
||||
record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Component", GetComponent()));
|
||||
record->Add(GetSlot("NextHook", _nextHook));
|
||||
record = new Record(getString(this));
|
||||
record->Add(getSlot("Component", getComponent()));
|
||||
record->Add(getSlot("NextHook", _nextHook));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -399,23 +399,23 @@ Hook_Hooks& Hook_Hooks::operator=(const Hook_Hooks& hooks)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Hook*>* Hook_Hooks::GetClone() const
|
||||
Collection<Hook*>* Hook_Hooks::getClone() const
|
||||
// ********************************************
|
||||
{
|
||||
return new Hook_Hooks(*this);
|
||||
}
|
||||
|
||||
Locator<Hook*>* Hook_Hooks::GetLocator() const
|
||||
Locator<Hook*>* Hook_Hooks::getLocator() const
|
||||
// *******************************************
|
||||
{
|
||||
return new Locator(_hook);
|
||||
}
|
||||
|
||||
string Hook_Hooks::_GetString() const
|
||||
string Hook_Hooks::_getString() const
|
||||
// **********************************
|
||||
{
|
||||
string s = "<" + _TName("Hook::Hooks");
|
||||
if (_hook) s += " " + GetString(_hook);
|
||||
if (_hook) s += " " + getString(_hook);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -450,13 +450,13 @@ Hook_Hooks::Locator& Hook_Hooks::Locator::operator=(const Locator& locator)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Hook* Hook_Hooks::Locator::GetElement() const
|
||||
Hook* Hook_Hooks::Locator::getElement() const
|
||||
// ******************************************
|
||||
{
|
||||
return _currentHook;
|
||||
}
|
||||
|
||||
Locator<Hook*>* Hook_Hooks::Locator::GetClone() const
|
||||
Locator<Hook*>* Hook_Hooks::Locator::getClone() const
|
||||
// **************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -472,16 +472,16 @@ void Hook_Hooks::Locator::Progress()
|
|||
// *********************************
|
||||
{
|
||||
if (_currentHook) {
|
||||
_currentHook = _currentHook->GetNextHook();
|
||||
_currentHook = _currentHook->getNextHook();
|
||||
if (_currentHook == _hook) _currentHook = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
string Hook_Hooks::Locator::_GetString() const
|
||||
string Hook_Hooks::Locator::_getString() const
|
||||
// *******************************************
|
||||
{
|
||||
string s = "<" + _TName("Hook::Hooks::Locator");
|
||||
if (_hook) s += " " + GetString(_hook);
|
||||
if (_hook) s += " " + getString(_hook);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -513,23 +513,23 @@ Hook_SlaveHooks& Hook_SlaveHooks::operator=(const Hook_SlaveHooks& slaveHooks)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Hook*>* Hook_SlaveHooks::GetClone() const
|
||||
Collection<Hook*>* Hook_SlaveHooks::getClone() const
|
||||
// *************************************************
|
||||
{
|
||||
return new Hook_SlaveHooks(*this);
|
||||
}
|
||||
|
||||
Locator<Hook*>* Hook_SlaveHooks::GetLocator() const
|
||||
Locator<Hook*>* Hook_SlaveHooks::getLocator() const
|
||||
// ************************************************
|
||||
{
|
||||
return new Locator(_hook);
|
||||
}
|
||||
|
||||
string Hook_SlaveHooks::_GetString() const
|
||||
string Hook_SlaveHooks::_getString() const
|
||||
// ***************************************
|
||||
{
|
||||
string s = "<" + _TName("Hook::SlaveHooks");
|
||||
if (_hook) s += " " + GetString(_hook);
|
||||
if (_hook) s += " " + getString(_hook);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -547,9 +547,9 @@ Hook_SlaveHooks::Locator::Locator(const Hook* hook)
|
|||
_currentHook(NULL)
|
||||
{
|
||||
if (_hook && _hook->IsMaster()) {
|
||||
_currentHook = _hook->GetPreviousMasterHook();
|
||||
_currentHook = _hook->getPreviousMasterHook();
|
||||
if (_currentHook) {
|
||||
_currentHook = _currentHook->GetNextHook();
|
||||
_currentHook = _currentHook->getNextHook();
|
||||
if (_currentHook == _hook) _currentHook = NULL;
|
||||
}
|
||||
assert(!_currentHook || !_currentHook->IsMaster());
|
||||
|
@ -572,13 +572,13 @@ Hook_SlaveHooks::Locator& Hook_SlaveHooks::Locator::operator=(const Locator& loc
|
|||
return *this;
|
||||
}
|
||||
|
||||
Hook* Hook_SlaveHooks::Locator::GetElement() const
|
||||
Hook* Hook_SlaveHooks::Locator::getElement() const
|
||||
// ***********************************************
|
||||
{
|
||||
return _currentHook;
|
||||
}
|
||||
|
||||
Locator<Hook*>* Hook_SlaveHooks::Locator::GetClone() const
|
||||
Locator<Hook*>* Hook_SlaveHooks::Locator::getClone() const
|
||||
// *******************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -594,17 +594,17 @@ void Hook_SlaveHooks::Locator::Progress()
|
|||
// **************************************
|
||||
{
|
||||
if (_currentHook) {
|
||||
_currentHook = _currentHook->GetNextHook();
|
||||
_currentHook = _currentHook->getNextHook();
|
||||
if (_currentHook == _hook) _currentHook = NULL;
|
||||
assert(!_currentHook || !_currentHook->IsMaster());
|
||||
}
|
||||
}
|
||||
|
||||
string Hook_SlaveHooks::Locator::_GetString() const
|
||||
string Hook_SlaveHooks::Locator::_getString() const
|
||||
// ************************************************
|
||||
{
|
||||
string s = "<" + _TName("Hook::SlaveHooks::Locator");
|
||||
if (_hook) s += " " + GetString(_hook);
|
||||
if (_hook) s += " " + getString(_hook);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -47,22 +47,22 @@ class Hook : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Component* GetComponent() const = 0;
|
||||
public: virtual Component* getComponent() const = 0;
|
||||
|
||||
public: Hook* GetNextHook() const;
|
||||
public: Hook* GetPreviousHook() const;
|
||||
public: Hook* getNextHook() const;
|
||||
public: Hook* getPreviousHook() const;
|
||||
|
||||
public: Hook* GetMasterHook() const;
|
||||
public: Hook* GetNextMasterHook() const;
|
||||
public: Hook* GetPreviousMasterHook() const;
|
||||
public: Hook* getMasterHook() const;
|
||||
public: Hook* getNextMasterHook() const;
|
||||
public: Hook* getPreviousMasterHook() const;
|
||||
|
||||
public: Hooks GetHooks() const;
|
||||
public: Hooks GetSlaveHooks() const;
|
||||
public: Hooks getHooks() const;
|
||||
public: Hooks getSlaveHooks() const;
|
||||
|
||||
// Filters
|
||||
// *******
|
||||
|
||||
public: static HookFilter GetIsMasterFilter();
|
||||
public: static HookFilter getIsMasterFilter();
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -82,8 +82,8 @@ class Hook : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const = 0;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getString() const = 0;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Hook*> HookFilter;
|
|||
#define for_each_hook(hook, hooks)\
|
||||
/*********************************/\
|
||||
{\
|
||||
HookLocator _locator = hooks.GetLocator();\
|
||||
HookLocator _locator = hooks.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Hook* hook = _locator.GetElement();\
|
||||
Hook* hook = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Horizontal* Horizontal::Create(Net* net, Layer* layer, const Unit& y, const Unit
|
|||
|
||||
Horizontal* horizontal = new Horizontal(net, NULL, NULL, layer, y, width, dxSource, dxTarget);
|
||||
|
||||
horizontal->_PostCreate();
|
||||
horizontal->_postCreate();
|
||||
|
||||
return horizontal;
|
||||
}
|
||||
|
@ -51,57 +51,57 @@ Horizontal* Horizontal::Create(Component* source, Component* target, Layer* laye
|
|||
throw Error("Can't create " + _TName("Horizontal") + " : null target");
|
||||
|
||||
Horizontal* horizontal =
|
||||
new Horizontal(source->GetNet(), source, target, layer, y, width, dxSource, dxTarget);
|
||||
new Horizontal(source->getNet(), source, target, layer, y, width, dxSource, dxTarget);
|
||||
|
||||
horizontal->_PostCreate();
|
||||
horizontal->_postCreate();
|
||||
|
||||
return horizontal;
|
||||
}
|
||||
|
||||
Box Horizontal::GetBoundingBox() const
|
||||
Box Horizontal::getBoundingBox() const
|
||||
// ***********************************
|
||||
{
|
||||
Unit size = GetHalfWidth() + _GetSize();
|
||||
Unit extention = _GetExtention();
|
||||
Unit size = getHalfWidth() + _getSize();
|
||||
Unit extention = _getExtention();
|
||||
|
||||
return Box(GetSourceX(), _y, GetTargetX(), _y).inflate(extention, size);
|
||||
return Box(getSourceX(), _y, getTargetX(), _y).inflate(extention, size);
|
||||
}
|
||||
|
||||
Box Horizontal::GetBoundingBox(const BasicLayer* basicLayer) const
|
||||
Box Horizontal::getBoundingBox(const BasicLayer* basicLayer) const
|
||||
// *********************************************************
|
||||
{
|
||||
if (!GetLayer()->contains(basicLayer)) return Box();
|
||||
if (!getLayer()->contains(basicLayer)) return Box();
|
||||
|
||||
Unit size = GetHalfWidth() + _GetSize(basicLayer);
|
||||
Unit extention = _GetExtention(basicLayer);
|
||||
Unit size = getHalfWidth() + _getSize(basicLayer);
|
||||
Unit extention = _getExtention(basicLayer);
|
||||
|
||||
return Box(GetSourceX(), _y, GetTargetX(), _y).inflate(extention, size);
|
||||
return Box(getSourceX(), _y, getTargetX(), _y).inflate(extention, size);
|
||||
}
|
||||
|
||||
Unit Horizontal::GetSourceX() const
|
||||
Unit Horizontal::getSourceX() const
|
||||
// ********************************
|
||||
{
|
||||
Component* source = GetSource();
|
||||
return (source) ? source->GetX() + _dxSource : _dxSource;
|
||||
Component* source = getSource();
|
||||
return (source) ? source->getX() + _dxSource : _dxSource;
|
||||
}
|
||||
|
||||
Unit Horizontal::GetTargetX() const
|
||||
Unit Horizontal::getTargetX() const
|
||||
// ********************************
|
||||
{
|
||||
Component* target = GetTarget();
|
||||
return (target) ? target->GetX() + _dxTarget : _dxTarget;
|
||||
Component* target = getTarget();
|
||||
return (target) ? target->getX() + _dxTarget : _dxTarget;
|
||||
}
|
||||
|
||||
Unit Horizontal::GetLength() const
|
||||
Unit Horizontal::getLength() const
|
||||
// *******************************
|
||||
{
|
||||
return abs(GetSourceX() - GetTargetX());
|
||||
return abs(getSourceX() - getTargetX());
|
||||
}
|
||||
|
||||
Point Horizontal::GetCenter() const
|
||||
Point Horizontal::getCenter() const
|
||||
// *******************************
|
||||
{
|
||||
return Point ( (GetSourceX()+GetTargetX())/2, GetY() );
|
||||
return Point ( (getSourceX()+getTargetX())/2, getY() );
|
||||
}
|
||||
|
||||
void Horizontal::Translate(const Unit& dx, const Unit& dy)
|
||||
|
@ -149,20 +149,20 @@ void Horizontal::Translate(const Unit& dy)
|
|||
}
|
||||
}
|
||||
|
||||
string Horizontal::_GetString() const
|
||||
string Horizontal::_getString() const
|
||||
// **********************************
|
||||
{
|
||||
return Inherit::_GetString();
|
||||
return Inherit::_getString();
|
||||
}
|
||||
|
||||
Record* Horizontal::_GetRecord() const
|
||||
Record* Horizontal::_getRecord() const
|
||||
// *****************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Y", &_y));
|
||||
record->Add(GetSlot("DxSource", &_dxSource));
|
||||
record->Add(GetSlot("DxTarget", &_dxTarget));
|
||||
record->Add(getSlot("Y", &_y));
|
||||
record->Add(getSlot("DxSource", &_dxSource));
|
||||
record->Add(getSlot("DxTarget", &_dxTarget));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -44,17 +44,17 @@ class Horizontal : public Segment {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Unit GetY() const {return _y;};
|
||||
public: virtual Point GetCenter() const;
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Unit GetSourceX() const;
|
||||
public: virtual Unit GetSourceY() const {return GetY();};
|
||||
public: virtual Unit GetTargetX() const;
|
||||
public: virtual Unit GetTargetY() const {return GetY();};
|
||||
public: virtual Unit GetLength() const;
|
||||
public: const Unit& GetDxSource() const {return _dxSource;};
|
||||
public: const Unit& GetDxTarget() const {return _dxTarget;};
|
||||
public: virtual Unit getY() const {return _y;};
|
||||
public: virtual Point getCenter() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Unit getSourceX() const;
|
||||
public: virtual Unit getSourceY() const {return getY();};
|
||||
public: virtual Unit getTargetX() const;
|
||||
public: virtual Unit getTargetY() const {return getY();};
|
||||
public: virtual Unit getLength() const;
|
||||
public: const Unit& getDxSource() const {return _dxSource;};
|
||||
public: const Unit& getDxTarget() const {return _dxTarget;};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -69,9 +69,9 @@ class Horizontal : public Segment {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Horizontal");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Horizontal");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Horizontal*> HorizontalFilter;
|
|||
#define for_each_horizontal(horizontal, horizontals)\
|
||||
/***************************************************/\
|
||||
{\
|
||||
HorizontalLocator _locator = horizontals.GetLocator();\
|
||||
HorizontalLocator _locator = horizontals.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Horizontal* horizontal = _locator.GetElement();\
|
||||
Horizontal* horizontal = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -47,14 +47,14 @@ class HyperNet_NetOccurrences : public Collection<Occurrence> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Occurrence GetElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetClone() const;
|
||||
public: virtual Occurrence getElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -80,13 +80,13 @@ class HyperNet_NetOccurrences : public Collection<Occurrence> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Occurrence>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetLocator() const;
|
||||
public: virtual Collection<Occurrence>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -121,14 +121,14 @@ class HyperNet_NetOccurrencesUnder : public Collection<Occurrence> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Occurrence GetElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetClone() const;
|
||||
public: virtual Occurrence getElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -158,13 +158,13 @@ class HyperNet_NetOccurrencesUnder : public Collection<Occurrence> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Occurrence>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetLocator() const;
|
||||
public: virtual Collection<Occurrence>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -197,14 +197,14 @@ class HyperNet_LeafPlugOccurrences : public Collection<Occurrence> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Occurrence GetElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetClone() const;
|
||||
public: virtual Occurrence getElement() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -230,13 +230,13 @@ class HyperNet_LeafPlugOccurrences : public Collection<Occurrence> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Occurrence>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* GetLocator() const;
|
||||
public: virtual Collection<Occurrence>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Occurrence>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -251,18 +251,18 @@ HyperNet::HyperNet(const Occurrence& occurrence)
|
|||
: _netOccurrence()
|
||||
{
|
||||
if (occurrence.IsValid()) {
|
||||
Entity* entity = occurrence.GetEntity();
|
||||
Entity* entity = occurrence.getEntity();
|
||||
if (is_a<Net*>(entity))
|
||||
_netOccurrence = occurrence;
|
||||
else {
|
||||
if (is_a<Rubber*>(entity)) {
|
||||
Rubber* rubber = (Rubber*)entity;
|
||||
_netOccurrence = Occurrence(rubber->GetNet(), occurrence.GetPath());
|
||||
_netOccurrence = Occurrence(rubber->getNet(), occurrence.getPath());
|
||||
}
|
||||
else {
|
||||
if (is_a<Component*>(entity)) {
|
||||
Component* component = (Component*)entity;
|
||||
_netOccurrence = Occurrence(component->GetNet(), occurrence.GetPath());
|
||||
_netOccurrence = Occurrence(component->getNet(), occurrence.getPath());
|
||||
}
|
||||
else
|
||||
throw Error("Can't create " + _TName("HyperNet") + " : bad occurrence entity type");
|
||||
|
@ -271,83 +271,83 @@ HyperNet::HyperNet(const Occurrence& occurrence)
|
|||
}
|
||||
}
|
||||
|
||||
Occurrences HyperNet::GetNetOccurrences(bool doExtraction, bool allowInterruption) const
|
||||
Occurrences HyperNet::getNetOccurrences(bool doExtraction, bool allowInterruption) const
|
||||
// ***********************************************************************************
|
||||
{
|
||||
return HyperNet_NetOccurrences(this, doExtraction, allowInterruption);
|
||||
}
|
||||
|
||||
Occurrences HyperNet::GetNetOccurrencesUnder(Box area, bool doExtraction, bool allowInterruption) const
|
||||
Occurrences HyperNet::getNetOccurrencesUnder(Box area, bool doExtraction, bool allowInterruption) const
|
||||
// **************************************************************************************************
|
||||
{
|
||||
return HyperNet_NetOccurrencesUnder(this, area, doExtraction, allowInterruption);
|
||||
}
|
||||
|
||||
Occurrences HyperNet::GetLeafPlugOccurrences(bool doExtraction, bool allowInterruption) const
|
||||
Occurrences HyperNet::getLeafPlugOccurrences(bool doExtraction, bool allowInterruption) const
|
||||
// ********************************************************************************************
|
||||
{
|
||||
return HyperNet_LeafPlugOccurrences(this, doExtraction, allowInterruption);
|
||||
}
|
||||
|
||||
string HyperNet::_GetString() const
|
||||
string HyperNet::_getString() const
|
||||
// ********************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet");
|
||||
if (IsValid()) s += " " + GetString(_netOccurrence);
|
||||
if (IsValid()) s += " " + getString(_netOccurrence);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* HyperNet::_GetRecord() const
|
||||
Record* HyperNet::_getRecord() const
|
||||
// ***************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
Record* record = new Record(getString(this));
|
||||
if (record) {
|
||||
record->Add(GetSlot("NetOccurrence", &_netOccurrence));
|
||||
record->Add(getSlot("NetOccurrence", &_netOccurrence));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
Occurrence GetHyperNetRootNetOccurrence(const Occurrence& netoccurrence)
|
||||
Occurrence getHyperNetRootNetOccurrence(const Occurrence& netoccurrence)
|
||||
// *********************************************************************
|
||||
{
|
||||
if (!netoccurrence.IsValid())
|
||||
throw Error("GetHyperNetRootNetOccurrence : invalid occurrence");
|
||||
throw Error("getHyperNetRootNetOccurrence : invalid occurrence");
|
||||
|
||||
Net* net = dynamic_cast<Net*>(netoccurrence.GetEntity());
|
||||
Net* net = dynamic_cast<Net*>(netoccurrence.getEntity());
|
||||
if (!net)
|
||||
throw Error("GetHyperNetRootNetOccurrence : not a net occurrence");
|
||||
throw Error("getHyperNetRootNetOccurrence : not a net occurrence");
|
||||
|
||||
if (!net->IsExternal())
|
||||
return netoccurrence;
|
||||
|
||||
Path path = netoccurrence.GetPath();
|
||||
Path path = netoccurrence.getPath();
|
||||
|
||||
if (path.IsEmpty())
|
||||
return netoccurrence;
|
||||
|
||||
Instance* instance = path.GetTailInstance();
|
||||
Instance* instance = path.getTailInstance();
|
||||
|
||||
Plug* plug = instance->GetPlug(net);
|
||||
Plug* plug = instance->getPlug(net);
|
||||
if (!plug)
|
||||
throw Error("GetHyperNetRootNetOccurrence : no plug for external net !");
|
||||
throw Error("getHyperNetRootNetOccurrence : no plug for external net !");
|
||||
|
||||
if(!plug->IsConnected())
|
||||
return netoccurrence;
|
||||
|
||||
return GetHyperNetRootNetOccurrence(Occurrence(plug->GetNet(), path.GetHeadPath()));
|
||||
return getHyperNetRootNetOccurrence(Occurrence(plug->getNet(), path.getHeadPath()));
|
||||
}
|
||||
|
||||
|
||||
bool IsHyperNetRootNetOccurrence(Occurrence netoccurrence)
|
||||
// *******************************************************
|
||||
{
|
||||
Net* net=dynamic_cast<Net*>(netoccurrence.GetEntity());
|
||||
Net* net=dynamic_cast<Net*>(netoccurrence.getEntity());
|
||||
if (!net) return false;
|
||||
if (!net->IsExternal()) return true;
|
||||
if (netoccurrence.GetPath().IsEmpty()) return true;
|
||||
if (netoccurrence.getPath().IsEmpty()) return true;
|
||||
if (net->IsGlobal()) return false;
|
||||
if (!netoccurrence.GetPath().GetTailInstance()->GetPlug(net)->IsConnected())
|
||||
if (!netoccurrence.getPath().getTailInstance()->getPlug(net)->IsConnected())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -394,24 +394,24 @@ HyperNet_NetOccurrences& HyperNet_NetOccurrences::operator=(const HyperNet_NetOc
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Occurrence>* HyperNet_NetOccurrences::GetClone() const
|
||||
Collection<Occurrence>* HyperNet_NetOccurrences::getClone() const
|
||||
// ************************************************************
|
||||
{
|
||||
return new HyperNet_NetOccurrences(*this);
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_NetOccurrences::GetLocator() const
|
||||
Locator<Occurrence>* HyperNet_NetOccurrences::getLocator() const
|
||||
// ***********************************************************
|
||||
{
|
||||
return new Locator(_hyperNet, _doExtraction, _allowInterruption);
|
||||
}
|
||||
|
||||
string HyperNet_NetOccurrences::_GetString() const
|
||||
string HyperNet_NetOccurrences::_getString() const
|
||||
// **********************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::NetOccurrences");
|
||||
if (_hyperNet) {
|
||||
s += " " + GetString(_hyperNet);
|
||||
s += " " + getString(_hyperNet);
|
||||
if (_doExtraction) {
|
||||
s += " DO_EXTRACTION";
|
||||
if (_allowInterruption) s += " ALLOW_INTERRUPTION";
|
||||
|
@ -448,7 +448,7 @@ HyperNet_NetOccurrences::Locator::Locator(const HyperNet* hyperNet, bool doExtra
|
|||
_netOccurrenceStack()
|
||||
{
|
||||
if (_hyperNet) {
|
||||
Occurrence netOccurrence = _hyperNet->GetNetOccurrence();
|
||||
Occurrence netOccurrence = _hyperNet->getNetOccurrence();
|
||||
if (netOccurrence.IsValid()) {
|
||||
_netOccurrenceSet.insert(netOccurrence);
|
||||
_netOccurrenceStack.push(netOccurrence);
|
||||
|
@ -478,13 +478,13 @@ HyperNet_NetOccurrences::Locator& HyperNet_NetOccurrences::Locator::operator=(co
|
|||
return *this;
|
||||
}
|
||||
|
||||
Occurrence HyperNet_NetOccurrences::Locator::GetElement() const
|
||||
Occurrence HyperNet_NetOccurrences::Locator::getElement() const
|
||||
// **********************************************************
|
||||
{
|
||||
return (!_netOccurrenceStack.empty()) ? _netOccurrenceStack.top() : Occurrence();
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_NetOccurrences::Locator::GetClone() const
|
||||
Locator<Occurrence>* HyperNet_NetOccurrences::Locator::getClone() const
|
||||
// ******************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -499,18 +499,18 @@ bool HyperNet_NetOccurrences::Locator::IsValid() const
|
|||
static bool IsConnex(const Occurrence& componentOccurrence1, const Occurrence& componentOccurrence2)
|
||||
// *********************************************************************************************
|
||||
{
|
||||
Component* component1 = (Component*)componentOccurrence1.GetEntity();
|
||||
Component* component2 = (Component*)componentOccurrence2.GetEntity();
|
||||
Layer* layer1 = component1->GetLayer();
|
||||
Layer* layer2 = component2->GetLayer();
|
||||
Component* component1 = (Component*)componentOccurrence1.getEntity();
|
||||
Component* component2 = (Component*)componentOccurrence2.getEntity();
|
||||
Layer* layer1 = component1->getLayer();
|
||||
Layer* layer2 = component2->getLayer();
|
||||
if (layer1->getExtractMask() & layer2->getExtractMask()) {
|
||||
Transformation transformation1 = componentOccurrence1.GetPath().GetTransformation();
|
||||
Transformation transformation2 = componentOccurrence2.GetPath().GetTransformation();
|
||||
Transformation transformation1 = componentOccurrence1.getPath().getTransformation();
|
||||
Transformation transformation2 = componentOccurrence2.getPath().getTransformation();
|
||||
for_each_basic_layer(basicLayer1, layer1->getBasicLayers()) {
|
||||
Box box1 = transformation1.getBox(component1->GetBoundingBox(basicLayer1));
|
||||
Box box1 = transformation1.getBox(component1->getBoundingBox(basicLayer1));
|
||||
for_each_basic_layer(basicLayer2, layer2->getBasicLayers()) {
|
||||
if (basicLayer1->getExtractMask() & basicLayer2->getExtractMask()) {
|
||||
Box box2 = transformation2.getBox(component2->GetBoundingBox(basicLayer2));
|
||||
Box box2 = transformation2.getBox(component2->getBoundingBox(basicLayer2));
|
||||
if (box1.intersect(box2)) return true;
|
||||
}
|
||||
end_for;
|
||||
|
@ -527,22 +527,22 @@ void HyperNet_NetOccurrences::Locator::Progress()
|
|||
if (!_netOccurrenceStack.empty()) {
|
||||
Occurrence netOccurrence = _netOccurrenceStack.top();
|
||||
_netOccurrenceStack.pop();
|
||||
Net* net = (Net*)netOccurrence.GetEntity();
|
||||
Path path = netOccurrence.GetPath();
|
||||
Net* net = (Net*)netOccurrence.getEntity();
|
||||
Path path = netOccurrence.getPath();
|
||||
|
||||
if (_doExtraction) {
|
||||
Cell* cell = netOccurrence.GetOwnerCell();
|
||||
for_each_component(component, net->GetComponents()) {
|
||||
Cell* cell = netOccurrence.getOwnerCell();
|
||||
for_each_component(component, net->getComponents()) {
|
||||
if (!is_a<Plug*>(component)) {
|
||||
//if (_allowInterruption && !((i++) % 200)) gtk_check_for_interruption();
|
||||
Occurrence occurrence = Occurrence(component, path);
|
||||
Box area = occurrence.GetBoundingBox();
|
||||
for_each_occurrence(occurrence2, cell->GetOccurrencesUnder(area)) {
|
||||
if (is_a<Component*>(occurrence2.GetEntity())) {
|
||||
Component* component2 = (Component*)occurrence2.GetEntity();
|
||||
Box area = occurrence.getBoundingBox();
|
||||
for_each_occurrence(occurrence2, cell->getOccurrencesUnder(area)) {
|
||||
if (is_a<Component*>(occurrence2.getEntity())) {
|
||||
Component* component2 = (Component*)occurrence2.getEntity();
|
||||
if (IsConnex(occurrence, occurrence2)) {
|
||||
Occurrence net2Occurrence =
|
||||
Occurrence(component2->GetNet(), occurrence2.GetPath());
|
||||
Occurrence(component2->getNet(), occurrence2.getPath());
|
||||
if (_netOccurrenceSet.find(net2Occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(net2Occurrence);
|
||||
_netOccurrenceStack.push(net2Occurrence);
|
||||
|
@ -556,8 +556,8 @@ void HyperNet_NetOccurrences::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
for_each_plug(plug, net->GetPlugs()) {
|
||||
Occurrence occurrence = Occurrence(plug->GetMasterNet(), Path(path, plug->GetInstance()));
|
||||
for_each_plug(plug, net->getPlugs()) {
|
||||
Occurrence occurrence = Occurrence(plug->getMasterNet(), Path(path, plug->getInstance()));
|
||||
if (_netOccurrenceSet.find(occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(occurrence);
|
||||
_netOccurrenceStack.push(occurrence);
|
||||
|
@ -566,13 +566,13 @@ void HyperNet_NetOccurrences::Locator::Progress()
|
|||
}
|
||||
|
||||
if (net->IsExternal()) {
|
||||
Instance* instance = path.GetTailInstance();
|
||||
Instance* instance = path.getTailInstance();
|
||||
if (instance) {
|
||||
Plug* plug = instance->GetPlug(net);
|
||||
Plug* plug = instance->getPlug(net);
|
||||
if (plug) {
|
||||
Net* net = plug->GetNet();
|
||||
Net* net = plug->getNet();
|
||||
if (net) {
|
||||
Occurrence occurrence = Occurrence(net, path.GetHeadPath());
|
||||
Occurrence occurrence = Occurrence(net, path.getHeadPath());
|
||||
if (_netOccurrenceSet.find(occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(occurrence);
|
||||
_netOccurrenceStack.push(occurrence);
|
||||
|
@ -584,12 +584,12 @@ void HyperNet_NetOccurrences::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
string HyperNet_NetOccurrences::Locator::_GetString() const
|
||||
string HyperNet_NetOccurrences::Locator::_getString() const
|
||||
// *******************************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::NetOccurrences::Locator");
|
||||
if (_hyperNet) {
|
||||
s += " " + GetString(_hyperNet);
|
||||
s += " " + getString(_hyperNet);
|
||||
if (_doExtraction) {
|
||||
s += " DO_EXTRACTION";
|
||||
if (_allowInterruption) s += " ALLOW_INTERRUPTION";
|
||||
|
@ -645,24 +645,24 @@ HyperNet_NetOccurrencesUnder& HyperNet_NetOccurrencesUnder::operator=(const Hype
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Occurrence>* HyperNet_NetOccurrencesUnder::GetClone() const
|
||||
Collection<Occurrence>* HyperNet_NetOccurrencesUnder::getClone() const
|
||||
// *****************************************************************
|
||||
{
|
||||
return new HyperNet_NetOccurrencesUnder(*this);
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_NetOccurrencesUnder::GetLocator() const
|
||||
Locator<Occurrence>* HyperNet_NetOccurrencesUnder::getLocator() const
|
||||
// ****************************************************************
|
||||
{
|
||||
return new Locator(_hyperNet, _area, _doExtraction, _allowInterruption);
|
||||
}
|
||||
|
||||
string HyperNet_NetOccurrencesUnder::_GetString() const
|
||||
string HyperNet_NetOccurrencesUnder::_getString() const
|
||||
// ***************************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::NetOccurrences");
|
||||
if (_hyperNet) {
|
||||
s += " " + GetString(_hyperNet);
|
||||
s += " " + getString(_hyperNet);
|
||||
if (_doExtraction) {
|
||||
s += " DO_EXTRACTION";
|
||||
if (_allowInterruption) s += " ALLOW_INTERRUPTION";
|
||||
|
@ -702,7 +702,7 @@ HyperNet_NetOccurrencesUnder::Locator::Locator(const HyperNet* hyperNet, Box are
|
|||
_netOccurrenceStack()
|
||||
{
|
||||
if (_hyperNet) {
|
||||
Occurrence netOccurrence = _hyperNet->GetNetOccurrence();
|
||||
Occurrence netOccurrence = _hyperNet->getNetOccurrence();
|
||||
if (netOccurrence.IsValid()) {
|
||||
_netOccurrenceSet.insert(netOccurrence);
|
||||
_netOccurrenceStack.push(netOccurrence);
|
||||
|
@ -734,13 +734,13 @@ HyperNet_NetOccurrencesUnder::Locator& HyperNet_NetOccurrencesUnder::Locator::op
|
|||
return *this;
|
||||
}
|
||||
|
||||
Occurrence HyperNet_NetOccurrencesUnder::Locator::GetElement() const
|
||||
Occurrence HyperNet_NetOccurrencesUnder::Locator::getElement() const
|
||||
// ***************************************************************
|
||||
{
|
||||
return (!_netOccurrenceStack.empty()) ? _netOccurrenceStack.top() : Occurrence();
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_NetOccurrencesUnder::Locator::GetClone() const
|
||||
Locator<Occurrence>* HyperNet_NetOccurrencesUnder::Locator::getClone() const
|
||||
// ***********************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -758,14 +758,14 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
|
|||
if (!_netOccurrenceStack.empty()) {
|
||||
Occurrence netOccurrence = _netOccurrenceStack.top();
|
||||
_netOccurrenceStack.pop();
|
||||
Net* net = (Net*)netOccurrence.GetEntity();
|
||||
Path path = netOccurrence.GetPath();
|
||||
Net* net = (Net*)netOccurrence.getEntity();
|
||||
Path path = netOccurrence.getPath();
|
||||
|
||||
if (_doExtraction) {
|
||||
Cell* cell = netOccurrence.GetOwnerCell();
|
||||
for_each_component(component, net->GetComponents()) {
|
||||
Cell* cell = netOccurrence.getOwnerCell();
|
||||
for_each_component(component, net->getComponents()) {
|
||||
Occurrence occurrence = Occurrence(component, path);
|
||||
Box area = occurrence.GetBoundingBox();
|
||||
Box area = occurrence.getBoundingBox();
|
||||
if (! area.intersect (_area)) {
|
||||
// Outside useful area
|
||||
} else if (is_a<Plug*>(component)) {
|
||||
|
@ -775,12 +775,12 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
|
|||
} else {
|
||||
//if (_allowInterruption && !((i++) % 200)) gtk_check_for_interruption();
|
||||
Box under = area.getIntersection (_area);
|
||||
for_each_occurrence(occurrence2, cell->GetOccurrencesUnder(under)) {
|
||||
if (is_a<Component*>(occurrence2.GetEntity())) {
|
||||
Component* component2 = (Component*)occurrence2.GetEntity();
|
||||
for_each_occurrence(occurrence2, cell->getOccurrencesUnder(under)) {
|
||||
if (is_a<Component*>(occurrence2.getEntity())) {
|
||||
Component* component2 = (Component*)occurrence2.getEntity();
|
||||
if (IsConnex(occurrence, occurrence2)) {
|
||||
Occurrence net2Occurrence =
|
||||
Occurrence(component2->GetNet(), occurrence2.GetPath());
|
||||
Occurrence(component2->getNet(), occurrence2.getPath());
|
||||
if (_netOccurrenceSet.find(net2Occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(net2Occurrence);
|
||||
_netOccurrenceStack.push(net2Occurrence);
|
||||
|
@ -794,8 +794,8 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
for_each_plug(plug, net->GetPlugs()) {
|
||||
Occurrence occurrence = Occurrence(plug->GetMasterNet(), Path(path, plug->GetInstance()));
|
||||
for_each_plug(plug, net->getPlugs()) {
|
||||
Occurrence occurrence = Occurrence(plug->getMasterNet(), Path(path, plug->getInstance()));
|
||||
if (_netOccurrenceSet.find(occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(occurrence);
|
||||
_netOccurrenceStack.push(occurrence);
|
||||
|
@ -804,13 +804,13 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
|
|||
}
|
||||
|
||||
if (net->IsExternal()) {
|
||||
Instance* instance = path.GetTailInstance();
|
||||
Instance* instance = path.getTailInstance();
|
||||
if (instance) {
|
||||
Plug* plug = instance->GetPlug(net);
|
||||
Plug* plug = instance->getPlug(net);
|
||||
if (plug) {
|
||||
Net* net = plug->GetNet();
|
||||
Net* net = plug->getNet();
|
||||
if (net) {
|
||||
Occurrence occurrence = Occurrence(net, path.GetHeadPath());
|
||||
Occurrence occurrence = Occurrence(net, path.getHeadPath());
|
||||
if (_netOccurrenceSet.find(occurrence) == _netOccurrenceSet.end()) {
|
||||
_netOccurrenceSet.insert(occurrence);
|
||||
_netOccurrenceStack.push(occurrence);
|
||||
|
@ -822,12 +822,12 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
|
|||
}
|
||||
}
|
||||
|
||||
string HyperNet_NetOccurrencesUnder::Locator::_GetString() const
|
||||
string HyperNet_NetOccurrencesUnder::Locator::_getString() const
|
||||
// ***********************************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::NetOccurrences::Locator");
|
||||
if (_hyperNet) {
|
||||
s += " " + GetString(_hyperNet);
|
||||
s += " " + getString(_hyperNet);
|
||||
if (_doExtraction) {
|
||||
s += " DO_EXTRACTION";
|
||||
if (_allowInterruption) s += " ALLOW_INTERRUPTION";
|
||||
|
@ -877,24 +877,24 @@ HyperNet_LeafPlugOccurrences& HyperNet_LeafPlugOccurrences::operator=(const Hype
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Occurrence>* HyperNet_LeafPlugOccurrences::GetClone() const
|
||||
Collection<Occurrence>* HyperNet_LeafPlugOccurrences::getClone() const
|
||||
// ************************************************************
|
||||
{
|
||||
return new HyperNet_LeafPlugOccurrences(*this);
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_LeafPlugOccurrences::GetLocator() const
|
||||
Locator<Occurrence>* HyperNet_LeafPlugOccurrences::getLocator() const
|
||||
// ***********************************************************
|
||||
{
|
||||
return new Locator(_hyperNet, _doExtraction, _allowInterruption);
|
||||
}
|
||||
|
||||
string HyperNet_LeafPlugOccurrences::_GetString() const
|
||||
string HyperNet_LeafPlugOccurrences::_getString() const
|
||||
// **********************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::LeafPlugOccurrences");
|
||||
if (_hyperNet) {
|
||||
s += " " + GetString(_hyperNet);
|
||||
s += " " + getString(_hyperNet);
|
||||
if (_doExtraction) {
|
||||
s += " DO_EXTRACTION";
|
||||
if (_allowInterruption) s += " ALLOW_INTERRUPTION";
|
||||
|
@ -926,7 +926,7 @@ HyperNet_LeafPlugOccurrences::Locator::Locator(const HyperNet* hyperNet, bool do
|
|||
_plugOccurrence()
|
||||
{
|
||||
if (hyperNet) {
|
||||
_netOccurrenceLocator = hyperNet->GetNetOccurrences(doExtraction,allowInterruption).GetLocator();
|
||||
_netOccurrenceLocator = hyperNet->getNetOccurrences(doExtraction,allowInterruption).getLocator();
|
||||
Progress();
|
||||
}
|
||||
}
|
||||
|
@ -947,13 +947,13 @@ HyperNet_LeafPlugOccurrences::Locator& HyperNet_LeafPlugOccurrences::Locator::op
|
|||
return *this;
|
||||
}
|
||||
|
||||
Occurrence HyperNet_LeafPlugOccurrences::Locator::GetElement() const
|
||||
Occurrence HyperNet_LeafPlugOccurrences::Locator::getElement() const
|
||||
// **********************************************************
|
||||
{
|
||||
return _plugOccurrence;
|
||||
}
|
||||
|
||||
Locator<Occurrence>* HyperNet_LeafPlugOccurrences::Locator::GetClone() const
|
||||
Locator<Occurrence>* HyperNet_LeafPlugOccurrences::Locator::getClone() const
|
||||
// ******************************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -972,25 +972,25 @@ void HyperNet_LeafPlugOccurrences::Locator::Progress()
|
|||
_plugOccurrence = Occurrence();
|
||||
while(_netOccurrenceLocator.IsValid() && !_plugOccurrence.IsValid())
|
||||
{
|
||||
Occurrence netOccurrence = _netOccurrenceLocator.GetElement();
|
||||
Occurrence netOccurrence = _netOccurrenceLocator.getElement();
|
||||
_netOccurrenceLocator.Progress();
|
||||
Net* net = (Net*)netOccurrence.GetEntity();
|
||||
Path path = netOccurrence.GetPath();
|
||||
if (!path.IsEmpty() && net->GetCell()->IsLeaf())
|
||||
Net* net = (Net*)netOccurrence.getEntity();
|
||||
Path path = netOccurrence.getPath();
|
||||
if (!path.IsEmpty() && net->getCell()->IsLeaf())
|
||||
{
|
||||
Instance *instance = path.GetTailInstance();
|
||||
Plug *plug=instance->GetPlug(net);
|
||||
Instance *instance = path.getTailInstance();
|
||||
Plug *plug=instance->getPlug(net);
|
||||
if (plug)
|
||||
_plugOccurrence=Occurrence(plug,path.GetHeadPath());
|
||||
_plugOccurrence=Occurrence(plug,path.getHeadPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string HyperNet_LeafPlugOccurrences::Locator::_GetString() const
|
||||
string HyperNet_LeafPlugOccurrences::Locator::_getString() const
|
||||
// *******************************************************
|
||||
{
|
||||
string s = "<" + _TName("HyperNet::LeafPlugOccurrences::Locator");
|
||||
s += " " + GetString(_netOccurrenceLocator);
|
||||
s += " " + getString(_netOccurrenceLocator);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -41,12 +41,12 @@ class HyperNet {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: const Occurrence& GetNetOccurrence() const {return _netOccurrence;};
|
||||
public: Cell* GetCell() const {return _netOccurrence.GetOwnerCell();};
|
||||
public: Occurrences GetNetOccurrences(bool doExtraction = false, bool allowInterruption = false) const;
|
||||
public: Occurrences GetNetOccurrencesUnder(Box area, bool doExtraction = false,
|
||||
public: const Occurrence& getNetOccurrence() const {return _netOccurrence;};
|
||||
public: Cell* getCell() const {return _netOccurrence.getOwnerCell();};
|
||||
public: Occurrences getNetOccurrences(bool doExtraction = false, bool allowInterruption = false) const;
|
||||
public: Occurrences getNetOccurrencesUnder(Box area, bool doExtraction = false,
|
||||
bool allowInterruption = false) const;
|
||||
public: Occurrences GetLeafPlugOccurrences(bool doExtraction = false , bool allowInterruption = false) const;
|
||||
public: Occurrences getLeafPlugOccurrences(bool doExtraction = false , bool allowInterruption = false) const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -56,13 +56,13 @@ class HyperNet {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string _GetTypeName() const { return _TName("HyperNet"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("HyperNet"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
Occurrence GetHyperNetRootNetOccurrence(const Occurrence& netoccurrence);
|
||||
Occurrence getHyperNetRootNetOccurrence(const Occurrence& netoccurrence);
|
||||
|
||||
bool IsHyperNetRootNetOccurrence(Occurrence netoccurrence);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class Instance_IsUnderFilter : public Filter<Instance*> {
|
|||
return *this;
|
||||
};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const
|
||||
public: virtual Filter<Instance*>* getClone() const
|
||||
// ************************************************
|
||||
{
|
||||
return new Instance_IsUnderFilter(*this);
|
||||
|
@ -53,13 +53,13 @@ class Instance_IsUnderFilter : public Filter<Instance*> {
|
|||
public: virtual bool Accept(Instance* instance) const
|
||||
// **************************************************
|
||||
{
|
||||
return _area.intersect(instance->GetBoundingBox());
|
||||
return _area.intersect(instance->getBoundingBox());
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
return "<" + _TName("Instance::IsUnderFilter") + " " + GetString(_area) + ">";
|
||||
return "<" + _TName("Instance::IsUnderFilter") + " " + getString(_area) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -73,11 +73,11 @@ class Instance_IsTerminalFilter : public Filter<Instance*> {
|
|||
|
||||
public: Instance_IsTerminalFilter& operator=(const Instance_IsTerminalFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const {return new Instance_IsTerminalFilter(*this);};
|
||||
public: virtual Filter<Instance*>* getClone() const {return new Instance_IsTerminalFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Instance* instance) const {return instance->IsTerminal();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Instance::IsTerminalFilter") + ">";};
|
||||
public: virtual string _getString() const {return "<" + _TName("Instance::IsTerminalFilter") + ">";};
|
||||
|
||||
};
|
||||
|
||||
|
@ -90,11 +90,11 @@ class Instance_IsLeafFilter : public Filter<Instance*> {
|
|||
|
||||
public: Instance_IsLeafFilter& operator=(const Instance_IsLeafFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const {return new Instance_IsLeafFilter(*this);};
|
||||
public: virtual Filter<Instance*>* getClone() const {return new Instance_IsLeafFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Instance* instance) const {return instance->IsLeaf();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Instance::IsLeafFilter") + ">";};
|
||||
public: virtual string _getString() const {return "<" + _TName("Instance::IsLeafFilter") + ">";};
|
||||
|
||||
};
|
||||
|
||||
|
@ -107,11 +107,11 @@ class Instance_IsUnplacedFilter : public Filter<Instance*> {
|
|||
|
||||
public: Instance_IsUnplacedFilter& operator=(const Instance_IsUnplacedFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const {return new Instance_IsUnplacedFilter(*this);};
|
||||
public: virtual Filter<Instance*>* getClone() const {return new Instance_IsUnplacedFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Instance* instance) const {return instance->IsUnplaced();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsUnplacedFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsUnplacedFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -124,11 +124,11 @@ class Instance_IsPlacedFilter : public Filter<Instance*> {
|
|||
|
||||
public: Instance_IsPlacedFilter& operator=(const Instance_IsPlacedFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const {return new Instance_IsPlacedFilter(*this);};
|
||||
public: virtual Filter<Instance*>* getClone() const {return new Instance_IsPlacedFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Instance* instance) const {return instance->IsPlaced();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsPlacedFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsPlacedFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -141,11 +141,11 @@ class Instance_IsFixedFilter : public Filter<Instance*> {
|
|||
|
||||
public: Instance_IsFixedFilter& operator=(const Instance_IsFixedFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Instance*>* GetClone() const {return new Instance_IsFixedFilter(*this);};
|
||||
public: virtual Filter<Instance*>* getClone() const {return new Instance_IsFixedFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Instance* instance) const {return instance->IsFixed();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsFixedFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsFixedFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -172,7 +172,7 @@ Instance::Instance(Cell* cell, const Name& name, Cell* masterCell, const Transfo
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't create " + _TName("Instance") + " : empty name");
|
||||
|
||||
if (_cell->GetInstance(_name))
|
||||
if (_cell->getInstance(_name))
|
||||
throw Error("Can't create " + _TName("Instance") + " : already exists");
|
||||
|
||||
if (!_masterCell)
|
||||
|
@ -188,7 +188,7 @@ Instance* Instance::Create(Cell* cell, const Name& name, Cell* masterCell, bool
|
|||
Instance* instance =
|
||||
new Instance(cell, name, masterCell, Transformation(), PlacementStatus(), secureFlag);
|
||||
|
||||
instance->_PostCreate();
|
||||
instance->_postCreate();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
@ -199,90 +199,90 @@ Instance* Instance::Create(Cell* cell, const Name& name, Cell* masterCell, const
|
|||
Instance* instance =
|
||||
new Instance(cell, name, masterCell, transformation, placementstatus, secureFlag);
|
||||
|
||||
instance->_PostCreate();
|
||||
instance->_postCreate();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
Box Instance::GetBoundingBox() const
|
||||
Box Instance::getBoundingBox() const
|
||||
// *********************************
|
||||
{
|
||||
return _transformation.getBox(_masterCell->GetBoundingBox());
|
||||
return _transformation.getBox(_masterCell->getBoundingBox());
|
||||
}
|
||||
|
||||
Plugs Instance::GetConnectedPlugs() const
|
||||
Plugs Instance::getConnectedPlugs() const
|
||||
// **************************************
|
||||
{
|
||||
return GetPlugs().GetSubSet(Plug::GetIsConnectedFilter());
|
||||
return getPlugs().getSubSet(Plug::getIsConnectedFilter());
|
||||
}
|
||||
|
||||
Plugs Instance::GetUnconnectedPlugs() const
|
||||
Plugs Instance::getUnconnectedPlugs() const
|
||||
// ****************************************
|
||||
{
|
||||
return GetPlugs().GetSubSet(Plug::GetIsUnconnectedFilter());
|
||||
return getPlugs().getSubSet(Plug::getIsUnconnectedFilter());
|
||||
}
|
||||
|
||||
Path Instance::GetPath(const Path& tailPath) const
|
||||
Path Instance::getPath(const Path& tailPath) const
|
||||
// ***********************************************
|
||||
{
|
||||
return Path((Instance*)this, tailPath);
|
||||
}
|
||||
|
||||
Box Instance::GetAbutmentBox() const
|
||||
Box Instance::getAbutmentBox() const
|
||||
// *********************************
|
||||
{
|
||||
return _transformation.getBox(_masterCell->GetAbutmentBox());
|
||||
return _transformation.getBox(_masterCell->getAbutmentBox());
|
||||
}
|
||||
|
||||
bool Instance::IsTerminal() const
|
||||
// ******************************
|
||||
{
|
||||
return GetMasterCell()->IsTerminal();
|
||||
return getMasterCell()->IsTerminal();
|
||||
}
|
||||
|
||||
bool Instance::IsLeaf() const
|
||||
// **************************
|
||||
{
|
||||
return GetMasterCell()->IsLeaf();
|
||||
return getMasterCell()->IsLeaf();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsUnderFilter(const Box& area)
|
||||
InstanceFilter Instance::getIsUnderFilter(const Box& area)
|
||||
// *******************************************************
|
||||
{
|
||||
return Instance_IsUnderFilter(area);
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsTerminalFilter()
|
||||
InstanceFilter Instance::getIsTerminalFilter()
|
||||
// *******************************************
|
||||
{
|
||||
return Instance_IsTerminalFilter();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsLeafFilter()
|
||||
InstanceFilter Instance::getIsLeafFilter()
|
||||
// *******************************************
|
||||
{
|
||||
return Instance_IsLeafFilter();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsUnplacedFilter()
|
||||
InstanceFilter Instance::getIsUnplacedFilter()
|
||||
// *******************************************
|
||||
{
|
||||
return Instance_IsUnplacedFilter();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsPlacedFilter()
|
||||
InstanceFilter Instance::getIsPlacedFilter()
|
||||
// *****************************************
|
||||
{
|
||||
return Instance_IsPlacedFilter();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsFixedFilter()
|
||||
InstanceFilter Instance::getIsFixedFilter()
|
||||
// ****************************************
|
||||
{
|
||||
return Instance_IsFixedFilter();
|
||||
}
|
||||
|
||||
InstanceFilter Instance::GetIsNotUnplacedFilter()
|
||||
InstanceFilter Instance::getIsNotUnplacedFilter()
|
||||
// **********************************************
|
||||
{
|
||||
return !Instance_IsUnplacedFilter();
|
||||
|
@ -292,11 +292,11 @@ void Instance::Materialize()
|
|||
// *************************
|
||||
{
|
||||
if (!IsMaterialized()) {
|
||||
Box boundingBox = GetBoundingBox();
|
||||
Box boundingBox = getBoundingBox();
|
||||
if (!boundingBox.isEmpty()) {
|
||||
QuadTree* quadTree = _cell->_GetQuadTree();
|
||||
QuadTree* quadTree = _cell->_getQuadTree();
|
||||
quadTree->Insert(this);
|
||||
_cell->_Fit(quadTree->GetBoundingBox());
|
||||
_cell->_Fit(quadTree->getBoundingBox());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -305,8 +305,8 @@ void Instance::Unmaterialize()
|
|||
// ***************************
|
||||
{
|
||||
if (IsMaterialized()) {
|
||||
_cell->_Unfit(GetBoundingBox());
|
||||
_cell->_GetQuadTree()->Remove(this);
|
||||
_cell->_Unfit(getBoundingBox());
|
||||
_cell->_getQuadTree()->Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void Instance::Invalidate(bool propagateFlag)
|
|||
Inherit::Invalidate(false);
|
||||
|
||||
if (propagateFlag) {
|
||||
for_each_plug(plug, GetConnectedPlugs()) {
|
||||
for_each_plug(plug, getConnectedPlugs()) {
|
||||
plug->Invalidate(true);
|
||||
end_for;
|
||||
}
|
||||
|
@ -342,12 +342,12 @@ void Instance::SetName(const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't change instance name : empty name");
|
||||
|
||||
if (_cell->GetInstance(name))
|
||||
if (_cell->getInstance(name))
|
||||
throw Error("Can't change instance name : already exists");
|
||||
|
||||
_cell->_GetInstanceMap()._Remove(this);
|
||||
_cell->_getInstanceMap()._Remove(this);
|
||||
_name = name;
|
||||
_cell->_GetInstanceMap()._Insert(this);
|
||||
_cell->_getInstanceMap()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,8 +382,8 @@ void Instance::SetMasterCell(Cell* masterCell, bool secureFlag)
|
|||
|
||||
list<Plug*> connectedPlugList;
|
||||
list<Net*> masterNetList;
|
||||
for_each_plug(plug, GetConnectedPlugs()) {
|
||||
Net* masterNet = masterCell->GetNet(plug->GetMasterNet()->GetName());
|
||||
for_each_plug(plug, getConnectedPlugs()) {
|
||||
Net* masterNet = masterCell->getNet(plug->getMasterNet()->getName());
|
||||
if (!masterNet || !masterNet->IsExternal())
|
||||
throw Error("Can't set master (bad master net matching)");
|
||||
connectedPlugList.push_back(plug);
|
||||
|
@ -391,8 +391,8 @@ void Instance::SetMasterCell(Cell* masterCell, bool secureFlag)
|
|||
end_for;
|
||||
}
|
||||
|
||||
for_each_shared_path(sharedPath, _GetSharedPathes()) {
|
||||
if (!sharedPath->GetTailSharedPath())
|
||||
for_each_shared_path(sharedPath, _getSharedPathes()) {
|
||||
if (!sharedPath->getTailSharedPath())
|
||||
// if the tail is empty the SharedPath isn't impacted by the change
|
||||
delete sharedPath;
|
||||
end_for;
|
||||
|
@ -400,8 +400,8 @@ void Instance::SetMasterCell(Cell* masterCell, bool secureFlag)
|
|||
|
||||
Invalidate(true);
|
||||
|
||||
for_each_plug(plug, GetUnconnectedPlugs()) {
|
||||
plug->_Delete();
|
||||
for_each_plug(plug, getUnconnectedPlugs()) {
|
||||
plug->_destroy();
|
||||
end_for;
|
||||
}
|
||||
|
||||
|
@ -415,67 +415,67 @@ void Instance::SetMasterCell(Cell* masterCell, bool secureFlag)
|
|||
masterNetList.pop_front();
|
||||
}
|
||||
|
||||
_masterCell->_GetSlaveInstanceSet()._Remove(this);
|
||||
_masterCell->_getSlaveInstanceSet()._Remove(this);
|
||||
_masterCell = masterCell;
|
||||
_masterCell->_GetSlaveInstanceSet()._Insert(this);
|
||||
_masterCell->_getSlaveInstanceSet()._Insert(this);
|
||||
|
||||
for_each_net(externalNet, _masterCell->GetExternalNets()) {
|
||||
if (!GetPlug(externalNet)) Plug::_Create(this, externalNet);
|
||||
for_each_net(externalNet, _masterCell->getExternalNets()) {
|
||||
if (!getPlug(externalNet)) Plug::_Create(this, externalNet);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Instance::_PostCreate()
|
||||
void Instance::_postCreate()
|
||||
// *************************
|
||||
{
|
||||
_cell->_GetInstanceMap()._Insert(this);
|
||||
_masterCell->_GetSlaveInstanceSet()._Insert(this);
|
||||
_cell->_getInstanceMap()._Insert(this);
|
||||
_masterCell->_getSlaveInstanceSet()._Insert(this);
|
||||
|
||||
for_each_net(externalNet, _masterCell->GetExternalNets()) {
|
||||
for_each_net(externalNet, _masterCell->getExternalNets()) {
|
||||
Plug::_Create(this, externalNet);
|
||||
end_for;
|
||||
}
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Instance::_PreDelete()
|
||||
void Instance::_preDestroy()
|
||||
// ************************
|
||||
{
|
||||
for_each_shared_path(sharedPath, _GetSharedPathes()) delete sharedPath; end_for;
|
||||
for_each_shared_path(sharedPath, _getSharedPathes()) delete sharedPath; end_for;
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
for_each_plug(plug, GetPlugs()) plug->_Delete(); end_for;
|
||||
for_each_plug(plug, getPlugs()) plug->_destroy(); end_for;
|
||||
|
||||
_masterCell->_GetSlaveInstanceSet()._Remove(this);
|
||||
_cell->_GetInstanceMap()._Remove(this);
|
||||
_masterCell->_getSlaveInstanceSet()._Remove(this);
|
||||
_cell->_getInstanceMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Instance::_GetString() const
|
||||
string Instance::_getString() const
|
||||
// ********************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
s.insert(s.length() - 1, " " + GetString(_masterCell->GetName()));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
s.insert(s.length() - 1, " " + getString(_masterCell->getName()));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Instance::_GetRecord() const
|
||||
Record* Instance::_getRecord() const
|
||||
// ***************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Cell", _cell));
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("MasterCell", _masterCell));
|
||||
record->Add(GetSlot("Transformation", &_transformation));
|
||||
record->Add(GetSlot("PlacementStatus", _placementStatus));
|
||||
record->Add(GetSlot("XCenter", GetValue(GetAbutmentBox().getXCenter())));
|
||||
record->Add(GetSlot("YCenter", GetValue(GetAbutmentBox().getYCenter())));
|
||||
record->Add(GetSlot("Plugs", &_plugMap));
|
||||
record->Add(GetSlot("SharedPathes", &_sharedPathMap));
|
||||
record->Add(getSlot("Cell", _cell));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("MasterCell", _masterCell));
|
||||
record->Add(getSlot("Transformation", &_transformation));
|
||||
record->Add(getSlot("PlacementStatus", _placementStatus));
|
||||
record->Add(getSlot("XCenter", getValue(getAbutmentBox().getXCenter())));
|
||||
record->Add(getSlot("YCenter", getValue(getAbutmentBox().getYCenter())));
|
||||
record->Add(getSlot("Plugs", &_plugMap));
|
||||
record->Add(getSlot("SharedPathes", &_sharedPathMap));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -483,11 +483,11 @@ Record* Instance::_GetRecord() const
|
|||
//void Instance::_DrawPhantoms(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// **************************************************************************************************
|
||||
//{
|
||||
// Symbol* symbol = _masterCell->GetSymbol();
|
||||
// Symbol* symbol = _masterCell->getSymbol();
|
||||
// if (!symbol) {
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// _masterCell->_DrawPhantoms(view, masterArea, masterTransformation);
|
||||
// }
|
||||
|
@ -498,13 +498,13 @@ Record* Instance::_GetRecord() const
|
|||
//{
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// Symbol* symbol = _masterCell->GetSymbol();
|
||||
// Symbol* symbol = _masterCell->getSymbol();
|
||||
// if (!symbol)
|
||||
// _masterCell->_DrawBoundaries(view, masterArea, masterTransformation);
|
||||
// else
|
||||
// _masterCell->GetSymbol()->_Draw(view, masterArea, masterTransformation);
|
||||
// _masterCell->getSymbol()->_Draw(view, masterArea, masterTransformation);
|
||||
//}
|
||||
//
|
||||
//void Instance::_DrawRubbers(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
|
@ -512,7 +512,7 @@ Record* Instance::_GetRecord() const
|
|||
//{
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// _masterCell->_DrawRubbers(view, masterArea, masterTransformation);
|
||||
//}
|
||||
|
@ -522,7 +522,7 @@ Record* Instance::_GetRecord() const
|
|||
//{
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// _masterCell->_DrawMarkers(view, masterArea, masterTransformation);
|
||||
//}
|
||||
|
@ -532,7 +532,7 @@ Record* Instance::_GetRecord() const
|
|||
//{
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// _masterCell->_DrawDisplaySlots(view, area, masterArea, masterTransformation);
|
||||
//}
|
||||
|
@ -540,13 +540,13 @@ Record* Instance::_GetRecord() const
|
|||
//bool Instance::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const
|
||||
//// ****************************************************************************************
|
||||
//{
|
||||
// Symbol* symbol = _masterCell->GetSymbol();
|
||||
// Symbol* symbol = _masterCell->getSymbol();
|
||||
// if (!symbol)
|
||||
// return (view->PhantomsAreVisible() || view->BoundariesAreVisible()) &&
|
||||
// GetAbutmentBox().intersect(Box(point).Inflate(aperture));
|
||||
// getAbutmentBox().intersect(Box(point).Inflate(aperture));
|
||||
// else {
|
||||
// Point masterPoint = point;
|
||||
// _transformation.GetInvert().ApplyOn(masterPoint);
|
||||
// _transformation.getInvert().ApplyOn(masterPoint);
|
||||
// return (view->BoundariesAreVisible() && symbol->_IsInterceptedBy(view, masterPoint, aperture));
|
||||
// }
|
||||
//}
|
||||
|
@ -554,11 +554,11 @@ Record* Instance::_GetRecord() const
|
|||
//void Instance::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
|
||||
//// ****************************************************************************************************
|
||||
//{
|
||||
// Symbol* symbol = _masterCell->GetSymbol();
|
||||
// Symbol* symbol = _masterCell->getSymbol();
|
||||
// if (!symbol) {
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// _masterCell->_DrawContent(view, basicLayer, masterArea, masterTransformation);
|
||||
// }
|
||||
|
@ -567,27 +567,27 @@ Record* Instance::_GetRecord() const
|
|||
//void Instance::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// ***********************************************************************************************
|
||||
//{
|
||||
// Symbol* symbol = _masterCell->GetSymbol();
|
||||
// Symbol* symbol = _masterCell->getSymbol();
|
||||
// if (!symbol) {
|
||||
// Box abutmentBox = transformation.GetBox(GetAbutmentBox());
|
||||
// Box abutmentBox = transformation.getBox(getAbutmentBox());
|
||||
// view->FillRectangle(abutmentBox);
|
||||
// view->DrawRectangle(abutmentBox);
|
||||
//
|
||||
// if ( view->GetScale() > 1 )
|
||||
// if ( view->getScale() > 1 )
|
||||
// {
|
||||
// if ( view->IsTextVisible() )
|
||||
// {
|
||||
// string text = GetString ( _name ) + " ("
|
||||
// + GetString ( GetValue ( abutmentBox.GetXCenter () ) ) + ","
|
||||
// + GetString ( GetValue ( abutmentBox.GetYCenter () ) ) + ")";
|
||||
// view->DrawString ( text, abutmentBox.GetXMin(), abutmentBox.GetYMax() );
|
||||
// string text = getString ( _name ) + " ("
|
||||
// + getString ( getValue ( abutmentBox.getXCenter () ) ) + ","
|
||||
// + getString ( getValue ( abutmentBox.getYCenter () ) ) + ")";
|
||||
// view->DrawString ( text, abutmentBox.getXMin(), abutmentBox.getYMax() );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// Box masterArea = updateArea;
|
||||
// Transformation masterTransformation = _transformation;
|
||||
// _transformation.GetInvert().ApplyOn(masterArea);
|
||||
// _transformation.getInvert().ApplyOn(masterArea);
|
||||
// transformation.ApplyOn(masterTransformation);
|
||||
// symbol->_Highlight(view, masterArea, masterTransformation);
|
||||
// }
|
||||
|
@ -604,22 +604,22 @@ Instance::PlugMap::PlugMap()
|
|||
{
|
||||
}
|
||||
|
||||
const Net* Instance::PlugMap::_GetKey(Plug* plug) const
|
||||
const Net* Instance::PlugMap::_getKey(Plug* plug) const
|
||||
// ****************************************************
|
||||
{
|
||||
return plug->GetMasterNet();
|
||||
return plug->getMasterNet();
|
||||
}
|
||||
|
||||
unsigned Instance::PlugMap::_GetHashValue(const Net* masterNet) const
|
||||
unsigned Instance::PlugMap::_getHashValue(const Net* masterNet) const
|
||||
// ******************************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)masterNet ) ) / 8;
|
||||
}
|
||||
|
||||
Plug* Instance::PlugMap::_GetNextElement(Plug* plug) const
|
||||
Plug* Instance::PlugMap::_getNextElement(Plug* plug) const
|
||||
// *******************************************************
|
||||
{
|
||||
return plug->_GetNextOfInstancePlugMap();
|
||||
return plug->_getNextOfInstancePlugMap();
|
||||
}
|
||||
|
||||
void Instance::PlugMap::_SetNextElement(Plug* plug, Plug* nextPlug) const
|
||||
|
@ -640,22 +640,22 @@ Instance::SharedPathMap::SharedPathMap()
|
|||
{
|
||||
}
|
||||
|
||||
const SharedPath* Instance::SharedPathMap::_GetKey(SharedPath* sharedPath) const
|
||||
const SharedPath* Instance::SharedPathMap::_getKey(SharedPath* sharedPath) const
|
||||
// *****************************************************************************
|
||||
{
|
||||
return sharedPath->GetTailSharedPath();
|
||||
return sharedPath->getTailSharedPath();
|
||||
}
|
||||
|
||||
unsigned Instance::SharedPathMap::_GetHashValue(const SharedPath* tailSharedPath) const
|
||||
unsigned Instance::SharedPathMap::_getHashValue(const SharedPath* tailSharedPath) const
|
||||
// ************************************************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)tailSharedPath ) ) / 8;
|
||||
}
|
||||
|
||||
SharedPath* Instance::SharedPathMap::_GetNextElement(SharedPath* sharedPath) const
|
||||
SharedPath* Instance::SharedPathMap::_getNextElement(SharedPath* sharedPath) const
|
||||
// *******************************************************************************
|
||||
{
|
||||
return sharedPath->_GetNextOfInstanceSharedPathMap();
|
||||
return sharedPath->_getNextOfInstanceSharedPathMap();
|
||||
}
|
||||
|
||||
void Instance::SharedPathMap::_SetNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath) const
|
||||
|
@ -687,17 +687,17 @@ Instance::PlacementStatus& Instance::PlacementStatus::operator=(const PlacementS
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Instance::PlacementStatus::_GetString() const
|
||||
string Instance::PlacementStatus::_getString() const
|
||||
// *************************************************
|
||||
{
|
||||
return GetString(&_code);
|
||||
return getString(&_code);
|
||||
}
|
||||
|
||||
Record* Instance::PlacementStatus::_GetRecord() const
|
||||
Record* Instance::PlacementStatus::_getRecord() const
|
||||
// ********************************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", &_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", &_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
// 21-10-2003 Alignment BULL-LIP6
|
||||
|
||||
#ifndef HURRICANE_INSTANCE
|
||||
#define HURRICANE_INSTANCE
|
||||
|
@ -48,11 +47,11 @@ class Instance : public Go {
|
|||
|
||||
public: operator const Code&() const {return _code;};
|
||||
|
||||
public: const Code& GetCode() const {return _code;};
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Instance::PlacementStatus"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Instance::PlacementStatus"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -63,9 +62,9 @@ class Instance : public Go {
|
|||
|
||||
public: PlugMap();
|
||||
|
||||
public: virtual const Net* _GetKey(Plug* plug) const;
|
||||
public: virtual unsigned _GetHashValue(const Net* masterNet) const;
|
||||
public: virtual Plug* _GetNextElement(Plug* plug) const;
|
||||
public: virtual const Net* _getKey(Plug* plug) const;
|
||||
public: virtual unsigned _getHashValue(const Net* masterNet) const;
|
||||
public: virtual Plug* _getNextElement(Plug* plug) const;
|
||||
public: virtual void _SetNextElement(Plug* plug, Plug* nextPlug) const;
|
||||
|
||||
};
|
||||
|
@ -77,9 +76,9 @@ class Instance : public Go {
|
|||
|
||||
public: SharedPathMap();
|
||||
|
||||
public: virtual const SharedPath* _GetKey(SharedPath* sharedPath) const;
|
||||
public: virtual unsigned _GetHashValue(const SharedPath* tailSharedPath) const;
|
||||
public: virtual SharedPath* _GetNextElement(SharedPath* sharedPath) const;
|
||||
public: virtual const SharedPath* _getKey(SharedPath* sharedPath) const;
|
||||
public: virtual unsigned _getHashValue(const SharedPath* tailSharedPath) const;
|
||||
public: virtual SharedPath* _getNextElement(SharedPath* sharedPath) const;
|
||||
public: virtual void _SetNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath) const;
|
||||
|
||||
};
|
||||
|
@ -108,18 +107,18 @@ class Instance : public Go {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const {return _cell;};
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: Cell* GetMasterCell() const {return _masterCell;};
|
||||
public: const Transformation& GetTransformation() const {return _transformation;};
|
||||
public: const PlacementStatus& GetPlacementStatus() const {return _placementStatus;};
|
||||
public: Plug* GetPlug(const Net* masterNet) const {return _plugMap.GetElement(masterNet);};
|
||||
public: Plugs GetPlugs() const {return _plugMap.GetElements();};
|
||||
public: Plugs GetConnectedPlugs() const;
|
||||
public: Plugs GetUnconnectedPlugs() const;
|
||||
public: Path GetPath(const Path& tailPath = Path()) const;
|
||||
public: Box GetAbutmentBox() const;
|
||||
public: virtual Cell* getCell() const {return _cell;};
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: Cell* getMasterCell() const {return _masterCell;};
|
||||
public: const Transformation& getTransformation() const {return _transformation;};
|
||||
public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
|
||||
public: Plug* getPlug(const Net* masterNet) const {return _plugMap.getElement(masterNet);};
|
||||
public: Plugs getPlugs() const {return _plugMap.getElements();};
|
||||
public: Plugs getConnectedPlugs() const;
|
||||
public: Plugs getUnconnectedPlugs() const;
|
||||
public: Path getPath(const Path& tailPath = Path()) const;
|
||||
public: Box getAbutmentBox() const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -133,13 +132,13 @@ class Instance : public Go {
|
|||
// Filters
|
||||
// *******
|
||||
|
||||
public: static InstanceFilter GetIsUnderFilter(const Box& area);
|
||||
public: static InstanceFilter GetIsTerminalFilter();
|
||||
public: static InstanceFilter GetIsLeafFilter();
|
||||
public: static InstanceFilter GetIsUnplacedFilter();
|
||||
public: static InstanceFilter GetIsPlacedFilter();
|
||||
public: static InstanceFilter GetIsFixedFilter();
|
||||
public: static InstanceFilter GetIsNotUnplacedFilter();
|
||||
public: static InstanceFilter getIsUnderFilter(const Box& area);
|
||||
public: static InstanceFilter getIsTerminalFilter();
|
||||
public: static InstanceFilter getIsLeafFilter();
|
||||
public: static InstanceFilter getIsUnplacedFilter();
|
||||
public: static InstanceFilter getIsPlacedFilter();
|
||||
public: static InstanceFilter getIsFixedFilter();
|
||||
public: static InstanceFilter getIsNotUnplacedFilter();
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -157,33 +156,23 @@ class Instance : public Go {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Instance");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: PlugMap& _GetPlugMap() {return _plugMap;};
|
||||
public: SharedPath* _GetSharedPath(const SharedPath* tailSharedPath) const {return _sharedPathMap.GetElement(tailSharedPath);}
|
||||
public: SharedPathes _GetSharedPathes() const {return _sharedPathMap.GetElements();};
|
||||
public: SharedPathMap& _GetSharedPathMap() {return _sharedPathMap;};
|
||||
public: Instance* _GetNextOfCellInstanceMap() const {return _nextOfCellInstanceMap;};
|
||||
public: Instance* _GetNextOfCellSlaveInstanceSet() const {return _nextOfCellSlaveInstanceSet;};
|
||||
public: virtual string _getTypeName() const {return _TName("Instance");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: PlugMap& _getPlugMap() {return _plugMap;};
|
||||
public: SharedPath* _getSharedPath(const SharedPath* tailSharedPath) const {return _sharedPathMap.getElement(tailSharedPath);}
|
||||
public: SharedPathes _getSharedPathes() const {return _sharedPathMap.getElements();};
|
||||
public: SharedPathMap& _getSharedPathMap() {return _sharedPathMap;};
|
||||
public: Instance* _getNextOfCellInstanceMap() const {return _nextOfCellInstanceMap;};
|
||||
public: Instance* _getNextOfCellSlaveInstanceSet() const {return _nextOfCellSlaveInstanceSet;};
|
||||
|
||||
public: void _SetNextOfCellInstanceMap(Instance* instance) {_nextOfCellInstanceMap = instance;};
|
||||
public: void _SetNextOfCellSlaveInstanceSet(Instance* instance) {_nextOfCellSlaveInstanceSet = instance;};
|
||||
|
||||
//public: void _DrawPhantoms(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
//public: void _DrawBoundaries(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
//public: void _DrawRubbers(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
//public: void _DrawMarkers(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
//public: void _DrawDisplaySlots(View* view, const Box& area, const Box& updateArea, const Transformation& transformation);
|
||||
|
||||
//public: virtual bool _IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const;
|
||||
//public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation);
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -213,8 +202,8 @@ template<>
|
|||
inline Record* ProxyRecord <Instance::PlacementStatus::Code>
|
||||
( const Instance::PlacementStatus::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Instance*> InstanceFilter;
|
|||
#define for_each_instance(instance, instances)\
|
||||
/*********************************************/\
|
||||
{\
|
||||
InstanceLocator _locator = instances.GetLocator();\
|
||||
InstanceLocator _locator = instances.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Instance* instance = _locator.GetElement();\
|
||||
Instance* instance = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ Interruption& Interruption::operator=(const Interruption& interruption)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Interruption::_GetString() const
|
||||
string Interruption::_getString() const
|
||||
// ************************************
|
||||
{
|
||||
if (!_code) return "[INTERRUPTION] " + _reason;
|
||||
|
||||
return "[INTERRUPTION:" + GetString(_code) + "] " + _reason;
|
||||
return "[INTERRUPTION:" + getString(_code) + "] " + _reason;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,14 +46,14 @@ class Interruption : public Exception {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: string GetReason() const {return _reason;};
|
||||
public: int GetCode() const {return _code;};
|
||||
public: string getReason() const {return _reason;};
|
||||
public: int getCode() const {return _code;};
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const { return _TName("Interruption"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getTypeName() const { return _TName("Interruption"); };
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -66,14 +66,14 @@ bool Interval::operator!=(const Interval& interval) const
|
|||
return IsEmpty() || interval.IsEmpty() || (_vMin != interval._vMin) || (_vMax != interval._vMax);
|
||||
}
|
||||
|
||||
Interval Interval::GetUnion(const Interval& interval) const
|
||||
Interval Interval::getUnion(const Interval& interval) const
|
||||
// ********************************************************
|
||||
{
|
||||
if (IsEmpty() && interval.IsEmpty()) return Interval();
|
||||
return Interval(min(_vMin, interval._vMin), max(_vMax, interval._vMax));
|
||||
}
|
||||
|
||||
Interval Interval::GetIntersection(const Interval& interval) const
|
||||
Interval Interval::getIntersection(const Interval& interval) const
|
||||
// ***************************************************************
|
||||
{
|
||||
if (!Intersect(interval)) return Interval();
|
||||
|
@ -129,7 +129,7 @@ bool Interval::IsConstrainedBy(const Interval& interval) const
|
|||
{
|
||||
return (!IsEmpty() &&
|
||||
!interval.IsEmpty() &&
|
||||
((_vMin == interval.GetVMin()) || (_vMax == interval.GetVMax())));
|
||||
((_vMin == interval.getVMin()) || (_vMax == interval.getVMax())));
|
||||
}
|
||||
|
||||
Interval& Interval::MakeEmpty()
|
||||
|
@ -208,18 +208,18 @@ Interval& Interval::Translate(const Unit& dv)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Interval::_GetString() const
|
||||
string Interval::_getString() const
|
||||
// ********************************
|
||||
{
|
||||
return "<" + _TName("Interval") + " " + GetValueString(_vMin) + " " + GetValueString(_vMax) + ">";
|
||||
return "<" + _TName("Interval") + " " + getValueString(_vMin) + " " + getValueString(_vMax) + ">";
|
||||
}
|
||||
|
||||
Record* Interval::_GetRecord() const
|
||||
Record* Interval::_getRecord() const
|
||||
// ***************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("VMin", &_vMin));
|
||||
record->Add(GetSlot("VMin", &_vMax));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("VMin", &_vMin));
|
||||
record->Add(getSlot("VMin", &_vMax));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,15 +45,15 @@ class Interval {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: const Unit& GetVMin() const {return _vMin;};
|
||||
public: const Unit& GetVMax() const {return _vMax;};
|
||||
public: Unit& GetVMin() {return _vMin;};
|
||||
public: Unit& GetVMax() {return _vMax;};
|
||||
public: Unit GetCenter() const {return ((_vMin + _vMax) / 2);};
|
||||
public: Unit GetSize() const {return (_vMax - _vMin);};
|
||||
public: Unit GetHalfSize() const {return (GetSize() / 2);};
|
||||
public: Interval GetUnion(const Interval& interval) const;
|
||||
public: Interval GetIntersection(const Interval& interval) const;
|
||||
public: const Unit& getVMin() const {return _vMin;};
|
||||
public: const Unit& getVMax() const {return _vMax;};
|
||||
public: Unit& getVMin() {return _vMin;};
|
||||
public: Unit& getVMax() {return _vMax;};
|
||||
public: Unit getCenter() const {return ((_vMin + _vMax) / 2);};
|
||||
public: Unit getSize() const {return (_vMax - _vMin);};
|
||||
public: Unit getHalfSize() const {return (getSize() / 2);};
|
||||
public: Interval getUnion(const Interval& interval) const;
|
||||
public: Interval getIntersection(const Interval& interval) const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -82,9 +82,9 @@ class Interval {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Interval"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Interval"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ typedef GenericFilter<Interval> IntervalFilter;
|
|||
#define for_each_interval(interval, intervals)\
|
||||
/*********************************************/\
|
||||
{\
|
||||
IntervalLocator _locator = intervals.GetLocator();\
|
||||
IntervalLocator _locator = intervals.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Interval interval = _locator.GetElement();\
|
||||
Interval interval = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
_element(NULL)
|
||||
{
|
||||
if (_map) {
|
||||
unsigned length = _map->_GetLength();
|
||||
unsigned length = _map->_getLength();
|
||||
do {
|
||||
_element = _map->_GetArray()[_index++];
|
||||
_element = _map->_getArray()[_index++];
|
||||
} while (!_element && (_index < length));
|
||||
}
|
||||
};
|
||||
|
@ -91,13 +91,13 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Element* GetElement() const
|
||||
public: virtual Element* getElement() const
|
||||
// ****************************************
|
||||
{
|
||||
return _element;
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element*>* GetClone() const
|
||||
public: virtual Hurricane::Locator<Element*>* getClone() const
|
||||
// ***********************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -119,12 +119,12 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// ****************************
|
||||
{
|
||||
if (_element) {
|
||||
_element = _map->_GetNextElement(_element);
|
||||
_element = _map->_getNextElement(_element);
|
||||
if (!_element) {
|
||||
unsigned length = _map->_GetLength();
|
||||
unsigned length = _map->_getLength();
|
||||
if (_index < length) {
|
||||
do {
|
||||
_element = _map->_GetArray()[_index++];
|
||||
_element = _map->_getArray()[_index++];
|
||||
} while (!_element && (_index < length));
|
||||
}
|
||||
}
|
||||
|
@ -134,11 +134,11 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = "<" + _TName("IntrusiveMap::Elements::Locator");
|
||||
if (_map) s += " " + GetString(_map);
|
||||
if (_map) s += " " + getString(_map);
|
||||
s += ">";
|
||||
return s;
|
||||
};
|
||||
|
@ -180,13 +180,13 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Element*>* GetClone() const
|
||||
public: virtual Collection<Element*>* getClone() const
|
||||
// ***************************************************
|
||||
{
|
||||
return new Elements(*this);
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element*>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<Element*>* getLocator() const
|
||||
// *************************************************************
|
||||
{
|
||||
return new Locator(_map);
|
||||
|
@ -195,11 +195,11 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = "<" + _TName("IntrusiveMap::Elements");
|
||||
if (_map) s += " " + GetString(_map);
|
||||
if (_map) s += " " + getString(_map);
|
||||
s += ">";
|
||||
return s;
|
||||
};
|
||||
|
@ -236,7 +236,7 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
for (unsigned index = 0; index < _length; index++) {
|
||||
Element* element = _array[index];
|
||||
while (element) {
|
||||
_array[index] = _GetNextElement(element);
|
||||
_array[index] = _getNextElement(element);
|
||||
_SetNextElement(element, NULL);
|
||||
element = _array[index];
|
||||
}
|
||||
|
@ -253,16 +253,16 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: Element* GetElement(Key key) const
|
||||
public: Element* getElement(Key key) const
|
||||
// ***************************************
|
||||
{
|
||||
unsigned index = (_GetHashValue(key) / 8) % _length;
|
||||
unsigned index = (_getHashValue(key) / 8) % _length;
|
||||
Element* element = _array[index];
|
||||
while (element && (_GetKey(element) != key)) element = _GetNextElement(element);
|
||||
while (element && (_getKey(element) != key)) element = _getNextElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
public: Elements GetElements() const
|
||||
public: Elements getElements() const
|
||||
// *********************************
|
||||
{
|
||||
return Elements(this);
|
||||
|
@ -280,15 +280,15 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Overridables
|
||||
// ************
|
||||
|
||||
public: virtual Key _GetKey(Element* element) const = 0;
|
||||
public: virtual Key _getKey(Element* element) const = 0;
|
||||
|
||||
public: virtual unsigned _GetHashValue(Key key) const = 0;
|
||||
public: virtual unsigned _getHashValue(Key key) const = 0;
|
||||
|
||||
// public: virtual Element* _GetNextElement(Element* element) const = 0; // AD
|
||||
public: virtual Element* _GetNextElement(Element* element) const
|
||||
// public: virtual Element* _getNextElement(Element* element) const = 0; // AD
|
||||
public: virtual Element* _getNextElement(Element* element) const
|
||||
// *************************************************************
|
||||
{
|
||||
throw Error(_TName("IntrusiveMap") + "::_GetNextElement(...) : should be overrided");
|
||||
throw Error(_TName("IntrusiveMap") + "::_getNextElement(...) : should be overrided");
|
||||
return NULL;
|
||||
};
|
||||
|
||||
|
@ -302,27 +302,27 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string _GetTypeName() const
|
||||
public: string _getTypeName() const
|
||||
// ********************************
|
||||
{
|
||||
return _TName("IntrusiveMap");
|
||||
}
|
||||
|
||||
public: string _GetString() const
|
||||
public: string _getString() const
|
||||
// ******************************
|
||||
{
|
||||
if (IsEmpty())
|
||||
return "<" + _GetTypeName() + " empty>";
|
||||
return "<" + _getTypeName() + " empty>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(_size) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_size) + ">";
|
||||
};
|
||||
|
||||
public: Record* _GetRecord() const
|
||||
public: Record* _getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (!IsEmpty()) {
|
||||
record = new Record(GetString(this));
|
||||
record = new Record(getString(this));
|
||||
unsigned n = 1;
|
||||
for (unsigned index = 0; index < _length; index++) {
|
||||
/**/
|
||||
|
@ -330,29 +330,29 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
/**/
|
||||
Element* element = _array[index];
|
||||
while (element) {
|
||||
// record->Add(GetSlot(GetString(n++), element));
|
||||
record->Add(GetSlot(GetString(index) + ":" + GetString(n++), element));
|
||||
// record->Add(getSlot(getString(n++), element));
|
||||
record->Add(getSlot(getString(index) + ":" + getString(n++), element));
|
||||
/**/
|
||||
element = _GetNextElement(element);
|
||||
element = _getNextElement(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
return record;
|
||||
};
|
||||
|
||||
public: unsigned _GetSize() const
|
||||
public: unsigned _getSize() const
|
||||
// ******************************
|
||||
{
|
||||
return _size;
|
||||
};
|
||||
|
||||
public: unsigned _GetLength() const
|
||||
public: unsigned _getLength() const
|
||||
// ********************************
|
||||
{
|
||||
return _length;
|
||||
};
|
||||
|
||||
public: Element** _GetArray() const
|
||||
public: Element** _getArray() const
|
||||
// ********************************
|
||||
{
|
||||
return _array;
|
||||
|
@ -361,10 +361,10 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
public: bool _Contains(Element* element) const
|
||||
// *******************************************
|
||||
{
|
||||
unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length;
|
||||
unsigned index = (_getHashValue(_getKey(element)) / 8) % _length;
|
||||
Element* currentElement = _array[index];
|
||||
while (currentElement && (currentElement != element))
|
||||
currentElement = _GetNextElement(currentElement);
|
||||
currentElement = _getNextElement(currentElement);
|
||||
return (currentElement != NULL);
|
||||
};
|
||||
|
||||
|
@ -372,7 +372,7 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// ***********************************
|
||||
{
|
||||
if (!_Contains(element)) {
|
||||
unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length;
|
||||
unsigned index = (_getHashValue(_getKey(element)) / 8) % _length;
|
||||
_SetNextElement(element, _array[index]);
|
||||
_array[index] = element;
|
||||
_size++;
|
||||
|
@ -384,19 +384,19 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
// ***********************************
|
||||
{
|
||||
if (_Contains(element)) {
|
||||
unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length;
|
||||
unsigned index = (_getHashValue(_getKey(element)) / 8) % _length;
|
||||
Element* currentElement = _array[index];
|
||||
if (currentElement) {
|
||||
if (currentElement == element) {
|
||||
_array[index] = _GetNextElement(element);
|
||||
_array[index] = _getNextElement(element);
|
||||
_SetNextElement(element, NULL);
|
||||
_size--;
|
||||
}
|
||||
else {
|
||||
while (_GetNextElement(currentElement) && (_GetNextElement(currentElement) != element))
|
||||
currentElement = _GetNextElement(currentElement);
|
||||
if (currentElement && (_GetNextElement(currentElement) == element)) {
|
||||
_SetNextElement(currentElement, _GetNextElement(element));
|
||||
while (_getNextElement(currentElement) && (_getNextElement(currentElement) != element))
|
||||
currentElement = _getNextElement(currentElement);
|
||||
if (currentElement && (_getNextElement(currentElement) == element)) {
|
||||
_SetNextElement(currentElement, _getNextElement(element));
|
||||
_SetNextElement(element, NULL);
|
||||
_size--;
|
||||
}
|
||||
|
@ -425,8 +425,8 @@ template<class Key, class Element> class IntrusiveMap {
|
|||
for (unsigned index = 0; index < oldLength; index++) {
|
||||
Element* element = oldArray[index];
|
||||
while (element) {
|
||||
Element* nextElement = _GetNextElement(element);
|
||||
unsigned newIndex = (_GetHashValue(_GetKey(element)) / 8) % _length;
|
||||
Element* nextElement = _getNextElement(element);
|
||||
unsigned newIndex = (_getHashValue(_getKey(element)) / 8) % _length;
|
||||
_SetNextElement(element, _array[newIndex]);
|
||||
_array[newIndex] = element;
|
||||
element = nextElement;
|
||||
|
|
|
@ -60,9 +60,9 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
_element(NULL)
|
||||
{
|
||||
if (_set) {
|
||||
unsigned length = _set->_GetLength();
|
||||
unsigned length = _set->_getLength();
|
||||
do {
|
||||
_element = _set->_GetArray()[_index++];
|
||||
_element = _set->_getArray()[_index++];
|
||||
} while (!_element && (_index < length));
|
||||
}
|
||||
};
|
||||
|
@ -91,13 +91,13 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Element* GetElement() const
|
||||
public: virtual Element* getElement() const
|
||||
// ****************************************
|
||||
{
|
||||
return _element;
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element*>* GetClone() const
|
||||
public: virtual Hurricane::Locator<Element*>* getClone() const
|
||||
// ***********************************************************
|
||||
{
|
||||
return new Locator(_set);
|
||||
|
@ -119,12 +119,12 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// ****************************
|
||||
{
|
||||
if (_element) {
|
||||
_element = _set->_GetNextElement(_element);
|
||||
_element = _set->_getNextElement(_element);
|
||||
if (!_element) {
|
||||
unsigned length = _set->_GetLength();
|
||||
unsigned length = _set->_getLength();
|
||||
if (_index < length) {
|
||||
do {
|
||||
_element = _set->_GetArray()[_index++];
|
||||
_element = _set->_getArray()[_index++];
|
||||
} while (!_element && (_index < length));
|
||||
}
|
||||
}
|
||||
|
@ -134,17 +134,17 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// ****************************************
|
||||
{
|
||||
return _TName("IntrusiveSet::Elements::Locator");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = "<" + _GetTypeName();
|
||||
if (_set) s += " " + GetString(_set);
|
||||
string s = "<" + _getTypeName();
|
||||
if (_set) s += " " + getString(_set);
|
||||
s += ">";
|
||||
return s;
|
||||
};
|
||||
|
@ -186,13 +186,13 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Element*>* GetClone() const
|
||||
public: virtual Collection<Element*>* getClone() const
|
||||
// ***************************************************
|
||||
{
|
||||
return new Elements(*this);
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element*>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<Element*>* getLocator() const
|
||||
// *************************************************************
|
||||
{
|
||||
return new Locator(_set);
|
||||
|
@ -201,17 +201,17 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("IntrusiveSet::Elements");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = "<" + _GetTypeName();
|
||||
if (_set) s += " " + GetString(_set);
|
||||
string s = "<" + _getTypeName();
|
||||
if (_set) s += " " + getString(_set);
|
||||
s += ">";
|
||||
return s;
|
||||
};
|
||||
|
@ -248,7 +248,7 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
for (unsigned index = 0; index < _length; index++) {
|
||||
Element* element = _array[index];
|
||||
while (element) {
|
||||
_array[index] = _GetNextElement(element);
|
||||
_array[index] = _getNextElement(element);
|
||||
_SetNextElement(element, NULL);
|
||||
element = _array[index];
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: Elements GetElements() const
|
||||
public: Elements getElements() const
|
||||
// *********************************
|
||||
{
|
||||
return Elements(this);
|
||||
|
@ -283,13 +283,13 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Overridables
|
||||
// ************
|
||||
|
||||
public: virtual unsigned _GetHashValue(Element* element) const = 0;
|
||||
public: virtual unsigned _getHashValue(Element* element) const = 0;
|
||||
|
||||
// public: virtual Element* _GetNextElement(Element* element) const = 0; // AD
|
||||
public: virtual Element* _GetNextElement(Element* element) const
|
||||
// public: virtual Element* _getNextElement(Element* element) const = 0; // AD
|
||||
public: virtual Element* _getNextElement(Element* element) const
|
||||
// *************************************************************
|
||||
{
|
||||
throw Error(_TName("IntrusiveSet") + "::_GetNextElement(...) : should be overrided");
|
||||
throw Error(_TName("IntrusiveSet") + "::_getNextElement(...) : should be overrided");
|
||||
return NULL;
|
||||
};
|
||||
|
||||
|
@ -303,27 +303,27 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("InstrusiveSet");
|
||||
};
|
||||
|
||||
public: string _GetString() const
|
||||
public: string _getString() const
|
||||
// ******************************
|
||||
{
|
||||
if (IsEmpty())
|
||||
return "<" + _GetTypeName() + " empty>";
|
||||
return "<" + _getTypeName() + " empty>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(_size) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_size) + ">";
|
||||
};
|
||||
|
||||
public: Record* _GetRecord() const
|
||||
public: Record* _getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (!IsEmpty()) {
|
||||
record = new Record(GetString(this));
|
||||
record = new Record(getString(this));
|
||||
unsigned n = 1;
|
||||
for (unsigned index = 0; index < _length; index++) {
|
||||
/**/
|
||||
|
@ -331,29 +331,29 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
/**/
|
||||
Element* element = _array[index];
|
||||
while (element) {
|
||||
// record->Add(GetSlot(GetString(n++), element));
|
||||
record->Add(GetSlot(GetString(index) + ":" + GetString(n++), element));
|
||||
// record->Add(getSlot(getString(n++), element));
|
||||
record->Add(getSlot(getString(index) + ":" + getString(n++), element));
|
||||
/**/
|
||||
element = _GetNextElement(element);
|
||||
element = _getNextElement(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
return record;
|
||||
};
|
||||
|
||||
public: unsigned _GetSize() const
|
||||
public: unsigned _getSize() const
|
||||
// ******************************
|
||||
{
|
||||
return _size;
|
||||
};
|
||||
|
||||
public: unsigned _GetLength() const
|
||||
public: unsigned _getLength() const
|
||||
// ********************************
|
||||
{
|
||||
return _length;
|
||||
};
|
||||
|
||||
public: Element** _GetArray() const
|
||||
public: Element** _getArray() const
|
||||
// ********************************
|
||||
{
|
||||
return _array;
|
||||
|
@ -362,10 +362,10 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
public: bool _Contains(Element* element) const
|
||||
// *******************************************
|
||||
{
|
||||
unsigned index = (_GetHashValue(element) / 8) % _length;
|
||||
unsigned index = (_getHashValue(element) / 8) % _length;
|
||||
Element* currentElement = _array[index];
|
||||
while (currentElement && (currentElement != element))
|
||||
currentElement = _GetNextElement(currentElement);
|
||||
currentElement = _getNextElement(currentElement);
|
||||
return (currentElement != NULL);
|
||||
};
|
||||
|
||||
|
@ -373,7 +373,7 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// ***********************************
|
||||
{
|
||||
if (!_Contains(element)) {
|
||||
unsigned index = (_GetHashValue(element) / 8) % _length;
|
||||
unsigned index = (_getHashValue(element) / 8) % _length;
|
||||
_SetNextElement(element, _array[index]);
|
||||
_array[index] = element;
|
||||
_size++;
|
||||
|
@ -385,19 +385,19 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
// ***********************************
|
||||
{
|
||||
if (_Contains(element)) {
|
||||
unsigned index = (_GetHashValue(element) / 8) % _length;
|
||||
unsigned index = (_getHashValue(element) / 8) % _length;
|
||||
Element* currentElement = _array[index];
|
||||
if (currentElement) {
|
||||
if (currentElement == element) {
|
||||
_array[index] = _GetNextElement(element);
|
||||
_array[index] = _getNextElement(element);
|
||||
_SetNextElement(element, NULL);
|
||||
_size--;
|
||||
}
|
||||
else {
|
||||
while (_GetNextElement(currentElement) && (_GetNextElement(currentElement) != element))
|
||||
currentElement = _GetNextElement(currentElement);
|
||||
if (currentElement && (_GetNextElement(currentElement) == element)) {
|
||||
_SetNextElement(currentElement, _GetNextElement(element));
|
||||
while (_getNextElement(currentElement) && (_getNextElement(currentElement) != element))
|
||||
currentElement = _getNextElement(currentElement);
|
||||
if (currentElement && (_getNextElement(currentElement) == element)) {
|
||||
_SetNextElement(currentElement, _getNextElement(element));
|
||||
_SetNextElement(element, NULL);
|
||||
_size--;
|
||||
}
|
||||
|
@ -426,8 +426,8 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
for (unsigned index = 0; index < oldLength; index++) {
|
||||
Element* element = oldArray[index];
|
||||
while (element) {
|
||||
Element* nextElement = _GetNextElement(element);
|
||||
unsigned newIndex = (_GetHashValue(element) / 8) % _length;
|
||||
Element* nextElement = _getNextElement(element);
|
||||
unsigned newIndex = (_getHashValue(element) / 8) % _length;
|
||||
_SetNextElement(element, _array[newIndex]);
|
||||
_array[newIndex] = element;
|
||||
element = nextElement;
|
||||
|
@ -443,7 +443,7 @@ template<class Element> class IntrusiveSet : public NestedSlotAdapter {
|
|||
for (unsigned index = 0; index < _length; index++) {
|
||||
Element* element = _array[index];
|
||||
while (element) {
|
||||
_array[index] = _GetNextElement(element);
|
||||
_array[index] = _getNextElement(element);
|
||||
_SetNextElement(element, NULL);
|
||||
element = _array[index];
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ Layer::Layer(Technology* technology, const Name& name, const Unit& minimalSize,
|
|||
if (_name.IsEmpty())
|
||||
throw Error("Can't create " + _TName("Layer") + " : empty name");
|
||||
|
||||
if (_technology->GetLayer(_name))
|
||||
throw Error("Can't create " + _TName("Layer") + " " + GetString(_name) + " : already exists");
|
||||
if (_technology->getLayer(_name))
|
||||
throw Error("Can't create " + _TName("Layer") + " " + getString(_name) + " : already exists");
|
||||
}
|
||||
|
||||
bool Layer::contains(const Layer* layer) const
|
||||
|
@ -57,12 +57,12 @@ void Layer::setName(const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't change layer name : empty name");
|
||||
|
||||
if (_technology->GetLayer(name))
|
||||
if (_technology->getLayer(name))
|
||||
throw Error("Can't change layer name : already exists");
|
||||
|
||||
_technology->_GetLayerMap()._Remove(this);
|
||||
_technology->_getLayerMap()._Remove(this);
|
||||
_name = name;
|
||||
_technology->_GetLayerMap()._Insert(this);
|
||||
_technology->_getLayerMap()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,44 +84,44 @@ void Layer::setPitch(const Unit& pitch)
|
|||
_pitch = pitch;
|
||||
}
|
||||
|
||||
void Layer::_PostCreate()
|
||||
void Layer::_postCreate()
|
||||
// **********************
|
||||
{
|
||||
_technology->_GetLayerMap()._Insert(this);
|
||||
_technology->_GetLayerList().push_back(this);
|
||||
_technology->_getLayerMap()._Insert(this);
|
||||
_technology->_getLayerList().push_back(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Layer::_PreDelete()
|
||||
void Layer::_preDestroy()
|
||||
// *********************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_technology->_GetLayerList().remove(this);
|
||||
_technology->_GetLayerMap()._Remove(this);
|
||||
_technology->_getLayerList().remove(this);
|
||||
_technology->_getLayerMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Layer::_GetString() const
|
||||
string Layer::_getString() const
|
||||
// *****************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Layer::_GetRecord() const
|
||||
Record* Layer::_getRecord() const
|
||||
// ************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Technology", _technology));
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("Mask", &_mask));
|
||||
record->Add(GetSlot("ExtractMask", &_extractMask));
|
||||
record->Add(GetSlot("MinimalSize", &_minimalSize));
|
||||
record->Add(GetSlot("MinimalSpacing", &_minimalSpacing));
|
||||
record->Add(GetSlot("Pitch", &_pitch));
|
||||
record->Add(getSlot("Technology", _technology));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("Mask", &_mask));
|
||||
record->Add(getSlot("ExtractMask", &_extractMask));
|
||||
record->Add(getSlot("MinimalSize", &_minimalSize));
|
||||
record->Add(getSlot("MinimalSpacing", &_minimalSpacing));
|
||||
record->Add(getSlot("Pitch", &_pitch));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -78,12 +78,12 @@ class Layer : public DBo {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: virtual BasicLayer* _getSymbolicBasicLayer() = 0;
|
||||
public: Layer* _getNextOfTechnologyLayerMap() const {return _nextOfTechnologyLayerMap;};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Layer*> LayerFilter;
|
|||
#define for_each_layer(layer, layers)\
|
||||
/************************************/\
|
||||
{\
|
||||
LayerLocator _locator = layers.GetLocator();\
|
||||
LayerLocator _locator = layers.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Layer* layer = _locator.GetElement();\
|
||||
Layer* layer = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Library*> LibraryFilter;
|
|||
#define for_each_library(library, libraries)\
|
||||
/*******************************************/\
|
||||
{\
|
||||
LibraryLocator _locator = libraries.GetLocator();\
|
||||
LibraryLocator _locator = libraries.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Library* library = _locator.GetElement();\
|
||||
Library* library = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ Library::Library(DataBase* dataBase, Library* library, const Name& name)
|
|||
throw Error("Can't create " + _TName("Library") + " : empty name");
|
||||
|
||||
if (!_library) {
|
||||
if (_dataBase->GetRootLibrary())
|
||||
if (_dataBase->getRootLibrary())
|
||||
throw Error("Can't create " + _TName("Library") + " : root library already exists");
|
||||
}
|
||||
else {
|
||||
if (_library->GetLibrary(_name))
|
||||
if (_library->getLibrary(_name))
|
||||
throw Error("Can't create " + _TName("Library") + " : already exists");
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ Library* Library::Create(DataBase* dataBase, const Name& name)
|
|||
{
|
||||
Library* library = new Library(dataBase, NULL, name);
|
||||
|
||||
library->_PostCreate();
|
||||
library->_postCreate();
|
||||
|
||||
return library;
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ Library* Library::Create(Library* library, const Name& name)
|
|||
if (!library)
|
||||
throw Error("Can't create " + _TName("Library") + " : null library");
|
||||
|
||||
library = new Library(library->GetDataBase(), library, name);
|
||||
library = new Library(library->getDataBase(), library, name);
|
||||
|
||||
library->_PostCreate();
|
||||
library->_postCreate();
|
||||
|
||||
return library;
|
||||
}
|
||||
|
@ -74,59 +74,59 @@ void Library::SetName(const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't change library name : empty name");
|
||||
|
||||
if (_library && _library->GetLibrary(name))
|
||||
if (_library && _library->getLibrary(name))
|
||||
throw Error("Can't change library name : already exists");
|
||||
|
||||
if (_library) _library->_GetLibraryMap()._Remove(this);
|
||||
if (_library) _library->_getLibraryMap()._Remove(this);
|
||||
_name = name;
|
||||
if (_library) _library->_GetLibraryMap()._Insert(this);
|
||||
if (_library) _library->_getLibraryMap()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Library::_PostCreate()
|
||||
void Library::_postCreate()
|
||||
// ************************
|
||||
{
|
||||
if (!_library)
|
||||
_dataBase->_SetRootLibrary(this);
|
||||
else
|
||||
_library->_GetLibraryMap()._Insert(this);
|
||||
_library->_getLibraryMap()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Library::_PreDelete()
|
||||
void Library::_preDestroy()
|
||||
// ***********************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
for_each_cell(cell, GetCells()) cell->Delete(); end_for;
|
||||
for_each_library(library, GetLibraries()) library->Delete(); end_for;
|
||||
for_each_cell(cell, getCells()) cell->destroy(); end_for;
|
||||
for_each_library(library, getLibraries()) library->destroy(); end_for;
|
||||
|
||||
if (!_library)
|
||||
_dataBase->_SetRootLibrary(NULL);
|
||||
else
|
||||
_library->_GetLibraryMap()._Remove(this);
|
||||
_library->_getLibraryMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Library::_GetString() const
|
||||
string Library::_getString() const
|
||||
// *******************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " ");
|
||||
s.insert(s.length() - 1, GetString(_name));
|
||||
s.insert(s.length() - 1, getString(_name));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Library::_GetRecord() const
|
||||
Record* Library::_getRecord() const
|
||||
// **************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("DataBase", _dataBase));
|
||||
record->Add(GetSlot("Library", _library));
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("Libraries", &_libraryMap));
|
||||
record->Add(GetSlot("Cells", &_cellMap));
|
||||
record->Add(getSlot("DataBase", _dataBase));
|
||||
record->Add(getSlot("Library", _library));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("Libraries", &_libraryMap));
|
||||
record->Add(getSlot("Cells", &_cellMap));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -141,22 +141,22 @@ Library::LibraryMap::LibraryMap()
|
|||
{
|
||||
}
|
||||
|
||||
Name Library::LibraryMap::_GetKey(Library* library) const
|
||||
Name Library::LibraryMap::_getKey(Library* library) const
|
||||
// ******************************************************
|
||||
{
|
||||
return library->GetName();
|
||||
return library->getName();
|
||||
}
|
||||
|
||||
unsigned Library::LibraryMap::_GetHashValue(Name name) const
|
||||
unsigned Library::LibraryMap::_getHashValue(Name name) const
|
||||
// *********************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8;
|
||||
return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8;
|
||||
}
|
||||
|
||||
Library* Library::LibraryMap::_GetNextElement(Library* library) const
|
||||
Library* Library::LibraryMap::_getNextElement(Library* library) const
|
||||
// ******************************************************************
|
||||
{
|
||||
return library->_GetNextOfLibraryLibraryMap();
|
||||
return library->_getNextOfLibraryLibraryMap();
|
||||
}
|
||||
|
||||
void Library::LibraryMap::_SetNextElement(Library* library, Library* nextLibrary) const
|
||||
|
@ -177,22 +177,22 @@ Library::CellMap::CellMap()
|
|||
{
|
||||
}
|
||||
|
||||
Name Library::CellMap::_GetKey(Cell* cell) const
|
||||
Name Library::CellMap::_getKey(Cell* cell) const
|
||||
// *********************************************
|
||||
{
|
||||
return cell->GetName();
|
||||
return cell->getName();
|
||||
}
|
||||
|
||||
unsigned Library::CellMap::_GetHashValue(Name name) const
|
||||
unsigned Library::CellMap::_getHashValue(Name name) const
|
||||
// ******************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8;
|
||||
return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8;
|
||||
}
|
||||
|
||||
Cell* Library::CellMap::_GetNextElement(Cell* cell) const
|
||||
Cell* Library::CellMap::_getNextElement(Cell* cell) const
|
||||
// ******************************************************
|
||||
{
|
||||
return cell->_GetNextOfLibraryCellMap();
|
||||
return cell->_getNextOfLibraryCellMap();
|
||||
}
|
||||
|
||||
void Library::CellMap::_SetNextElement(Cell* cell, Cell* nextCell) const
|
||||
|
|
|
@ -37,9 +37,9 @@ class Library : public DBo {
|
|||
|
||||
public: LibraryMap();
|
||||
|
||||
public: virtual Name _GetKey(Library* library) const;
|
||||
public: virtual unsigned _GetHashValue(Name name) const;
|
||||
public: virtual Library* _GetNextElement(Library* library) const;
|
||||
public: virtual Name _getKey(Library* library) const;
|
||||
public: virtual unsigned _getHashValue(Name name) const;
|
||||
public: virtual Library* _getNextElement(Library* library) const;
|
||||
public: virtual void _SetNextElement(Library* library, Library* nextLibrary) const;
|
||||
|
||||
};
|
||||
|
@ -51,9 +51,9 @@ class Library : public DBo {
|
|||
|
||||
public: CellMap();
|
||||
|
||||
public: virtual Name _GetKey(Cell* cell) const;
|
||||
public: virtual unsigned _GetHashValue(Name name) const;
|
||||
public: virtual Cell* _GetNextElement(Cell* cell) const;
|
||||
public: virtual Name _getKey(Cell* cell) const;
|
||||
public: virtual unsigned _getHashValue(Name name) const;
|
||||
public: virtual Cell* _getNextElement(Cell* cell) const;
|
||||
public: virtual void _SetNextElement(Cell* cell, Cell* nextCell) const;
|
||||
|
||||
};
|
||||
|
@ -79,13 +79,13 @@ class Library : public DBo {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: DataBase* GetDataBase() const {return _dataBase;};
|
||||
public: Library* GetLibrary() const {return _library;};
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: Library* GetLibrary(const Name& name) const {return _libraryMap.GetElement(name);};
|
||||
public: Libraries GetLibraries() const {return _libraryMap.GetElements();};
|
||||
public: Cell* GetCell(const Name& name) const {return _cellMap.GetElement(name);};
|
||||
public: Cells GetCells() const {return _cellMap.GetElements();};
|
||||
public: DataBase* getDataBase() const {return _dataBase;};
|
||||
public: Library* getLibrary() const {return _library;};
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: Library* getLibrary(const Name& name) const {return _libraryMap.getElement(name);};
|
||||
public: Libraries getLibraries() const {return _libraryMap.getElements();};
|
||||
public: Cell* getCell(const Name& name) const {return _cellMap.getElement(name);};
|
||||
public: Cells getCells() const {return _cellMap.getElements();};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -95,16 +95,16 @@ class Library : public DBo {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Library");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: LibraryMap& _GetLibraryMap() {return _libraryMap;};
|
||||
public: CellMap& _GetCellMap() {return _cellMap;};
|
||||
public: Library* _GetNextOfLibraryLibraryMap() const {return _nextOfLibraryLibraryMap;};
|
||||
public: virtual string _getTypeName() const {return _TName("Library");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: LibraryMap& _getLibraryMap() {return _libraryMap;};
|
||||
public: CellMap& _getCellMap() {return _cellMap;};
|
||||
public: Library* _getNextOfLibraryLibraryMap() const {return _nextOfLibraryLibraryMap;};
|
||||
|
||||
public: void _SetNextOfLibraryLibraryMap(Library* library) {_nextOfLibraryLibraryMap = library;};
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ template<class Element> class ListCollection : public Collection<Element> {
|
|||
if (_elementList) _iterator = _elementList->begin();
|
||||
};
|
||||
|
||||
public: virtual Element GetElement() const
|
||||
public: virtual Element getElement() const
|
||||
// ***************************************
|
||||
{
|
||||
return (IsValid()) ? *_iterator : Element();
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element>* GetClone() const
|
||||
public: virtual Hurricane::Locator<Element>* getClone() const
|
||||
// **********************************************************
|
||||
{
|
||||
return new Locator(_elementList);
|
||||
|
@ -112,13 +112,13 @@ template<class Element> class ListCollection : public Collection<Element> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Element>* GetClone() const
|
||||
public: virtual Collection<Element>* getClone() const
|
||||
// **************************************************
|
||||
{
|
||||
return new ListCollection(*this);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<Element>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<Element>* getLocator() const
|
||||
// ************************************************************
|
||||
{
|
||||
// return (_elementList) ? new Locator<Element>(_elementList) : NULL;
|
||||
|
@ -126,7 +126,7 @@ template<class Element> class ListCollection : public Collection<Element> {
|
|||
return (_elementList) ? new Locator(_elementList) : NULL;
|
||||
}
|
||||
|
||||
public: virtual unsigned GetSize() const
|
||||
public: virtual unsigned getSize() const
|
||||
// *************************************
|
||||
{
|
||||
return (_elementList) ? _elementList->size() : 0;
|
||||
|
@ -135,37 +135,37 @@ template<class Element> class ListCollection : public Collection<Element> {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("ListCollection");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_elementList)
|
||||
return "<" + _GetTypeName() + " unbound>";
|
||||
return "<" + _getTypeName() + " unbound>";
|
||||
else {
|
||||
if (_elementList->empty())
|
||||
return "<" + _GetTypeName() + " empty>";
|
||||
return "<" + _getTypeName() + " empty>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(_elementList->size()) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_elementList->size()) + ">";
|
||||
}
|
||||
};
|
||||
|
||||
public: Record* _GetRecord() const
|
||||
public: Record* _getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (!_elementList->empty()) {
|
||||
record = new Record(_GetString());
|
||||
record = new Record(_getString());
|
||||
unsigned n = 1;
|
||||
typename list<Element>::const_iterator iterator = _elementList->begin(); // AD
|
||||
while (iterator != _elementList->end()) {
|
||||
string slotName = GetString(n++);
|
||||
string slotName = getString(n++);
|
||||
Element slotObject = *iterator;
|
||||
record->Add(GetSlot(slotName, slotObject));
|
||||
record->Add(getSlot(slotName, slotObject));
|
||||
++iterator;
|
||||
}
|
||||
}
|
||||
|
@ -181,14 +181,14 @@ template<class Element> class ListCollection : public Collection<Element> {
|
|||
// ****************************************************************************************************
|
||||
|
||||
template<class Element>
|
||||
inline GenericCollection<Element> GetCollection(const list<Element>& elementList)
|
||||
inline GenericCollection<Element> getCollection(const list<Element>& elementList)
|
||||
// *********************************************************************************
|
||||
{
|
||||
return ListCollection<Element>(elementList);
|
||||
}
|
||||
|
||||
template<class Element>
|
||||
inline GenericCollection<Element> GetCollection(const list<Element>* elementList)
|
||||
inline GenericCollection<Element> getCollection(const list<Element>* elementList)
|
||||
// *********************************************************************************
|
||||
{
|
||||
return ListCollection<Element>(elementList);
|
||||
|
|
|
@ -53,10 +53,10 @@ template<class Type> class Locator : public NestedSlotAdapter {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Type GetElement() const = 0;
|
||||
public: virtual Locator<Type>* GetClone() const = 0;
|
||||
public: virtual Type getElement() const = 0;
|
||||
public: virtual Locator<Type>* getClone() const = 0;
|
||||
|
||||
public: virtual Locator<Type>* GetLocator() // 21-10-2003
|
||||
public: virtual Locator<Type>* getLocator() // 21-10-2003
|
||||
// ****************************************
|
||||
{
|
||||
return ( this );
|
||||
|
@ -75,19 +75,19 @@ template<class Type> class Locator : public NestedSlotAdapter {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("Locator");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!IsValid())
|
||||
return "<" + _GetTypeName() + " invalid>";
|
||||
return "<" + _getTypeName() + " invalid>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(GetElement()) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(getElement()) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -124,14 +124,14 @@ template<class Type> class GenericLocator : public Locator<Type> {
|
|||
public: GenericLocator(const Locator<Type>& locator)
|
||||
// *************************************************
|
||||
: Inherit(),
|
||||
_locator(locator.GetClone())
|
||||
_locator(locator.getClone())
|
||||
{
|
||||
};
|
||||
|
||||
public: GenericLocator(const GenericLocator& genericLocator)
|
||||
// *********************************************************
|
||||
: Inherit(),
|
||||
_locator(genericLocator.GetClone())
|
||||
_locator(genericLocator.getClone())
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -160,7 +160,7 @@ template<class Type> class GenericLocator : public Locator<Type> {
|
|||
// ************************************************************
|
||||
{
|
||||
if (_locator) delete _locator;
|
||||
_locator = locator.GetClone();
|
||||
_locator = locator.getClone();
|
||||
return *this;
|
||||
};
|
||||
|
||||
|
@ -168,7 +168,7 @@ template<class Type> class GenericLocator : public Locator<Type> {
|
|||
// ********************************************************************
|
||||
{
|
||||
if (_locator) delete _locator;
|
||||
_locator = genericLocator.GetClone();
|
||||
_locator = genericLocator.getClone();
|
||||
return *this;
|
||||
};
|
||||
|
||||
|
@ -185,22 +185,22 @@ template<class Type> class GenericLocator : public Locator<Type> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Type GetElement() const
|
||||
public: virtual Type getElement() const
|
||||
// ************************************
|
||||
{
|
||||
return ((_locator) ? _locator->GetElement() : Type());
|
||||
return ((_locator) ? _locator->getElement() : Type());
|
||||
};
|
||||
|
||||
public: virtual Locator<Type>* GetClone() const
|
||||
public: virtual Locator<Type>* getClone() const
|
||||
// ********************************************
|
||||
{
|
||||
return ((_locator) ? _locator->GetClone() : NULL);
|
||||
return ((_locator) ? _locator->getClone() : NULL);
|
||||
};
|
||||
|
||||
public: virtual Locator<Type>* GetLocator() // 21-10-2003
|
||||
public: virtual Locator<Type>* getLocator() // 21-10-2003
|
||||
// ****************************************
|
||||
{
|
||||
return ( _locator->GetLocator () );
|
||||
return ( _locator->getLocator () );
|
||||
}
|
||||
|
||||
|
||||
|
@ -225,19 +225,19 @@ template<class Type> class GenericLocator : public Locator<Type> {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const
|
||||
public: virtual string _getTypeName() const
|
||||
// **************************************
|
||||
{
|
||||
return _TName("GenericLocator");
|
||||
};
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_locator)
|
||||
return "<" + _GetTypeName() + " unbound>";
|
||||
return "<" + _getTypeName() + " unbound>";
|
||||
else
|
||||
return "<" + _GetTypeName() + " " + GetString(_locator) + ">";
|
||||
return "<" + _getTypeName() + " " + getString(_locator) + ">";
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -31,10 +31,10 @@ void Marker::Materialize()
|
|||
// ***********************
|
||||
{
|
||||
if (!IsMaterialized()) {
|
||||
Cell* cell = GetCell();
|
||||
QuadTree* quadTree = cell->_GetQuadTree();
|
||||
Cell* cell = getCell();
|
||||
QuadTree* quadTree = cell->_getQuadTree();
|
||||
quadTree->Insert(this);
|
||||
cell->_Fit(quadTree->GetBoundingBox());
|
||||
cell->_Fit(quadTree->getBoundingBox());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,42 +42,42 @@ void Marker::Unmaterialize()
|
|||
// *************************
|
||||
{
|
||||
if (IsMaterialized()) {
|
||||
Cell* cell = GetCell();
|
||||
cell->_Unfit(GetBoundingBox());
|
||||
cell->_GetQuadTree()->Remove(this);
|
||||
Cell* cell = getCell();
|
||||
cell->_Unfit(getBoundingBox());
|
||||
cell->_getQuadTree()->Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Marker::_PostCreate()
|
||||
void Marker::_postCreate()
|
||||
// ***********************
|
||||
{
|
||||
_cell->_GetMarkerSet()._Insert(this);
|
||||
_cell->_getMarkerSet()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Marker::_PreDelete()
|
||||
void Marker::_preDestroy()
|
||||
// **********************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_cell->_GetMarkerSet()._Remove(this);
|
||||
_cell->_getMarkerSet()._Remove(this);
|
||||
}
|
||||
|
||||
string Marker::_GetString() const
|
||||
string Marker::_getString() const
|
||||
// ******************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_cell->GetName()));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_cell->getName()));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Marker::_GetRecord() const
|
||||
Record* Marker::_getRecord() const
|
||||
// *************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Cell", _cell));
|
||||
record->Add(getSlot("Cell", _cell));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ class Marker : public Go {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const {return _cell;};
|
||||
public: virtual Box GetBoundingBox() const = 0;
|
||||
public: virtual Cell* getCell() const {return _cell;};
|
||||
public: virtual Box getBoundingBox() const = 0;
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -51,14 +51,14 @@ class Marker : public Go {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: Marker* _GetNextOfCellMarkerSet() const {return _nextOfCellMarkerSet;};
|
||||
public: Marker* _getNextOfCellMarkerSet() const {return _nextOfCellMarkerSet;};
|
||||
|
||||
public: void _SetNextOfCellMarkerSet(Marker* marker) {_nextOfCellMarkerSet = marker;};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Marker*> MarkerFilter;
|
|||
#define for_each_marker(marker, markers)\
|
||||
/***************************************/\
|
||||
{\
|
||||
MarkerLocator _locator = markers.GetLocator();\
|
||||
MarkerLocator _locator = markers.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Marker* marker = _locator.GetElement();\
|
||||
Marker* marker = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ template<class Element, class Compare = less<Element> >
|
|||
if (_elementMultiset) _iterator = _elementMultiset->begin();
|
||||
};
|
||||
|
||||
public: virtual Element GetElement() const
|
||||
public: virtual Element getElement() const
|
||||
// ***************************************
|
||||
{
|
||||
return (IsValid()) ? *_iterator : Element();
|
||||
};
|
||||
|
||||
public: virtual Hurricane::Locator<Element>* GetClone() const
|
||||
public: virtual Hurricane::Locator<Element>* getClone() const
|
||||
// **********************************************************
|
||||
{
|
||||
return new Locator(_elementMultiset);
|
||||
|
@ -118,13 +118,13 @@ template<class Element, class Compare = less<Element> >
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Element>* GetClone() const
|
||||
public: virtual Collection<Element>* getClone() const
|
||||
// **************************************************
|
||||
{
|
||||
return new MultisetCollection(*this);
|
||||
}
|
||||
|
||||
public: virtual Hurricane::Locator<Element>* GetLocator() const
|
||||
public: virtual Hurricane::Locator<Element>* getLocator() const
|
||||
// ************************************************************
|
||||
{
|
||||
// return (_elementMultiset) ? new Locator<Element, Compare>(_elementMultiset) : NULL;
|
||||
|
@ -132,7 +132,7 @@ template<class Element, class Compare = less<Element> >
|
|||
return (_elementMultiset) ? new Locator(_elementMultiset) : NULL;
|
||||
}
|
||||
|
||||
public: virtual unsigned GetSize() const
|
||||
public: virtual unsigned getSize() const
|
||||
// *************************************
|
||||
{
|
||||
return (_elementMultiset) ? _elementMultiset->size() : 0;
|
||||
|
@ -141,7 +141,7 @@ template<class Element, class Compare = less<Element> >
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const
|
||||
public: virtual string _getString() const
|
||||
// **************************************
|
||||
{
|
||||
if (!_elementMultiset)
|
||||
|
@ -150,20 +150,20 @@ template<class Element, class Compare = less<Element> >
|
|||
if (_elementMultiset->empty())
|
||||
return "<" + _TName("MultisetCollection") + " empty>";
|
||||
else
|
||||
return "<" + _TName("MultisetCollection") + " " + GetString(_elementMultiset->size()) + ">";
|
||||
return "<" + _TName("MultisetCollection") + " " + getString(_elementMultiset->size()) + ">";
|
||||
}
|
||||
};
|
||||
|
||||
Record* _GetRecord() const
|
||||
Record* _getRecord() const
|
||||
// *****************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (!_elementMultiset->empty()) {
|
||||
record = new Record(_GetString());
|
||||
record = new Record(_getString());
|
||||
unsigned n = 1;
|
||||
typename multiset<Element, Compare>::const_iterator iterator = _elementMultiset->begin(); // AD
|
||||
while (iterator != _elementMultiset->end()) {
|
||||
record->Add(GetSlot(GetString(n++), *iterator));
|
||||
record->Add(getSlot(getString(n++), *iterator));
|
||||
++iterator;
|
||||
}
|
||||
}
|
||||
|
@ -179,14 +179,14 @@ template<class Element, class Compare = less<Element> >
|
|||
// ****************************************************************************************************
|
||||
|
||||
template<class Element, class Compare>
|
||||
inline GenericCollection<Element> GetCollection(const multiset<Element, Compare>& elementMultiset)
|
||||
inline GenericCollection<Element> getCollection(const multiset<Element, Compare>& elementMultiset)
|
||||
// ****************************************************************************************
|
||||
{
|
||||
return MultisetCollection<Element, Compare>(elementMultiset);
|
||||
}
|
||||
|
||||
template<class Element, class Compare>
|
||||
inline GenericCollection<Element> GetCollection(const multiset<Element, Compare>* elementMultiset)
|
||||
inline GenericCollection<Element> getCollection(const multiset<Element, Compare>* elementMultiset)
|
||||
// ****************************************************************************************
|
||||
{
|
||||
return MultisetCollection<Element, Compare>(elementMultiset);
|
||||
|
|
|
@ -154,17 +154,17 @@ bool Name::IsEmpty() const
|
|||
return _sharedName->_string.empty();
|
||||
}
|
||||
|
||||
string Name::_GetString() const
|
||||
string Name::_getString() const
|
||||
// ****************************
|
||||
{
|
||||
return _sharedName->_string;
|
||||
}
|
||||
|
||||
Record* Name::_GetRecord() const
|
||||
Record* Name::_getRecord() const
|
||||
// ***********************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("SharedName", _sharedName));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("SharedName", _sharedName));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,10 +65,10 @@ class Name {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Name"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: SharedName* _GetSharedName() const {return _sharedName;};
|
||||
public: string _getTypeName() const { return _TName("Name"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
public: SharedName* _getSharedName() const {return _sharedName;};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ typedef GenericFilter<Name*> NameFilter;
|
|||
#define for_each_name(name, names)\
|
||||
/****************************************************/\
|
||||
{\
|
||||
NameLocator _locator = names.GetLocator();\
|
||||
NameLocator _locator = names.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Name* name = _locator.GetElement();\
|
||||
Name* name = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -35,11 +35,11 @@ class Net_IsCellNetFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsCellNetFilter& operator=(const Net_IsCellNetFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsCellNetFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsCellNetFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return !net->IsDeepNet();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsCellNetFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsCellNetFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -52,11 +52,11 @@ class Net_IsDeepNetFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsDeepNetFilter& operator=(const Net_IsDeepNetFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsDeepNetFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsDeepNetFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsDeepNet();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsDeepNetFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsDeepNetFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -69,11 +69,11 @@ class Net_IsGlobalFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsGlobalFilter& operator=(const Net_IsGlobalFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsGlobalFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsGlobalFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsGlobal();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsGlobalFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsGlobalFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -86,11 +86,11 @@ class Net_IsExternalFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsExternalFilter& operator=(const Net_IsExternalFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsExternalFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsExternalFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsExternal();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsExternalFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsExternalFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -103,11 +103,11 @@ class Net_IsClockFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsClockFilter& operator=(const Net_IsClockFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsClockFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsClockFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsClock();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsClockFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsClockFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -120,11 +120,11 @@ class Net_IsSupplyFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsSupplyFilter& operator=(const Net_IsSupplyFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsSupplyFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsSupplyFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsSupply();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsSupplyFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsSupplyFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -137,11 +137,11 @@ class Net_IsPowerFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsPowerFilter& operator=(const Net_IsPowerFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsPowerFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsPowerFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsPower();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsPowerFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsPowerFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -154,11 +154,11 @@ class Net_IsGroundFilter : public Filter<Net*> {
|
|||
|
||||
public: Net_IsGroundFilter& operator=(const Net_IsGroundFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Net*>* GetClone() const {return new Net_IsGroundFilter(*this);};
|
||||
public: virtual Filter<Net*>* getClone() const {return new Net_IsGroundFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Net* net) const {return net->IsGround();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Net::IsGroundFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Net::IsGroundFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -190,14 +190,14 @@ class Net_SlavePlugs : public Collection<Plug*> {
|
|||
|
||||
public: Locator& operator=(const Locator& locator);
|
||||
|
||||
public: virtual Plug* GetElement() const;
|
||||
public: virtual Hurricane::Locator<Plug*>* GetClone() const;
|
||||
public: virtual Plug* getElement() const;
|
||||
public: virtual Hurricane::Locator<Plug*>* getClone() const;
|
||||
|
||||
public: virtual bool IsValid() const;
|
||||
|
||||
public: virtual void Progress();
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -220,13 +220,13 @@ class Net_SlavePlugs : public Collection<Plug*> {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Collection<Plug*>* GetClone() const;
|
||||
public: virtual Hurricane::Locator<Plug*>* GetLocator() const;
|
||||
public: virtual Collection<Plug*>* getClone() const;
|
||||
public: virtual Hurricane::Locator<Plug*>* getLocator() const;
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -257,8 +257,8 @@ Net::Net(Cell* cell, const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't create " + _TName("Net") + " : empty name");
|
||||
|
||||
if (_cell->GetNet(_name))
|
||||
throw Error("Can't create " + _TName("Net ") + GetString(_name) + " : already exists");
|
||||
if (_cell->getNet(_name))
|
||||
throw Error("Can't create " + _TName("Net ") + getString(_name) + " : already exists");
|
||||
}
|
||||
|
||||
Net* Net::Create(Cell* cell, const Name& name)
|
||||
|
@ -266,145 +266,145 @@ Net* Net::Create(Cell* cell, const Name& name)
|
|||
{
|
||||
Net* net = new Net(cell, name);
|
||||
|
||||
net->_PostCreate();
|
||||
net->_postCreate();
|
||||
|
||||
return net;
|
||||
}
|
||||
|
||||
Box Net::GetBoundingBox() const
|
||||
Box Net::getBoundingBox() const
|
||||
// ****************************
|
||||
{
|
||||
Box boundingBox;
|
||||
for_each_component(component, GetComponents()) {
|
||||
boundingBox.merge(component->GetBoundingBox());
|
||||
for_each_component(component, getComponents()) {
|
||||
boundingBox.merge(component->getBoundingBox());
|
||||
end_for;
|
||||
}
|
||||
return boundingBox;
|
||||
}
|
||||
|
||||
RoutingPads Net::GetRoutingPads() const
|
||||
RoutingPads Net::getRoutingPads() const
|
||||
// ************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<RoutingPad*>();
|
||||
return SubTypeCollection<Component*, RoutingPad*>(GetComponents());
|
||||
// return getComponents().getSubSet<RoutingPad*>();
|
||||
return SubTypeCollection<Component*, RoutingPad*>(getComponents());
|
||||
}
|
||||
|
||||
Plugs Net::GetPlugs() const
|
||||
Plugs Net::getPlugs() const
|
||||
// ************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Plug*>();
|
||||
return SubTypeCollection<Component*, Plug*>(GetComponents());
|
||||
// return getComponents().getSubSet<Plug*>();
|
||||
return SubTypeCollection<Component*, Plug*>(getComponents());
|
||||
}
|
||||
|
||||
Pins Net::GetPins() const
|
||||
Pins Net::getPins() const
|
||||
// **********************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Pin*>();
|
||||
return SubTypeCollection<Component*, Pin*>(GetComponents());
|
||||
// return getComponents().getSubSet<Pin*>();
|
||||
return SubTypeCollection<Component*, Pin*>(getComponents());
|
||||
}
|
||||
|
||||
Contacts Net::GetContacts() const
|
||||
Contacts Net::getContacts() const
|
||||
// ******************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Contact*>();
|
||||
return SubTypeCollection<Component*, Contact*>(GetComponents());
|
||||
// return getComponents().getSubSet<Contact*>();
|
||||
return SubTypeCollection<Component*, Contact*>(getComponents());
|
||||
}
|
||||
|
||||
Segments Net::GetSegments() const
|
||||
Segments Net::getSegments() const
|
||||
// ******************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Segment*>();
|
||||
return SubTypeCollection<Component*, Segment*>(GetComponents());
|
||||
// return getComponents().getSubSet<Segment*>();
|
||||
return SubTypeCollection<Component*, Segment*>(getComponents());
|
||||
}
|
||||
|
||||
Verticals Net::GetVerticals() const
|
||||
Verticals Net::getVerticals() const
|
||||
// ********************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Vertical*>();
|
||||
return SubTypeCollection<Component*, Vertical*>(GetComponents());
|
||||
// return getComponents().getSubSet<Vertical*>();
|
||||
return SubTypeCollection<Component*, Vertical*>(getComponents());
|
||||
}
|
||||
|
||||
Horizontals Net::GetHorizontals() const
|
||||
Horizontals Net::getHorizontals() const
|
||||
// ************************************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Horizontal*>();
|
||||
return SubTypeCollection<Component*, Horizontal*>(GetComponents());
|
||||
// return getComponents().getSubSet<Horizontal*>();
|
||||
return SubTypeCollection<Component*, Horizontal*>(getComponents());
|
||||
}
|
||||
|
||||
Pads Net::GetPads() const
|
||||
Pads Net::getPads() const
|
||||
// **********************
|
||||
{
|
||||
// return GetComponents().GetSubSet<Pad*>();
|
||||
return SubTypeCollection<Component*, Pad*>(GetComponents());
|
||||
// return getComponents().getSubSet<Pad*>();
|
||||
return SubTypeCollection<Component*, Pad*>(getComponents());
|
||||
}
|
||||
|
||||
Plugs Net::GetSlavePlugs() const
|
||||
Plugs Net::getSlavePlugs() const
|
||||
// *****************************
|
||||
{
|
||||
return Net_SlavePlugs(this);
|
||||
}
|
||||
|
||||
Plugs Net::GetConnectedSlavePlugs() const
|
||||
Plugs Net::getConnectedSlavePlugs() const
|
||||
// **************************************
|
||||
{
|
||||
return GetSlavePlugs().GetSubSet(Plug::GetIsConnectedFilter());
|
||||
return getSlavePlugs().getSubSet(Plug::getIsConnectedFilter());
|
||||
}
|
||||
|
||||
Plugs Net::GetUnconnectedSlavePlugs() const
|
||||
Plugs Net::getUnconnectedSlavePlugs() const
|
||||
// ****************************************
|
||||
{
|
||||
return GetSlavePlugs().GetSubSet(Plug::GetIsUnconnectedFilter());
|
||||
return getSlavePlugs().getSubSet(Plug::getIsUnconnectedFilter());
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsCellNetFilter()
|
||||
NetFilter Net::getIsCellNetFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsCellNetFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsDeepNetFilter()
|
||||
NetFilter Net::getIsDeepNetFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsDeepNetFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsGlobalFilter()
|
||||
NetFilter Net::getIsGlobalFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsGlobalFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsExternalFilter()
|
||||
NetFilter Net::getIsExternalFilter()
|
||||
// *********************************
|
||||
{
|
||||
return Net_IsExternalFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsInternalFilter()
|
||||
NetFilter Net::getIsInternalFilter()
|
||||
// *********************************
|
||||
{
|
||||
return !Net_IsExternalFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsClockFilter()
|
||||
NetFilter Net::getIsClockFilter()
|
||||
// ******************************
|
||||
{
|
||||
return Net_IsClockFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsSupplyFilter()
|
||||
NetFilter Net::getIsSupplyFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsSupplyFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsPowerFilter()
|
||||
NetFilter Net::getIsPowerFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsPowerFilter();
|
||||
}
|
||||
|
||||
NetFilter Net::GetIsGroundFilter()
|
||||
NetFilter Net::getIsGroundFilter()
|
||||
// *******************************
|
||||
{
|
||||
return Net_IsGroundFilter();
|
||||
|
@ -417,12 +417,12 @@ void Net::SetName(const Name& name)
|
|||
if (name.IsEmpty())
|
||||
throw Error("Can't change net name : empty name");
|
||||
|
||||
if (_cell->GetNet(name))
|
||||
if (_cell->getNet(name))
|
||||
throw Error("Can't change net name : already exists");
|
||||
|
||||
_cell->_GetNetMap()._Remove(this);
|
||||
_cell->_getNetMap()._Remove(this);
|
||||
_name = name;
|
||||
_cell->_GetNetMap()._Insert(this);
|
||||
_cell->_getNetMap()._Insert(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -443,7 +443,7 @@ void Net::SetExternal(bool isExternal)
|
|||
{
|
||||
if (isExternal != _isExternal) {
|
||||
if (!isExternal) {
|
||||
if (!GetConnectedSlavePlugs().IsEmpty())
|
||||
if (!getConnectedSlavePlugs().IsEmpty())
|
||||
throw Error("Can't set internal : has connected slave plugs");
|
||||
_direction = Direction::UNDEFINED;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ void Net::SetExternal(bool isExternal)
|
|||
if (_isExternal) {
|
||||
OpenUpdateSession();
|
||||
SetPosition(Point(0, 0));
|
||||
for_each_instance(instance, _cell->GetSlaveInstances()) {
|
||||
for_each_instance(instance, _cell->getSlaveInstances()) {
|
||||
Plug::_Create(instance, this);
|
||||
end_for;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ void Net::SetPosition(const Point& position)
|
|||
// *****************************************
|
||||
{
|
||||
if (_position != position) {
|
||||
for_each_plug(plug, GetSlavePlugs()) {
|
||||
for_each_plug(plug, getSlavePlugs()) {
|
||||
plug->Invalidate(true);
|
||||
end_for;
|
||||
}
|
||||
|
@ -487,11 +487,11 @@ void Net::SetDirection(const Direction& direction)
|
|||
void Net::Materialize()
|
||||
// ********************
|
||||
{
|
||||
for_each_component(component, GetComponents()) {
|
||||
for_each_component(component, getComponents()) {
|
||||
component->Materialize();
|
||||
end_for;
|
||||
}
|
||||
for_each_rubber(rubber, GetRubbers()) {
|
||||
for_each_rubber(rubber, getRubbers()) {
|
||||
rubber->Materialize();
|
||||
end_for;
|
||||
}
|
||||
|
@ -500,11 +500,11 @@ void Net::Materialize()
|
|||
void Net::Unmaterialize()
|
||||
// **********************
|
||||
{
|
||||
for_each_rubber(rubber, GetRubbers()) {
|
||||
for_each_rubber(rubber, getRubbers()) {
|
||||
rubber->Unmaterialize();
|
||||
end_for;
|
||||
}
|
||||
for_each_component(component, GetComponents()) {
|
||||
for_each_component(component, getComponents()) {
|
||||
component->Unmaterialize();
|
||||
end_for;
|
||||
}
|
||||
|
@ -516,8 +516,8 @@ static void MergeNets(Net* net1, Net* net2)
|
|||
assert(net1);
|
||||
assert(net2);
|
||||
|
||||
if (net2->GetName()[0] != '~') {
|
||||
if ((net1->GetName()[0] == '~') ||
|
||||
if (net2->getName()[0] != '~') {
|
||||
if ((net1->getName()[0] == '~') ||
|
||||
(net2->IsGlobal() && !net1->IsGlobal()) ||
|
||||
(net2->IsExternal() && !net1->IsExternal())) {
|
||||
Net* tmpNet = net1;
|
||||
|
@ -544,73 +544,73 @@ void Net::Merge(Net* net)
|
|||
if (net == this)
|
||||
throw Error("Can't merge net : itself");
|
||||
|
||||
if (net->GetCell() != _cell)
|
||||
if (net->getCell() != _cell)
|
||||
throw Error("Can't merge net : incompatible net");
|
||||
|
||||
if (!IsExternal() && net->IsExternal() && !net->GetConnectedSlavePlugs().IsEmpty())
|
||||
if (!IsExternal() && net->IsExternal() && !net->getConnectedSlavePlugs().IsEmpty())
|
||||
throw Error("Can't merge net : incompatible net");
|
||||
|
||||
for_each_rubber(rubber, net->GetRubbers()) rubber->_SetNet(this); end_for;
|
||||
for_each_component(component, net->GetComponents()) component->_SetNet(this); end_for;
|
||||
for_each_rubber(rubber, net->getRubbers()) rubber->_SetNet(this); end_for;
|
||||
for_each_component(component, net->getComponents()) component->_SetNet(this); end_for;
|
||||
|
||||
if (IsExternal() && net->IsExternal()) {
|
||||
for_each_plug(plug, net->GetConnectedSlavePlugs()) {
|
||||
Plug* mainPlug = plug->GetInstance()->GetPlug(this);
|
||||
if (mainPlug->IsConnected() && (mainPlug->GetNet() != plug->GetNet()))
|
||||
MergeNets(mainPlug->GetNet(), plug->GetNet());
|
||||
for_each_plug(plug, net->getConnectedSlavePlugs()) {
|
||||
Plug* mainPlug = plug->getInstance()->getPlug(this);
|
||||
if (mainPlug->IsConnected() && (mainPlug->getNet() != plug->getNet()))
|
||||
MergeNets(mainPlug->getNet(), plug->getNet());
|
||||
end_for;
|
||||
}
|
||||
for_each_plug(plug, net->GetConnectedSlavePlugs()) {
|
||||
Plug* mainPlug = plug->GetInstance()->GetPlug(this);
|
||||
if (!mainPlug->IsConnected()) mainPlug->SetNet(plug->GetNet());
|
||||
Hook* masterHook = plug->GetBodyHook();
|
||||
Hook* nextMasterHook = masterHook->GetNextMasterHook();
|
||||
for_each_plug(plug, net->getConnectedSlavePlugs()) {
|
||||
Plug* mainPlug = plug->getInstance()->getPlug(this);
|
||||
if (!mainPlug->IsConnected()) mainPlug->SetNet(plug->getNet());
|
||||
Hook* masterHook = plug->getBodyHook();
|
||||
Hook* nextMasterHook = masterHook->getNextMasterHook();
|
||||
if (nextMasterHook != masterHook) {
|
||||
masterHook->Detach();
|
||||
mainPlug->GetBodyHook()->Merge(nextMasterHook);
|
||||
mainPlug->getBodyHook()->Merge(nextMasterHook);
|
||||
}
|
||||
Hooks slaveHooks = masterHook->GetSlaveHooks();
|
||||
Hooks slaveHooks = masterHook->getSlaveHooks();
|
||||
while (!slaveHooks.IsEmpty()) {
|
||||
Hook* slaveHook = slaveHooks.GetFirst();
|
||||
Hook* slaveHook = slaveHooks.getFirst();
|
||||
slaveHook->Detach();
|
||||
slaveHook->Attach(mainPlug->GetBodyHook());
|
||||
slaveHook->Attach(mainPlug->getBodyHook());
|
||||
}
|
||||
plug->_Delete();
|
||||
plug->_destroy();
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
net->Delete();
|
||||
net->destroy();
|
||||
}
|
||||
|
||||
void Net::_PostCreate()
|
||||
void Net::_postCreate()
|
||||
// ********************
|
||||
{
|
||||
_cell->_GetNetMap()._Insert(this);
|
||||
_cell->_getNetMap()._Insert(this);
|
||||
|
||||
if (_isExternal) {
|
||||
for_each_instance(instance, _cell->GetSlaveInstances()) {
|
||||
for_each_instance(instance, _cell->getSlaveInstances()) {
|
||||
Plug::_Create(instance, this);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Net::_PreDelete()
|
||||
void Net::_preDestroy()
|
||||
// *******************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
for_each_plug(slavePlug, GetSlavePlugs()) slavePlug->_Delete(); end_for;
|
||||
for_each_plug(slavePlug, getSlavePlugs()) slavePlug->_destroy(); end_for;
|
||||
|
||||
Unmaterialize();
|
||||
|
||||
for_each_rubber(rubber, GetRubbers()) rubber->_Delete(); end_for;
|
||||
for_each_rubber(rubber, getRubbers()) rubber->_destroy(); end_for;
|
||||
|
||||
for_each_component(component, GetComponents()) {
|
||||
for_each_hook(hook, component->GetHooks()) {
|
||||
for_each_component(component, getComponents()) {
|
||||
for_each_hook(hook, component->getHooks()) {
|
||||
// 15 05 2006 xtof : detach all hooks in rings when
|
||||
// a net deletion occurs, can't see why master hooks were not detached.
|
||||
//if (!hook->IsMaster()) hook->Detach();
|
||||
|
@ -620,41 +620,41 @@ void Net::_PreDelete()
|
|||
end_for;
|
||||
}
|
||||
|
||||
for_each_component(component, GetComponents()) {
|
||||
for_each_component(component, getComponents()) {
|
||||
if (!is_a<Plug*>(component))
|
||||
component->Delete();
|
||||
component->destroy();
|
||||
else
|
||||
((Plug*)component)->SetNet(NULL);
|
||||
end_for;
|
||||
}
|
||||
|
||||
_cell->_GetNetMap()._Remove(this);
|
||||
_cell->_getNetMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Net::_GetString() const
|
||||
string Net::_getString() const
|
||||
// ***************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Net::_GetRecord() const
|
||||
Record* Net::_getRecord() const
|
||||
// **********************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Cell", _cell));
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("Arity", &_arity));
|
||||
record->Add(GetSlot("Global", &_isGlobal));
|
||||
record->Add(GetSlot("External", &_isExternal));
|
||||
record->Add(GetSlot("Type", _type));
|
||||
record->Add(GetSlot("Direction", _direction));
|
||||
record->Add(GetSlot("Position", &_position));
|
||||
record->Add(GetSlot("Components", &_componentSet));
|
||||
record->Add(GetSlot("Rubbers", &_rubberSet));
|
||||
record->Add(GetSlot("External", &_isExternal));
|
||||
record->Add(getSlot("Cell", _cell));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("Arity", &_arity));
|
||||
record->Add(getSlot("Global", &_isGlobal));
|
||||
record->Add(getSlot("External", &_isExternal));
|
||||
record->Add(getSlot("Type", _type));
|
||||
record->Add(getSlot("Direction", _direction));
|
||||
record->Add(getSlot("Position", &_position));
|
||||
record->Add(getSlot("Components", &_componentSet));
|
||||
record->Add(getSlot("Rubbers", &_rubberSet));
|
||||
record->Add(getSlot("External", &_isExternal));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -682,17 +682,17 @@ Net::Type& Net::Type::operator=(const Type& type)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Net::Type::_GetString() const
|
||||
string Net::Type::_getString() const
|
||||
// *********************************
|
||||
{
|
||||
return GetString(&_code);
|
||||
return getString(&_code);
|
||||
}
|
||||
|
||||
Record* Net::Type::_GetRecord() const
|
||||
Record* Net::Type::_getRecord() const
|
||||
// ****************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", &_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", &_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -721,17 +721,17 @@ Net::Direction& Net::Direction::operator=(const Direction& direction)
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Net::Direction::_GetString() const
|
||||
string Net::Direction::_getString() const
|
||||
// **************************************
|
||||
{
|
||||
return GetString(&_code);
|
||||
return getString(&_code);
|
||||
}
|
||||
|
||||
Record* Net::Direction::_GetRecord() const
|
||||
Record* Net::Direction::_getRecord() const
|
||||
// *********************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", &_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", &_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -747,16 +747,16 @@ Net::ComponentSet::ComponentSet()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned Net::ComponentSet::_GetHashValue(Component* component) const
|
||||
unsigned Net::ComponentSet::_getHashValue(Component* component) const
|
||||
// ******************************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)component ) ) / 8;
|
||||
}
|
||||
|
||||
Component* Net::ComponentSet::_GetNextElement(Component* component) const
|
||||
Component* Net::ComponentSet::_getNextElement(Component* component) const
|
||||
// **********************************************************************
|
||||
{
|
||||
return component->_GetNextOfNetComponentSet();
|
||||
return component->_getNextOfNetComponentSet();
|
||||
}
|
||||
|
||||
void Net::ComponentSet::_SetNextElement(Component* component, Component* nextComponent) const
|
||||
|
@ -777,16 +777,16 @@ Net::RubberSet::RubberSet()
|
|||
{
|
||||
}
|
||||
|
||||
unsigned Net::RubberSet::_GetHashValue(Rubber* rubber) const
|
||||
unsigned Net::RubberSet::_getHashValue(Rubber* rubber) const
|
||||
// *********************************************************
|
||||
{
|
||||
return ( (unsigned int)( (unsigned long)rubber ) ) / 8;
|
||||
}
|
||||
|
||||
Rubber* Net::RubberSet::_GetNextElement(Rubber* rubber) const
|
||||
Rubber* Net::RubberSet::_getNextElement(Rubber* rubber) const
|
||||
// **********************************************************
|
||||
{
|
||||
return rubber->_GetNextOfNetRubberSet();
|
||||
return rubber->_getNextOfNetRubberSet();
|
||||
}
|
||||
|
||||
void Net::RubberSet::_SetNextElement(Rubber* rubber, Rubber* nextRubber) const
|
||||
|
@ -822,23 +822,23 @@ Net_SlavePlugs& Net_SlavePlugs::operator=(const Net_SlavePlugs& slavePlugs)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Collection<Plug*>* Net_SlavePlugs::GetClone() const
|
||||
Collection<Plug*>* Net_SlavePlugs::getClone() const
|
||||
// ************************************************
|
||||
{
|
||||
return new Net_SlavePlugs(*this);
|
||||
}
|
||||
|
||||
Locator<Plug*>* Net_SlavePlugs::GetLocator() const
|
||||
Locator<Plug*>* Net_SlavePlugs::getLocator() const
|
||||
// ***********************************************
|
||||
{
|
||||
return new Locator(_net);
|
||||
}
|
||||
|
||||
string Net_SlavePlugs::_GetString() const
|
||||
string Net_SlavePlugs::_getString() const
|
||||
// **************************************
|
||||
{
|
||||
string s = "<" + _TName("Net::SlavePlugs");
|
||||
if (_net) s += " " + GetString(_net);
|
||||
if (_net) s += " " + getString(_net);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
@ -857,9 +857,9 @@ Net_SlavePlugs::Locator::Locator(const Net* net)
|
|||
_instanceLocator()
|
||||
{
|
||||
if (_net) {
|
||||
_instanceLocator = _net->GetCell()->GetSlaveInstances().GetLocator();
|
||||
_instanceLocator = _net->getCell()->getSlaveInstances().getLocator();
|
||||
while (!_plug && _instanceLocator.IsValid()) {
|
||||
_plug = _instanceLocator.GetElement()->GetPlug(_net);
|
||||
_plug = _instanceLocator.getElement()->getPlug(_net);
|
||||
_instanceLocator.Progress();
|
||||
}
|
||||
}
|
||||
|
@ -883,13 +883,13 @@ Net_SlavePlugs::Locator& Net_SlavePlugs::Locator::operator=(const Locator& locat
|
|||
return *this;
|
||||
}
|
||||
|
||||
Plug* Net_SlavePlugs::Locator::GetElement() const
|
||||
Plug* Net_SlavePlugs::Locator::getElement() const
|
||||
// **********************************************
|
||||
{
|
||||
return _plug;
|
||||
}
|
||||
|
||||
Locator<Plug*>* Net_SlavePlugs::Locator::GetClone() const
|
||||
Locator<Plug*>* Net_SlavePlugs::Locator::getClone() const
|
||||
// ******************************************************
|
||||
{
|
||||
return new Locator(*this);
|
||||
|
@ -907,17 +907,17 @@ void Net_SlavePlugs::Locator::Progress()
|
|||
if (IsValid()) {
|
||||
_plug = NULL;
|
||||
while (!_plug && _instanceLocator.IsValid()) {
|
||||
_plug = _instanceLocator.GetElement()->GetPlug(_net);
|
||||
_plug = _instanceLocator.getElement()->getPlug(_net);
|
||||
_instanceLocator.Progress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string Net_SlavePlugs::Locator::_GetString() const
|
||||
string Net_SlavePlugs::Locator::_getString() const
|
||||
// ***********************************************
|
||||
{
|
||||
string s = "<" + _TName("Net::SlavePlugs::Locator");
|
||||
if (_net) s += " " + GetString(_net);
|
||||
if (_net) s += " " + getString(_net);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -55,11 +55,11 @@ class Net : public Entity {
|
|||
|
||||
public: operator const Code&() const {return _code;};
|
||||
|
||||
public: const Code& GetCode() const {return _code;};
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Net::type"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Net::type"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -77,11 +77,11 @@ class Net : public Entity {
|
|||
|
||||
public: operator const Code&() const {return _code;};
|
||||
|
||||
public: const Code& GetCode() const {return _code;};
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Net::Direction"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Net::Direction"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -92,8 +92,8 @@ class Net : public Entity {
|
|||
|
||||
public: ComponentSet();
|
||||
|
||||
public: virtual unsigned _GetHashValue(Component* component) const;
|
||||
public: virtual Component* _GetNextElement(Component* component) const;
|
||||
public: virtual unsigned _getHashValue(Component* component) const;
|
||||
public: virtual Component* _getNextElement(Component* component) const;
|
||||
public: virtual void _SetNextElement(Component* component, Component* nextComponent) const;
|
||||
|
||||
};
|
||||
|
@ -105,8 +105,8 @@ class Net : public Entity {
|
|||
|
||||
public: RubberSet();
|
||||
|
||||
public: virtual unsigned _GetHashValue(Rubber* rubber) const;
|
||||
public: virtual Rubber* _GetNextElement(Rubber* rubber) const;
|
||||
public: virtual unsigned _getHashValue(Rubber* rubber) const;
|
||||
public: virtual Rubber* _getNextElement(Rubber* rubber) const;
|
||||
public: virtual void _SetNextElement(Rubber* rubber, Rubber* nextRubber) const;
|
||||
|
||||
};
|
||||
|
@ -136,41 +136,41 @@ class Net : public Entity {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const {return _cell;};
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: const Arity& GetArity() const {return _arity;};
|
||||
public: const Type& GetType() const {return _type;};
|
||||
public: const Direction& GetDirection() const {return _direction;};
|
||||
public: const Point& GetPosition() const {return _position;};
|
||||
public: const Unit& GetX() const {return _position.getX();};
|
||||
public: const Unit& GetY() const {return _position.getY();};
|
||||
public: Components GetComponents() const {return _componentSet.GetElements();};
|
||||
public: Rubbers GetRubbers() const {return _rubberSet.GetElements();};
|
||||
public: RoutingPads GetRoutingPads() const;
|
||||
public: Plugs GetPlugs() const;
|
||||
public: Pins GetPins() const;
|
||||
public: Contacts GetContacts() const;
|
||||
public: Segments GetSegments() const;
|
||||
public: Verticals GetVerticals() const;
|
||||
public: Horizontals GetHorizontals() const;
|
||||
public: Pads GetPads() const;
|
||||
public: Plugs GetSlavePlugs() const;
|
||||
public: Plugs GetConnectedSlavePlugs() const;
|
||||
public: Plugs GetUnconnectedSlavePlugs() const;
|
||||
public: virtual Cell* getCell() const {return _cell;};
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: const Arity& getArity() const {return _arity;};
|
||||
public: const Type& getType() const {return _type;};
|
||||
public: const Direction& getDirection() const {return _direction;};
|
||||
public: const Point& getPosition() const {return _position;};
|
||||
public: const Unit& getX() const {return _position.getX();};
|
||||
public: const Unit& getY() const {return _position.getY();};
|
||||
public: Components getComponents() const {return _componentSet.getElements();};
|
||||
public: Rubbers getRubbers() const {return _rubberSet.getElements();};
|
||||
public: RoutingPads getRoutingPads() const;
|
||||
public: Plugs getPlugs() const;
|
||||
public: Pins getPins() const;
|
||||
public: Contacts getContacts() const;
|
||||
public: Segments getSegments() const;
|
||||
public: Verticals getVerticals() const;
|
||||
public: Horizontals getHorizontals() const;
|
||||
public: Pads getPads() const;
|
||||
public: Plugs getSlavePlugs() const;
|
||||
public: Plugs getConnectedSlavePlugs() const;
|
||||
public: Plugs getUnconnectedSlavePlugs() const;
|
||||
|
||||
// Filters
|
||||
// *******
|
||||
|
||||
public: static NetFilter GetIsCellNetFilter();
|
||||
public: static NetFilter GetIsDeepNetFilter();
|
||||
public: static NetFilter GetIsGlobalFilter();
|
||||
public: static NetFilter GetIsExternalFilter();
|
||||
public: static NetFilter GetIsInternalFilter();
|
||||
public: static NetFilter GetIsClockFilter();
|
||||
public: static NetFilter GetIsSupplyFilter();
|
||||
public: static NetFilter GetIsPowerFilter();
|
||||
public: static NetFilter GetIsGroundFilter();
|
||||
public: static NetFilter getIsCellNetFilter();
|
||||
public: static NetFilter getIsDeepNetFilter();
|
||||
public: static NetFilter getIsGlobalFilter();
|
||||
public: static NetFilter getIsExternalFilter();
|
||||
public: static NetFilter getIsInternalFilter();
|
||||
public: static NetFilter getIsClockFilter();
|
||||
public: static NetFilter getIsSupplyFilter();
|
||||
public: static NetFilter getIsPowerFilter();
|
||||
public: static NetFilter getIsGroundFilter();
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -201,16 +201,16 @@ class Net : public Entity {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Net");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: ComponentSet& _GetComponentSet() {return _componentSet;};
|
||||
public: RubberSet& _GetRubberSet() {return _rubberSet;};
|
||||
public: Net* _GetNextOfCellNetMap() const {return _nextOfCellNetMap;};
|
||||
public: virtual string _getTypeName() const {return _TName("Net");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: ComponentSet& _getComponentSet() {return _componentSet;};
|
||||
public: RubberSet& _getRubberSet() {return _rubberSet;};
|
||||
public: Net* _getNextOfCellNetMap() const {return _nextOfCellNetMap;};
|
||||
|
||||
public: void _SetNextOfCellNetMap(Net* net) {_nextOfCellNetMap = net;};
|
||||
|
||||
|
@ -245,8 +245,8 @@ template<>
|
|||
inline Record* ProxyRecord <Net::Type::Code>
|
||||
( const Net::Type::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -279,8 +279,8 @@ template<>
|
|||
inline Record* ProxyRecord <Net::Direction::Code>
|
||||
( const Net::Direction::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,43 +18,38 @@ namespace Hurricane {
|
|||
|
||||
static Name ExternalComponentsRelationName("ExternalComponentsRelation");
|
||||
|
||||
static StandardRelation* GetExternalComponentsRelation(const Net* net)
|
||||
{
|
||||
Property* property = net->GetProperty(ExternalComponentsRelationName);
|
||||
if (!property)
|
||||
static StandardRelation* getExternalComponentsRelation(const Net* net) {
|
||||
Property* property = net->getProperty(ExternalComponentsRelationName);
|
||||
if (!property) {
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
} else {
|
||||
StandardRelation* relation = dynamic_cast<StandardRelation*>(property);
|
||||
if (!relation)
|
||||
throw Error("Bad Property type: Must be a Standard Relation");
|
||||
return relation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Components GetExternalComponents(const Net* net)
|
||||
{
|
||||
Components getExternalComponents(const Net* net) {
|
||||
if (!net->IsExternal())
|
||||
throw Error("Impossible to retrieve external components on non external net "
|
||||
+ net->GetName()._GetString());
|
||||
+ net->getName()._getString());
|
||||
|
||||
StandardRelation* externalComponentsRelation = GetExternalComponentsRelation(net);
|
||||
StandardRelation* externalComponentsRelation = getExternalComponentsRelation(net);
|
||||
if (!externalComponentsRelation)
|
||||
return Components();
|
||||
return externalComponentsRelation->GetSlaveOwners().GetSubSet<Component*>();
|
||||
return externalComponentsRelation->getSlaveOwners().getSubSet<Component*>();
|
||||
}
|
||||
|
||||
void SetExternal(Component* component)
|
||||
{
|
||||
Net* net = component->GetNet();
|
||||
void setExternal(Component* component) {
|
||||
Net* net = component->getNet();
|
||||
if (!net->IsExternal())
|
||||
throw Error("Impossible to set as external a component member of non external net "
|
||||
+ net->GetName()._GetString());
|
||||
StandardRelation* externalComponentsRelation = GetExternalComponentsRelation(net);
|
||||
+ net->getName()._getString());
|
||||
StandardRelation* externalComponentsRelation = getExternalComponentsRelation(net);
|
||||
if (!externalComponentsRelation)
|
||||
externalComponentsRelation = StandardRelation::Create(net, ExternalComponentsRelationName);
|
||||
component->Put(externalComponentsRelation);
|
||||
externalComponentsRelation = StandardRelation::create(net, ExternalComponentsRelationName);
|
||||
component->put(externalComponentsRelation);
|
||||
}
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
namespace Hurricane {
|
||||
|
||||
Components GetExternalComponents(const Net* net);
|
||||
Components getExternalComponents(const Net* net);
|
||||
|
||||
void SetExternal(Component* component);
|
||||
void setExternal(Component* component);
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Net*> NetFilter;
|
|||
#define for_each_net(net, nets)\
|
||||
/******************************/\
|
||||
{\
|
||||
NetLocator _locator = nets.GetLocator();\
|
||||
NetLocator _locator = nets.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Net* net = _locator.GetElement();\
|
||||
Net* net = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -30,13 +30,13 @@ Occurrence::Occurrence(const Entity* entity)
|
|||
Occurrence::Occurrence(const Entity* entity, const Path& path)
|
||||
// ***************************************************
|
||||
: _entity(const_cast<Entity*>(entity)),
|
||||
_sharedPath(path._GetSharedPath())
|
||||
_sharedPath(path._getSharedPath())
|
||||
{
|
||||
if (!_entity) {
|
||||
throw Error("Can't create " + _TName("Occurrence") + " : null entity");
|
||||
}
|
||||
if (_sharedPath)
|
||||
if (_entity->GetCell() != _sharedPath->GetMasterCell())
|
||||
if (_entity->getCell() != _sharedPath->getMasterCell())
|
||||
throw Error("Can't create " + _TName("Occurrence") + " : incompatible path");
|
||||
}
|
||||
|
||||
|
@ -79,52 +79,52 @@ bool Occurrence::operator<(const Occurrence& occurrence) const
|
|||
((_entity == occurrence._entity) && (_sharedPath < occurrence._sharedPath)));
|
||||
}
|
||||
|
||||
Cell* Occurrence::GetOwnerCell() const
|
||||
Cell* Occurrence::getOwnerCell() const
|
||||
// **********************************
|
||||
{
|
||||
if (!_entity) return NULL;
|
||||
return (_sharedPath) ? _sharedPath->GetOwnerCell() : _entity->GetCell();
|
||||
return (_sharedPath) ? _sharedPath->getOwnerCell() : _entity->getCell();
|
||||
}
|
||||
|
||||
Cell* Occurrence::GetMasterCell() const
|
||||
Cell* Occurrence::getMasterCell() const
|
||||
// ***********************************
|
||||
{
|
||||
return (_entity) ? _entity->GetCell() : NULL;
|
||||
return (_entity) ? _entity->getCell() : NULL;
|
||||
}
|
||||
|
||||
Property* Occurrence::GetProperty(const Name& name) const
|
||||
Property* Occurrence::getProperty(const Name& name) const
|
||||
// *****************************************************
|
||||
{
|
||||
if (_entity) {
|
||||
//DBo* quark = _GetQuark();
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) return quark->GetProperty(name);
|
||||
//DBo* quark = _getQuark();
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) return quark->getProperty(name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Properties Occurrence::GetProperties() const
|
||||
Properties Occurrence::getProperties() const
|
||||
// ****************************************
|
||||
{
|
||||
if (_entity) {
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) return quark->GetProperties();
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) return quark->getProperties();
|
||||
}
|
||||
return Properties();
|
||||
}
|
||||
|
||||
Box Occurrence::GetBoundingBox() const
|
||||
Box Occurrence::getBoundingBox() const
|
||||
// **********************************
|
||||
{
|
||||
if (!_entity) return Box();
|
||||
if (!_sharedPath) return _entity->GetBoundingBox();
|
||||
return _sharedPath->GetTransformation().getBox(_entity->GetBoundingBox());
|
||||
if (!_sharedPath) return _entity->getBoundingBox();
|
||||
return _sharedPath->getTransformation().getBox(_entity->getBoundingBox());
|
||||
}
|
||||
|
||||
bool Occurrence::HasProperty() const
|
||||
// ********************************
|
||||
{
|
||||
return (_GetQuark() != NULL);
|
||||
return (_getQuark() != NULL);
|
||||
}
|
||||
|
||||
void Occurrence::MakeInvalid()
|
||||
|
@ -143,9 +143,9 @@ void Occurrence::Put(Property* property)
|
|||
if (!property)
|
||||
throw Error("Can't put property : null property");
|
||||
|
||||
Quark* quark = _GetQuark();
|
||||
Quark* quark = _getQuark();
|
||||
if (!quark) quark = Quark::_Create(*this);
|
||||
quark->Put(property);
|
||||
quark->put(property);
|
||||
}
|
||||
|
||||
void Occurrence::Remove(Property* property)
|
||||
|
@ -157,8 +157,8 @@ void Occurrence::Remove(Property* property)
|
|||
if (!property)
|
||||
throw Error("Can't remove property : null property");
|
||||
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) quark->Remove(property);
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) quark->remove(property);
|
||||
}
|
||||
|
||||
void Occurrence::RemoveProperty(const Name& name)
|
||||
|
@ -167,74 +167,74 @@ void Occurrence::RemoveProperty(const Name& name)
|
|||
if (!_entity)
|
||||
throw Error("Can't remove property : invalid occurrence");
|
||||
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) quark->RemoveProperty(name);
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) quark->removeProperty(name);
|
||||
}
|
||||
|
||||
void Occurrence::ClearProperties()
|
||||
// ******************************
|
||||
{
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) quark->Delete();
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) quark->destroy();
|
||||
}
|
||||
|
||||
string Occurrence::_GetString() const
|
||||
string Occurrence::_getString() const
|
||||
// *********************************
|
||||
{
|
||||
string s = "<" + _TName("Occurrence");
|
||||
if (_entity) {
|
||||
s += " ";
|
||||
s += GetString(GetOwnerCell());
|
||||
s += getString(getOwnerCell());
|
||||
s += ":";
|
||||
if (_sharedPath) s += GetString(_sharedPath->GetName()) + ":";
|
||||
s += GetString(_entity);
|
||||
if (_sharedPath) s += getString(_sharedPath->getName()) + ":";
|
||||
s += getString(_entity);
|
||||
}
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Occurrence::_GetRecord() const
|
||||
Record* Occurrence::_getRecord() const
|
||||
// ****************************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (_entity) {
|
||||
record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Entity", _entity));
|
||||
record->Add(GetSlot("SharedPath", _sharedPath));
|
||||
Quark* quark = _GetQuark();
|
||||
if (quark) record->Add(GetSlot("Quark", quark));
|
||||
record = new Record(getString(this));
|
||||
record->Add(getSlot("Entity", _entity));
|
||||
record->Add(getSlot("SharedPath", _sharedPath));
|
||||
Quark* quark = _getQuark();
|
||||
if (quark) record->Add(getSlot("Quark", quark));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
//DBo* ...
|
||||
Quark* Occurrence::_GetQuark() const
|
||||
Quark* Occurrence::_getQuark() const
|
||||
// ********************************
|
||||
{
|
||||
return (_entity) ? _entity->_GetQuark(_sharedPath) : NULL;
|
||||
return (_entity) ? _entity->_getQuark(_sharedPath) : NULL;
|
||||
}
|
||||
|
||||
string Occurrence::GetName() const
|
||||
string Occurrence::getName() const
|
||||
// *******************************
|
||||
{
|
||||
string description;
|
||||
|
||||
if (_sharedPath)
|
||||
description=_sharedPath->GetName()+SharedPath::GetNameSeparator();
|
||||
description=_sharedPath->getName()+SharedPath::getNameSeparator();
|
||||
|
||||
if (Plug* plug= dynamic_cast<Plug*>(_entity))
|
||||
description += plug->GetName();
|
||||
description += plug->getName();
|
||||
else if (Pin* pin= dynamic_cast<Pin*>(_entity))
|
||||
description += GetString(pin->GetName());
|
||||
description += getString(pin->getName());
|
||||
else if (Net* net= dynamic_cast<Net*>(_entity))
|
||||
description += GetString(net->GetName());
|
||||
description += getString(net->getName());
|
||||
else if (Cell* cell= dynamic_cast<Cell*>(_entity))
|
||||
description += GetString(cell->GetName());
|
||||
description += getString(cell->getName());
|
||||
else if (Instance* instance= dynamic_cast<Instance*>(_entity))
|
||||
description += GetString(instance->GetName());
|
||||
description += getString(instance->getName());
|
||||
else
|
||||
description+= GetString(_entity);
|
||||
//throw Error("[Occurrence::GetName] No Name for "+GetString(_entity));
|
||||
description+= getString(_entity);
|
||||
//throw Error("[Occurrence::getName] No Name for "+getString(_entity));
|
||||
|
||||
return description;
|
||||
}
|
||||
|
|
|
@ -52,13 +52,13 @@ class Occurrence {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: Entity* GetEntity() const {return _entity;};
|
||||
public: Path GetPath() const {return Path(_sharedPath);};
|
||||
public: Cell* GetOwnerCell() const;
|
||||
public: Cell* GetMasterCell() const;
|
||||
public: Property* GetProperty(const Name& name) const;
|
||||
public: Properties GetProperties() const;
|
||||
public: Box GetBoundingBox() const;
|
||||
public: Entity* getEntity() const {return _entity;};
|
||||
public: Path getPath() const {return Path(_sharedPath);};
|
||||
public: Cell* getOwnerCell() const;
|
||||
public: Cell* getMasterCell() const;
|
||||
public: Property* getProperty(const Name& name) const;
|
||||
public: Properties getProperties() const;
|
||||
public: Box getBoundingBox() const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -78,12 +78,12 @@ class Occurrence {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string GetName() const;
|
||||
public: string _GetTypeName() const { return _TName("Occurrence"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: SharedPath* _GetSharedPath() const {return _sharedPath;};
|
||||
public: Quark* _GetQuark() const;
|
||||
public: string getName() const;
|
||||
public: string _getTypeName() const { return _TName("Occurrence"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
public: SharedPath* _getSharedPath() const {return _sharedPath;};
|
||||
public: Quark* _getQuark() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ typedef GenericFilter<Occurrence> OccurrenceFilter;
|
|||
#define for_each_occurrence(occurrence, occurrences)\
|
||||
/************************************************/\
|
||||
{\
|
||||
OccurrenceLocator _locator = occurrences.GetLocator();\
|
||||
OccurrenceLocator _locator = occurrences.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Occurrence occurrence = _locator.GetElement();\
|
||||
Occurrence occurrence = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -37,24 +37,24 @@ Pad* Pad::Create(Net* net, Layer* layer, const Box& boundingBox)
|
|||
{
|
||||
Pad* pad = new Pad(net, layer, boundingBox);
|
||||
|
||||
pad->_PostCreate();
|
||||
pad->_postCreate();
|
||||
|
||||
return pad;
|
||||
}
|
||||
|
||||
Unit Pad::GetX() const
|
||||
Unit Pad::getX() const
|
||||
// *******************
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Unit Pad::GetY() const
|
||||
Unit Pad::getY() const
|
||||
// *******************
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Box Pad::GetBoundingBox() const
|
||||
Box Pad::getBoundingBox() const
|
||||
// ****************************
|
||||
{
|
||||
Box boundingBox = _boundingBox;
|
||||
|
@ -65,7 +65,7 @@ Box Pad::GetBoundingBox() const
|
|||
return boundingBox;
|
||||
}
|
||||
|
||||
Box Pad::GetBoundingBox(const BasicLayer* basicLayer) const
|
||||
Box Pad::getBoundingBox(const BasicLayer* basicLayer) const
|
||||
// **************************************************
|
||||
{
|
||||
if (!_layer->contains(basicLayer)) return Box();
|
||||
|
@ -99,48 +99,26 @@ void Pad::SetBoundingBox(const Box& boundingBox)
|
|||
}
|
||||
}
|
||||
|
||||
string Pad::_GetString() const
|
||||
string Pad::_getString() const
|
||||
// ***************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_layer->getName()));
|
||||
s.insert(s.length() - 1, " " + GetString(_boundingBox));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_layer->getName()));
|
||||
s.insert(s.length() - 1, " " + getString(_boundingBox));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Pad::_GetRecord() const
|
||||
Record* Pad::_getRecord() const
|
||||
// **********************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Layer", _layer));
|
||||
record->Add(GetSlot("BoundingBox", &_boundingBox));
|
||||
record->Add(getSlot("Layer", _layer));
|
||||
record->Add(getSlot("BoundingBox", &_boundingBox));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
//void Pad::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
|
||||
//// ****************************************************************************************************
|
||||
//{
|
||||
// Unit width = _boundingBox.GetWidth();
|
||||
// Unit height = _boundingBox.GetHeight();
|
||||
// if (1 < view->GetScreenSize(max(width, height))) {
|
||||
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
|
||||
// view->DrawRectangle(transformation.GetBox(GetBoundingBox(basicLayer))); // PROVISOIREMENT
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//void Pad::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// ******************************************************************************************
|
||||
//{
|
||||
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
|
||||
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
|
||||
// view->DrawRectangle(transformation.GetBox(GetBoundingBox(basicLayer))); // PROVISOIREMENT
|
||||
// end_for;
|
||||
// }
|
||||
//}
|
||||
//
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
// 21-10-2003 Alignment BULL-LIP6
|
||||
|
||||
#ifndef HURRICANE_PAD
|
||||
#define HURRICANE_PAD
|
||||
|
@ -45,11 +44,11 @@ class Pad : public Component {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Unit GetX() const;
|
||||
public: virtual Unit GetY() const;
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Layer* GetLayer() const {return _layer;};
|
||||
public: virtual Unit getX() const;
|
||||
public: virtual Unit getY() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Layer* getLayer() const {return _layer;};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -60,12 +59,9 @@ class Pad : public Component {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Pad");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
|
||||
// public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation);
|
||||
// public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
public: virtual string _getTypeName() const {return _TName("Pad");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ typedef GenericFilter<Pad*> PadFilter;
|
|||
#define for_each_pad(pad, pads)\
|
||||
/******************************/\
|
||||
{\
|
||||
PadLocator _locator = pads.GetLocator();\
|
||||
PadLocator _locator = pads.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Pad* pad = _locator.GetElement();\
|
||||
Pad* pad = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ Path::Path(Instance* instance)
|
|||
: _sharedPath(NULL)
|
||||
{
|
||||
if (instance) {
|
||||
_sharedPath = instance->_GetSharedPath(NULL);
|
||||
_sharedPath = instance->_getSharedPath(NULL);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(instance);
|
||||
}
|
||||
}
|
||||
|
@ -41,16 +41,16 @@ Path::Path(Instance* headInstance, const Path& tailPath)
|
|||
if (!headInstance)
|
||||
throw Error("Cant't create " + _TName("Path") + " : null head instance");
|
||||
|
||||
if (!tailPath._GetSharedPath()) {
|
||||
_sharedPath = headInstance->_GetSharedPath(NULL);
|
||||
if (!tailPath._getSharedPath()) {
|
||||
_sharedPath = headInstance->_getSharedPath(NULL);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(headInstance);
|
||||
}
|
||||
else {
|
||||
SharedPath* tailSharedPath = tailPath._GetSharedPath();
|
||||
if (tailSharedPath->GetOwnerCell() != headInstance->GetMasterCell())
|
||||
SharedPath* tailSharedPath = tailPath._getSharedPath();
|
||||
if (tailSharedPath->getOwnerCell() != headInstance->getMasterCell())
|
||||
throw Error("Cant't create " + _TName("Path") + " : incompatible tail path");
|
||||
|
||||
_sharedPath = headInstance->_GetSharedPath(tailSharedPath);
|
||||
_sharedPath = headInstance->_getSharedPath(tailSharedPath);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath);
|
||||
}
|
||||
}
|
||||
|
@ -62,29 +62,29 @@ Path::Path(const Path& headPath, Instance* tailInstance)
|
|||
if (!tailInstance)
|
||||
throw Error("Cant't create " + _TName("Path") + " : null tail instance");
|
||||
|
||||
if (!headPath._GetSharedPath()) {
|
||||
_sharedPath = tailInstance->_GetSharedPath(NULL);
|
||||
if (!headPath._getSharedPath()) {
|
||||
_sharedPath = tailInstance->_getSharedPath(NULL);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(tailInstance);
|
||||
}
|
||||
else {
|
||||
Instance* headInstance = headPath.GetHeadInstance();
|
||||
SharedPath* tailSharedPath = Path(headPath.GetTailPath(), tailInstance)._GetSharedPath();
|
||||
_sharedPath = headInstance->_GetSharedPath(tailSharedPath);
|
||||
Instance* headInstance = headPath.getHeadInstance();
|
||||
SharedPath* tailSharedPath = Path(headPath.getTailPath(), tailInstance)._getSharedPath();
|
||||
_sharedPath = headInstance->_getSharedPath(tailSharedPath);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath);
|
||||
}
|
||||
}
|
||||
|
||||
Path::Path(const Path& headPath, const Path& tailPath)
|
||||
// *****************************************************
|
||||
: _sharedPath(tailPath._GetSharedPath())
|
||||
: _sharedPath(tailPath._getSharedPath())
|
||||
{
|
||||
vector<Instance*> instances;
|
||||
headPath.GetInstances().Fill(instances);
|
||||
headPath.getInstances().Fill(instances);
|
||||
|
||||
for (vector<Instance*>::reverse_iterator rit=instances.rbegin() ; rit != instances.rend() ; rit++)
|
||||
{ Instance* instance=*rit;
|
||||
SharedPath* sharedPath = _sharedPath;
|
||||
_sharedPath = instance->_GetSharedPath(sharedPath);
|
||||
_sharedPath = instance->_getSharedPath(sharedPath);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(instance,sharedPath);
|
||||
}
|
||||
}
|
||||
|
@ -96,12 +96,12 @@ Path::Path(Cell* cell, const string& pathName)
|
|||
if (cell) {
|
||||
list<Instance*> instanceList;
|
||||
string restOfPathName = pathName;
|
||||
char nameSeparator = GetNameSeparator();
|
||||
char nameSeparator = getNameSeparator();
|
||||
while (!restOfPathName.empty()) {
|
||||
size_t pos = restOfPathName.find(nameSeparator);
|
||||
Instance* instance = cell->GetInstance(restOfPathName.substr(0, pos));
|
||||
Instance* instance = cell->getInstance(restOfPathName.substr(0, pos));
|
||||
if (!instance) throw Error("Cant't create " + _TName("Path") + " : invalid path name");
|
||||
cell = instance->GetMasterCell();
|
||||
cell = instance->getMasterCell();
|
||||
restOfPathName = (pos == string::npos) ? string("") : restOfPathName.substr(pos + 1);
|
||||
instanceList.push_back(instance);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ Path::Path(Cell* cell, const string& pathName)
|
|||
while (instanceIterator != instanceList.rend()) {
|
||||
Instance* headInstance = *instanceIterator;
|
||||
SharedPath* tailSharedPath = _sharedPath;
|
||||
_sharedPath = headInstance->_GetSharedPath(tailSharedPath);
|
||||
_sharedPath = headInstance->_getSharedPath(tailSharedPath);
|
||||
if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath);
|
||||
++instanceIterator;
|
||||
}
|
||||
|
@ -154,64 +154,64 @@ bool Path::operator<(const Path& path) const
|
|||
return (_sharedPath < path._sharedPath);
|
||||
}
|
||||
|
||||
Instance* Path::GetHeadInstance() const
|
||||
Instance* Path::getHeadInstance() const
|
||||
// ************************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetHeadInstance() : NULL;
|
||||
return (_sharedPath) ? _sharedPath->getHeadInstance() : NULL;
|
||||
}
|
||||
|
||||
Path Path::GetTailPath() const
|
||||
Path Path::getTailPath() const
|
||||
// ***************************
|
||||
{
|
||||
return Path((_sharedPath) ? _sharedPath->GetTailSharedPath() : NULL);
|
||||
return Path((_sharedPath) ? _sharedPath->getTailSharedPath() : NULL);
|
||||
}
|
||||
|
||||
Path Path::GetHeadPath() const
|
||||
Path Path::getHeadPath() const
|
||||
// ***************************
|
||||
{
|
||||
return Path((_sharedPath) ? _sharedPath->GetHeadSharedPath() : NULL);
|
||||
return Path((_sharedPath) ? _sharedPath->getHeadSharedPath() : NULL);
|
||||
}
|
||||
|
||||
Instance* Path::GetTailInstance() const
|
||||
Instance* Path::getTailInstance() const
|
||||
// ************************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetTailInstance() : NULL;
|
||||
return (_sharedPath) ? _sharedPath->getTailInstance() : NULL;
|
||||
}
|
||||
|
||||
char Path::GetNameSeparator()
|
||||
char Path::getNameSeparator()
|
||||
// **************************
|
||||
{
|
||||
return SharedPath::GetNameSeparator();
|
||||
return SharedPath::getNameSeparator();
|
||||
}
|
||||
|
||||
string Path::GetName() const
|
||||
string Path::getName() const
|
||||
// *************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetName() : string("");
|
||||
return (_sharedPath) ? _sharedPath->getName() : string("");
|
||||
}
|
||||
|
||||
Cell* Path::GetOwnerCell() const
|
||||
Cell* Path::getOwnerCell() const
|
||||
// *****************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetOwnerCell() : NULL;
|
||||
return (_sharedPath) ? _sharedPath->getOwnerCell() : NULL;
|
||||
}
|
||||
|
||||
Cell* Path::GetMasterCell() const
|
||||
Cell* Path::getMasterCell() const
|
||||
// ******************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetMasterCell() : NULL;
|
||||
return (_sharedPath) ? _sharedPath->getMasterCell() : NULL;
|
||||
}
|
||||
|
||||
Instances Path::GetInstances() const
|
||||
Instances Path::getInstances() const
|
||||
// *********************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetInstances() : Instances();
|
||||
return (_sharedPath) ? _sharedPath->getInstances() : Instances();
|
||||
}
|
||||
|
||||
Transformation Path::GetTransformation(const Transformation& transformation) const
|
||||
Transformation Path::getTransformation(const Transformation& transformation) const
|
||||
// *******************************************************************************
|
||||
{
|
||||
return (_sharedPath) ? _sharedPath->GetTransformation(transformation) : transformation;
|
||||
return (_sharedPath) ? _sharedPath->getTransformation(transformation) : transformation;
|
||||
}
|
||||
|
||||
bool Path::IsEmpty() const
|
||||
|
@ -232,25 +232,25 @@ void Path::SetNameSeparator(char nameSeparator)
|
|||
SharedPath::SetNameSeparator(nameSeparator);
|
||||
}
|
||||
|
||||
string Path::_GetString() const
|
||||
string Path::_getString() const
|
||||
// ****************************
|
||||
{
|
||||
string s = "<" + _TName("Path");
|
||||
if (!_sharedPath)
|
||||
s += " empty";
|
||||
else
|
||||
s += " " + GetString(GetName());
|
||||
s += " " + getString(getName());
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Path::_GetRecord() const
|
||||
Record* Path::_getRecord() const
|
||||
// ***********************
|
||||
{
|
||||
Record* record = NULL;
|
||||
if (_sharedPath) {
|
||||
record = new Record(GetString(this));
|
||||
record->Add(GetSlot("SharedPath", _sharedPath));
|
||||
record = new Record(getString(this));
|
||||
record->Add(getSlot("SharedPath", _sharedPath));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
|
|
@ -58,17 +58,17 @@ class Path {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: static char GetNameSeparator();
|
||||
public: static char getNameSeparator();
|
||||
|
||||
public: Instance* GetHeadInstance() const;
|
||||
public: Path GetTailPath() const;
|
||||
public: Path GetHeadPath() const;
|
||||
public: Instance* GetTailInstance() const;
|
||||
public: string GetName() const;
|
||||
public: Cell* GetOwnerCell() const;
|
||||
public: Cell* GetMasterCell() const;
|
||||
public: Instances GetInstances() const;
|
||||
public: Transformation GetTransformation(const Transformation& transformation = Transformation()) const;
|
||||
public: Instance* getHeadInstance() const;
|
||||
public: Path getTailPath() const;
|
||||
public: Path getHeadPath() const;
|
||||
public: Instance* getTailInstance() const;
|
||||
public: string getName() const;
|
||||
public: Cell* getOwnerCell() const;
|
||||
public: Cell* getMasterCell() const;
|
||||
public: Instances getInstances() const;
|
||||
public: Transformation getTransformation(const Transformation& transformation = Transformation()) const;
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -84,11 +84,11 @@ class Path {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Occurrence"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Occurrence"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
public: SharedPath* _GetSharedPath() const {return _sharedPath;};
|
||||
public: SharedPath* _getSharedPath() const {return _sharedPath;};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ typedef GenericFilter<Path> PathFilter;
|
|||
#define for_each_path(path, pathes)\
|
||||
/**********************************/\
|
||||
{\
|
||||
PathLocator _locator = pathes.GetLocator();\
|
||||
PathLocator _locator = pathes.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Path path = _locator.GetElement();\
|
||||
Path path = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Pin::Pin(Net* net, const Name& name, const AccessDirection& accessDirection, con
|
|||
_placementStatus(placementStatus),
|
||||
_nextOfCellPinMap(NULL)
|
||||
{
|
||||
if (GetCell()->GetPin(name))
|
||||
if (getCell()->getPin(name))
|
||||
throw Error("Can't create " + _TName("Pin") + " : already exists");
|
||||
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ Pin* Pin::Create(Net* net, const Name& name, const AccessDirection& accessDirect
|
|||
|
||||
Pin* pin = new Pin(net, name, accessDirection, placementStatus, layer, x, y, width, height);
|
||||
|
||||
pin->_PostCreate();
|
||||
pin->_postCreate();
|
||||
|
||||
return pin;
|
||||
}
|
||||
|
@ -56,39 +56,39 @@ void Pin::SetPlacementStatus(const PlacementStatus& placementstatus)
|
|||
}
|
||||
}
|
||||
|
||||
void Pin::_PostCreate()
|
||||
void Pin::_postCreate()
|
||||
// **********************
|
||||
{
|
||||
GetCell()->_GetPinMap()._Insert(this);
|
||||
getCell()->_getPinMap()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Pin::_PreDelete()
|
||||
void Pin::_preDestroy()
|
||||
// *********************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
GetCell()->_GetPinMap()._Remove(this);
|
||||
getCell()->_getPinMap()._Remove(this);
|
||||
}
|
||||
|
||||
string Pin::_GetString() const
|
||||
string Pin::_getString() const
|
||||
// *****************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetString(_name));
|
||||
s.insert(s.length() - 1, " " + GetString(_accessDirection));
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getString(_name));
|
||||
s.insert(s.length() - 1, " " + getString(_accessDirection));
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Pin::_GetRecord() const
|
||||
Record* Pin::_getRecord() const
|
||||
// ************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Name", &_name));
|
||||
record->Add(GetSlot("AccessDirection", &_accessDirection));
|
||||
record->Add(GetSlot("PlacementStatus", &_placementStatus));
|
||||
record->Add(getSlot("Name", &_name));
|
||||
record->Add(getSlot("AccessDirection", &_accessDirection));
|
||||
record->Add(getSlot("PlacementStatus", &_placementStatus));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
@ -96,56 +96,56 @@ Record* Pin::_GetRecord() const
|
|||
//void Pin::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
|
||||
//// *************************************************************************************************************
|
||||
//{
|
||||
// view->FillRectangle(transformation.GetBox(GetBoundingBox(basicLayer)), true);
|
||||
// view->FillRectangle(transformation.getBox(getBoundingBox(basicLayer)), true);
|
||||
//}
|
||||
//
|
||||
//void Pin::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
|
||||
//// ******************************************************************************************
|
||||
//{
|
||||
// if (_width && _height) {
|
||||
// if (1 < view->GetScreenSize(max(_width, _height))) {
|
||||
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
|
||||
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
|
||||
// if (1 < view->getScreenSize(max(_width, _height))) {
|
||||
// for_each_basic_layer(basicLayer, getLayer()->getBasicLayers()) {
|
||||
// basicLayer->_Fill(view, transformation.getBox(getBoundingBox(basicLayer)));
|
||||
// end_for;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (view->GetScale() <= 1)
|
||||
// view->DrawPoint(transformation.GetPoint(GetPosition()), 1);
|
||||
// else if (view->GetScale() <= 3)
|
||||
// if (view->getScale() <= 1)
|
||||
// view->DrawPoint(transformation.getPoint(getPosition()), 1);
|
||||
// else if (view->getScale() <= 3)
|
||||
// {
|
||||
// view->DrawPoint(transformation.GetPoint(GetPosition()), 2);
|
||||
// view->DrawPoint(transformation.getPoint(getPosition()), 2);
|
||||
//
|
||||
// if ( view->IsTextVisible() )
|
||||
// {
|
||||
// string text = "("
|
||||
// + GetString ( GetValue ( GetX() ) ) + ","
|
||||
// + GetString ( GetValue ( GetY() ) ) + ")";
|
||||
// + getString ( getValue ( getX() ) ) + ","
|
||||
// + getString ( getValue ( getY() ) ) + ")";
|
||||
// view->DrawString ( text,
|
||||
// transformation.GetBox ( GetBoundingBox() ).GetXMin(),
|
||||
// transformation.GetBox ( GetBoundingBox() ).GetYMax() );
|
||||
// transformation.getBox ( getBoundingBox() ).getXMin(),
|
||||
// transformation.getBox ( getBoundingBox() ).getYMax() );
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// Point position = GetPosition();
|
||||
// view->DrawPoint(transformation.GetPoint(position), 3);
|
||||
// Point position = getPosition();
|
||||
// view->DrawPoint(transformation.getPoint(position), 3);
|
||||
// if (_width) {
|
||||
// Box box = transformation.GetBox(Box(position).Inflate(GetHalfWidth(), 0));
|
||||
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
|
||||
// Box box = transformation.getBox(Box(position).Inflate(getHalfWidth(), 0));
|
||||
// view->DrawLine(box.getXMin(), box.getYMin(), box.getXMax(), box.getYMax());
|
||||
// }
|
||||
// if (_height) {
|
||||
// Box box = transformation.GetBox(Box(position).Inflate(0, GetHalfHeight()));
|
||||
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
|
||||
// Box box = transformation.getBox(Box(position).Inflate(0, getHalfHeight()));
|
||||
// view->DrawLine(box.getXMin(), box.getYMin(), box.getXMax(), box.getYMax());
|
||||
// }
|
||||
//
|
||||
// if ( view->IsTextVisible() )
|
||||
// {
|
||||
// string text = GetString ( _name ) + "("
|
||||
// + GetString ( GetValue ( GetX() ) ) + ","
|
||||
// + GetString ( GetValue ( GetY() ) ) + ")";
|
||||
// string text = getString ( _name ) + "("
|
||||
// + getString ( getValue ( getX() ) ) + ","
|
||||
// + getString ( getValue ( getY() ) ) + ")";
|
||||
// view->DrawString ( text,
|
||||
// transformation.GetBox ( GetBoundingBox() ).GetXMin(),
|
||||
// transformation.GetBox ( GetBoundingBox() ).GetYMax() );
|
||||
// transformation.getBox ( getBoundingBox() ).getXMin(),
|
||||
// transformation.getBox ( getBoundingBox() ).getYMax() );
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
@ -174,7 +174,7 @@ Pin::AccessDirection& Pin::AccessDirection::operator=(const AccessDirection& acc
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Pin::AccessDirection::_GetString() const
|
||||
string Pin::AccessDirection::_getString() const
|
||||
// **********************************************
|
||||
{
|
||||
switch (_code) {
|
||||
|
@ -187,11 +187,11 @@ string Pin::AccessDirection::_GetString() const
|
|||
return "ABNORMAL";
|
||||
}
|
||||
|
||||
Record* Pin::AccessDirection::_GetRecord() const
|
||||
Record* Pin::AccessDirection::_getRecord() const
|
||||
// *****************************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", (int)_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", (int)_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ Pin::PlacementStatus& Pin::PlacementStatus::operator=(const PlacementStatus& pla
|
|||
return *this;
|
||||
}
|
||||
|
||||
string Pin::PlacementStatus::_GetString() const
|
||||
string Pin::PlacementStatus::_getString() const
|
||||
// ********************************************
|
||||
{
|
||||
switch (_code) {
|
||||
|
@ -231,11 +231,11 @@ string Pin::PlacementStatus::_GetString() const
|
|||
return "ABNORMAL";
|
||||
}
|
||||
|
||||
Record* Pin::PlacementStatus::_GetRecord() const
|
||||
Record* Pin::PlacementStatus::_getRecord() const
|
||||
// ***************************************
|
||||
{
|
||||
Record* record = new Record(GetString(this));
|
||||
record->Add(GetSlot("Code", (int)_code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", (int)_code));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,11 +44,11 @@ class Pin : public Contact {
|
|||
|
||||
public: operator const Code&() const {return _code;};
|
||||
|
||||
public: const Code& GetCode() const {return _code;};
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Pin::AccessDirection"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Pin::AccessDirection"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -66,11 +66,11 @@ class Pin : public Contact {
|
|||
|
||||
public: operator const Code&() const {return _code;};
|
||||
|
||||
public: const Code& GetCode() const {return _code;};
|
||||
public: const Code& getCode() const {return _code;};
|
||||
|
||||
public: string _GetTypeName() const { return _TName("Pin::PlacementStatus"); };
|
||||
public: string _GetString() const;
|
||||
public: Record* _GetRecord() const;
|
||||
public: string _getTypeName() const { return _TName("Pin::PlacementStatus"); };
|
||||
public: string _getString() const;
|
||||
public: Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -92,9 +92,9 @@ class Pin : public Contact {
|
|||
// Accessors
|
||||
// *********
|
||||
|
||||
public: const Name& GetName() const {return _name;};
|
||||
public: const AccessDirection& GetAccessDirection() const {return _accessDirection;};
|
||||
public: const PlacementStatus& GetPlacementStatus() const {return _placementStatus;};
|
||||
public: const Name& getName() const {return _name;};
|
||||
public: const AccessDirection& getAccessDirection() const {return _accessDirection;};
|
||||
public: const PlacementStatus& getPlacementStatus() const {return _placementStatus;};
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
@ -111,21 +111,18 @@ class Pin : public Contact {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
protected: virtual void _PreDelete();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string _GetTypeName() const {return _TName("Pin");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Pin");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: Pin* _GetNextOfCellPinMap() const {return _nextOfCellPinMap;};
|
||||
public: Pin* _getNextOfCellPinMap() const {return _nextOfCellPinMap;};
|
||||
|
||||
public: void _SetNextOfCellPinMap(Pin* pin) {_nextOfCellPinMap = pin;};
|
||||
|
||||
//public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation);
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ typedef GenericFilter<Pin*> PinFilter;
|
|||
#define for_each_pin(pin, pins)\
|
||||
/******************************/\
|
||||
{\
|
||||
PinLocator _locator = pins.GetLocator();\
|
||||
PinLocator _locator = pins.getLocator();\
|
||||
while (_locator.IsValid()) {\
|
||||
Pin* pin = _locator.GetElement();\
|
||||
Pin* pin = _locator.getElement();\
|
||||
_locator.Progress();
|
||||
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ class Plug_IsConnectedFilter : public Filter<Plug*> {
|
|||
|
||||
public: Plug_IsConnectedFilter& operator=(const Plug_IsConnectedFilter& filter) {return *this;};
|
||||
|
||||
public: virtual Filter<Plug*>* GetClone() const {return new Plug_IsConnectedFilter(*this);};
|
||||
public: virtual Filter<Plug*>* getClone() const {return new Plug_IsConnectedFilter(*this);};
|
||||
|
||||
public: virtual bool Accept(Plug* plug) const {return plug->IsConnected();};
|
||||
|
||||
public: virtual string _GetString() const {return "<" + _TName("Plug::IsConnectedFilter>");};
|
||||
public: virtual string _getString() const {return "<" + _TName("Plug::IsConnectedFilter>");};
|
||||
|
||||
};
|
||||
|
||||
|
@ -54,65 +54,65 @@ Plug::Plug(Instance* instance, Net* masterNet)
|
|||
if (!_masterNet)
|
||||
throw Error("Can't create " + _TName("Plug") + " : null master net");
|
||||
|
||||
if (_masterNet->GetCell() != _instance->GetMasterCell())
|
||||
if (_masterNet->getCell() != _instance->getMasterCell())
|
||||
throw Error("Can't create " + _TName("Plug") + " : incompatible master net");
|
||||
|
||||
if (!_masterNet->IsExternal())
|
||||
throw Error("Can't create " + _TName("Plug") + " : not an external master net");
|
||||
|
||||
if (_instance->GetPlug(_masterNet))
|
||||
if (_instance->getPlug(_masterNet))
|
||||
throw Error("Can't create " + _TName("Plug") + " : already exists");
|
||||
}
|
||||
|
||||
void Plug::Delete()
|
||||
void Plug::destroy()
|
||||
// ****************
|
||||
{
|
||||
throw Error("Abnormal deletion of " + _TName("Plug"));
|
||||
}
|
||||
|
||||
Cell* Plug::GetCell() const
|
||||
Cell* Plug::getCell() const
|
||||
// ************************
|
||||
{
|
||||
return _instance->GetCell();
|
||||
return _instance->getCell();
|
||||
}
|
||||
|
||||
Unit Plug::GetX() const
|
||||
Unit Plug::getX() const
|
||||
// ********************
|
||||
{
|
||||
return _instance->GetTransformation().getX(_masterNet->GetPosition());
|
||||
return _instance->getTransformation().getX(_masterNet->getPosition());
|
||||
}
|
||||
|
||||
Unit Plug::GetY() const
|
||||
Unit Plug::getY() const
|
||||
// ********************
|
||||
{
|
||||
return _instance->GetTransformation().getY(_masterNet->GetPosition());
|
||||
return _instance->getTransformation().getY(_masterNet->getPosition());
|
||||
}
|
||||
|
||||
Point Plug::GetPosition() const
|
||||
Point Plug::getPosition() const
|
||||
// ****************************
|
||||
{
|
||||
return _instance->GetTransformation().getPoint(_masterNet->GetPosition());
|
||||
return _instance->getTransformation().getPoint(_masterNet->getPosition());
|
||||
}
|
||||
|
||||
Box Plug::GetBoundingBox() const
|
||||
Box Plug::getBoundingBox() const
|
||||
// *****************************
|
||||
{
|
||||
return _instance->GetTransformation().getBox(_masterNet->GetPosition());
|
||||
return _instance->getTransformation().getBox(_masterNet->getPosition());
|
||||
}
|
||||
|
||||
Box Plug::GetBoundingBox(const BasicLayer* basicLayer) const
|
||||
Box Plug::getBoundingBox(const BasicLayer* basicLayer) const
|
||||
// ***************************************************
|
||||
{
|
||||
return Box();
|
||||
}
|
||||
|
||||
PlugFilter Plug::GetIsConnectedFilter()
|
||||
PlugFilter Plug::getIsConnectedFilter()
|
||||
// ************************************
|
||||
{
|
||||
return Plug_IsConnectedFilter();
|
||||
}
|
||||
|
||||
PlugFilter Plug::GetIsUnconnectedFilter()
|
||||
PlugFilter Plug::getIsUnconnectedFilter()
|
||||
// **************************************
|
||||
{
|
||||
return !Plug_IsConnectedFilter();
|
||||
|
@ -131,12 +131,12 @@ void Plug::Unmaterialize()
|
|||
void Plug::SetNet(Net* net)
|
||||
// ************************
|
||||
{
|
||||
if (net != GetNet()) {
|
||||
if (net != getNet()) {
|
||||
|
||||
if (net && (GetCell() != net->GetCell()))
|
||||
throw Error("Can't change net of plug : net : " + GetString(net) + "does not belong to the cell : " + GetString(GetCell()));
|
||||
if (net && (getCell() != net->getCell()))
|
||||
throw Error("Can't change net of plug : net : " + getString(net) + "does not belong to the cell : " + getString(getCell()));
|
||||
|
||||
if (!GetBodyHook()->GetSlaveHooks().IsEmpty())
|
||||
if (!getBodyHook()->getSlaveHooks().IsEmpty())
|
||||
throw Error("Can't change net of plug : not empty slave hooks");
|
||||
|
||||
_SetNet(net);
|
||||
|
@ -148,66 +148,66 @@ Plug* Plug::_Create(Instance* instance, Net* masterNet)
|
|||
{
|
||||
Plug* plug = new Plug(instance, masterNet);
|
||||
|
||||
plug->_PostCreate();
|
||||
plug->_postCreate();
|
||||
|
||||
return plug;
|
||||
}
|
||||
|
||||
void Plug::_PostCreate()
|
||||
void Plug::_postCreate()
|
||||
// *********************
|
||||
{
|
||||
_instance->_GetPlugMap()._Insert(this);
|
||||
_instance->_getPlugMap()._Insert(this);
|
||||
|
||||
Inherit::_PostCreate();
|
||||
Inherit::_postCreate();
|
||||
}
|
||||
|
||||
void Plug::_Delete()
|
||||
void Plug::_destroy()
|
||||
// *****************
|
||||
{
|
||||
_PreDelete();
|
||||
_preDestroy();
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
void Plug::_PreDelete()
|
||||
void Plug::_preDestroy()
|
||||
// ********************
|
||||
{
|
||||
// trace << "entering Plug::_PreDelete: " << this << endl;
|
||||
// trace << "entering Plug::_preDestroy: " << this << endl;
|
||||
// trace_in();
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_instance->_GetPlugMap()._Remove(this);
|
||||
_instance->_getPlugMap()._Remove(this);
|
||||
|
||||
// trace << "exiting Plug::_PreDelete:" << endl;
|
||||
// trace << "exiting Plug::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
}
|
||||
|
||||
string Plug::_GetString() const
|
||||
string Plug::_getString() const
|
||||
// ****************************
|
||||
{
|
||||
string s = Inherit::_GetString();
|
||||
s.insert(s.length() - 1, " " + GetName());
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length() - 1, " " + getName());
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* Plug::_GetRecord() const
|
||||
Record* Plug::_getRecord() const
|
||||
// ***********************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
if (record) {
|
||||
record->Add(GetSlot("Instance", _instance));
|
||||
record->Add(GetSlot("MasterNet", _masterNet));
|
||||
record->Add(getSlot("Instance", _instance));
|
||||
record->Add(getSlot("MasterNet", _masterNet));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
string Plug::GetName() const
|
||||
string Plug::getName() const
|
||||
// *************************
|
||||
{
|
||||
return GetString(_instance->GetName())
|
||||
return getString(_instance->getName())
|
||||
+ "."
|
||||
+ GetString(_masterNet->GetName());
|
||||
+ getString(_masterNet->getName());
|
||||
}
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -44,31 +44,31 @@ class Plug : public Component {
|
|||
// Destructor
|
||||
// **********
|
||||
|
||||
public: virtual void Delete();
|
||||
public: virtual void destroy();
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: virtual Cell* GetCell() const;
|
||||
public: virtual Unit GetX() const;
|
||||
public: virtual Unit GetY() const;
|
||||
public: virtual Point GetPosition() const;
|
||||
public: virtual Box GetBoundingBox() const;
|
||||
public: virtual Layer* GetLayer() const {return NULL;};
|
||||
public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Instance* GetInstance() const {return _instance;};
|
||||
public: Net* GetMasterNet() const {return _masterNet;};
|
||||
public: virtual Cell* getCell() const;
|
||||
public: virtual Unit getX() const;
|
||||
public: virtual Unit getY() const;
|
||||
public: virtual Point getPosition() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Layer* getLayer() const {return NULL;};
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Instance* getInstance() const {return _instance;};
|
||||
public: Net* getMasterNet() const {return _masterNet;};
|
||||
|
||||
// Filters
|
||||
// *******
|
||||
|
||||
public: static PlugFilter GetIsConnectedFilter();
|
||||
public: static PlugFilter GetIsUnconnectedFilter();
|
||||
public: static PlugFilter getIsConnectedFilter();
|
||||
public: static PlugFilter getIsUnconnectedFilter();
|
||||
|
||||
// Predicates
|
||||
// **********
|
||||
|
||||
public: bool IsConnected() const {return (GetNet() != NULL);};
|
||||
public: bool IsConnected() const {return (getNet() != NULL);};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -84,23 +84,20 @@ class Plug : public Component {
|
|||
// ******
|
||||
|
||||
public: static Plug* _Create(Instance* instance, Net* masterNet);
|
||||
protected: virtual void _PostCreate();
|
||||
protected: virtual void _postCreate();
|
||||
|
||||
public: void _Delete();
|
||||
protected: virtual void _PreDelete();
|
||||
public: void _destroy();
|
||||
protected: virtual void _preDestroy();
|
||||
|
||||
public: virtual string GetName() const;
|
||||
public: virtual string _GetTypeName() const {return _TName("Plug");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: Plug* _GetNextOfInstancePlugMap() const {return _nextOfInstancePlugMap;};
|
||||
public: virtual string getName() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Plug");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public: Plug* _getNextOfInstancePlugMap() const {return _nextOfInstancePlugMap;};
|
||||
|
||||
public: virtual void _SetMasterNet(Net* masterNet) {_masterNet = masterNet;};
|
||||
public: void _SetNextOfInstancePlugMap(Plug* plug) {_nextOfInstancePlugMap = plug;};
|
||||
|
||||
//public: virtual void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) {};
|
||||
//public: virtual void _Highlight(View* view, const Box& updateArea, const Transformation& transformation) {};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue