From af0c4a46091aef113d63ea01cb15ae8421810867 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Mon, 17 Mar 2008 13:54:33 +0000 Subject: [PATCH] cleaning in progress in Hurricane --- hurricane/src/editor/CellEditor.cpp | 2 +- hurricane/src/editor/CellGraphicsItem.cpp | 76 +- hurricane/src/editor/InstanceGraphicsItem.cpp | 36 +- hurricane/src/editor/SegmentFigure.cpp | 24 +- hurricane/src/editor/Utils.h | 12 +- hurricane/src/hurricane/BasicLayer.cpp | 74 +- hurricane/src/hurricane/BasicLayer.h | 20 +- hurricane/src/hurricane/BasicLayers.h | 8 +- hurricane/src/hurricane/Box.cpp | 22 +- hurricane/src/hurricane/Box.h | 7 +- hurricane/src/hurricane/Boxes.h | 8 +- hurricane/src/hurricane/Cell.cpp | 365 +--- hurricane/src/hurricane/Cell.h | 198 +- hurricane/src/hurricane/CellCollections.cpp | 1030 ++++----- hurricane/src/hurricane/Cells.h | 8 +- hurricane/src/hurricane/Collection.h | 990 ++++----- hurricane/src/hurricane/Commons.h | 2 +- hurricane/src/hurricane/Component.cpp | 750 +++---- hurricane/src/hurricane/Component.h | 89 +- hurricane/src/hurricane/Components.h | 8 +- hurricane/src/hurricane/CompositeLayer.cpp | 46 +- hurricane/src/hurricane/CompositeLayer.h | 12 +- hurricane/src/hurricane/CompositeLayers.h | 8 +- hurricane/src/hurricane/Contact.cpp | 402 ++-- hurricane/src/hurricane/Contact.h | 111 +- hurricane/src/hurricane/Contacts.h | 4 +- hurricane/src/hurricane/DBo.cpp | 130 +- hurricane/src/hurricane/DBo.h | 34 +- hurricane/src/hurricane/DBos.h | 8 +- hurricane/src/hurricane/DRCError.cpp | 72 +- hurricane/src/hurricane/DRCError.h | 26 +- hurricane/src/hurricane/DataBase.cpp | 64 +- hurricane/src/hurricane/DataBase.h | 30 +- hurricane/src/hurricane/DeepNet.cpp | 34 +- hurricane/src/hurricane/DeepNet.h | 10 +- hurricane/src/hurricane/DisplaySlot.cpp | 97 +- hurricane/src/hurricane/DisplaySlot.h | 32 +- hurricane/src/hurricane/DisplaySlots.h | 8 +- hurricane/src/hurricane/Entities.h | 4 +- hurricane/src/hurricane/Entity.cpp | 74 +- hurricane/src/hurricane/Entity.h | 16 +- hurricane/src/hurricane/Error.cpp | 24 +- hurricane/src/hurricane/Error.h | 20 +- hurricane/src/hurricane/Exception.h | 12 +- hurricane/src/hurricane/Filter.h | 268 +-- hurricane/src/hurricane/Go.cpp | 44 +- hurricane/src/hurricane/Go.h | 44 +- hurricane/src/hurricane/Gos.h | 8 +- hurricane/src/hurricane/Hook.cpp | 498 ++--- hurricane/src/hurricane/Hook.h | 44 +- hurricane/src/hurricane/Hooks.h | 8 +- hurricane/src/hurricane/Horizontal.cpp | 130 +- hurricane/src/hurricane/Horizontal.h | 52 +- hurricane/src/hurricane/Horizontals.h | 4 +- hurricane/src/hurricane/HyperNet.cpp | 226 +- hurricane/src/hurricane/HyperNet.h | 30 +- hurricane/src/hurricane/Instance.cpp | 232 +- hurricane/src/hurricane/Instance.h | 189 +- hurricane/src/hurricane/Instances.h | 8 +- hurricane/src/hurricane/Interruption.cpp | 24 +- hurricane/src/hurricane/Interruption.h | 20 +- hurricane/src/hurricane/Interval.cpp | 124 +- hurricane/src/hurricane/Interval.h | 74 +- hurricane/src/hurricane/Intervals.h | 4 +- hurricane/src/hurricane/IntrusiveMap.h | 712 +++--- hurricane/src/hurricane/IntrusiveSet.h | 734 +++---- hurricane/src/hurricane/Layer.cpp | 50 +- hurricane/src/hurricane/Layer.h | 8 +- hurricane/src/hurricane/Layers.h | 8 +- hurricane/src/hurricane/Libraries.h | 8 +- hurricane/src/hurricane/Library.cpp | 162 +- hurricane/src/hurricane/Library.h | 94 +- hurricane/src/hurricane/ListCollection.h | 208 +- hurricane/src/hurricane/Locator.h | 252 +-- hurricane/src/hurricane/Marker.cpp | 62 +- hurricane/src/hurricane/Marker.h | 28 +- hurricane/src/hurricane/Markers.h | 8 +- hurricane/src/hurricane/MultisetCollection.h | 204 +- hurricane/src/hurricane/Name.cpp | 130 +- hurricane/src/hurricane/Name.h | 38 +- hurricane/src/hurricane/Names.h | 4 +- hurricane/src/hurricane/Net.cpp | 306 +-- hurricane/src/hurricane/Net.h | 238 +- .../src/hurricane/NetExternalComponents.cpp | 45 +- .../src/hurricane/NetExternalComponents.h | 4 +- hurricane/src/hurricane/Nets.h | 8 +- hurricane/src/hurricane/Occurrence.cpp | 198 +- hurricane/src/hurricane/Occurrence.h | 58 +- hurricane/src/hurricane/Occurrences.h | 8 +- hurricane/src/hurricane/Pad.cpp | 48 +- hurricane/src/hurricane/Pad.h | 34 +- hurricane/src/hurricane/Pads.h | 4 +- hurricane/src/hurricane/Path.cpp | 196 +- hurricane/src/hurricane/Path.h | 58 +- hurricane/src/hurricane/Pathes.h | 4 +- hurricane/src/hurricane/Pin.cpp | 198 +- hurricane/src/hurricane/Pin.h | 93 +- hurricane/src/hurricane/Pins.h | 4 +- hurricane/src/hurricane/Plug.cpp | 86 +- hurricane/src/hurricane/Plug.h | 69 +- hurricane/src/hurricane/Plugs.h | 8 +- hurricane/src/hurricane/Point.cpp | 12 +- hurricane/src/hurricane/Point.h | 7 +- hurricane/src/hurricane/Points.h | 4 +- hurricane/src/hurricane/Primitives.h | 4 +- hurricane/src/hurricane/Properties.h | 4 +- hurricane/src/hurricane/Property.cpp | 114 +- hurricane/src/hurricane/Property.h | 286 +-- hurricane/src/hurricane/QuadTree.cpp | 236 +- hurricane/src/hurricane/QuadTree.h | 84 +- hurricane/src/hurricane/Quark.cpp | 90 +- hurricane/src/hurricane/Quark.h | 26 +- hurricane/src/hurricane/Quarks.h | 8 +- hurricane/src/hurricane/Reference.cpp | 62 +- hurricane/src/hurricane/Reference.h | 30 +- hurricane/src/hurricane/References.h | 4 +- hurricane/src/hurricane/Region.cpp | 972 ++++----- hurricane/src/hurricane/Region.h | 228 +- hurricane/src/hurricane/Relation.cpp | 132 +- hurricane/src/hurricane/Relation.h | 36 +- hurricane/src/hurricane/RoutingPad.cpp | 206 +- hurricane/src/hurricane/RoutingPad.h | 71 +- hurricane/src/hurricane/RoutingPads.h | 4 +- hurricane/src/hurricane/Rubber.cpp | 281 +-- hurricane/src/hurricane/Rubber.h | 36 +- hurricane/src/hurricane/Rubbers.h | 8 +- hurricane/src/hurricane/Segment.cpp | 194 +- hurricane/src/hurricane/Segment.h | 115 +- hurricane/src/hurricane/Segments.h | 4 +- hurricane/src/hurricane/Selectors.h | 4 +- hurricane/src/hurricane/SetCollection.h | 208 +- hurricane/src/hurricane/SharedName.cpp | 30 +- hurricane/src/hurricane/SharedName.h | 42 +- hurricane/src/hurricane/SharedPath.cpp | 110 +- hurricane/src/hurricane/SharedPath.h | 78 +- hurricane/src/hurricane/SharedPathes.h | 4 +- hurricane/src/hurricane/Slice.cpp | 50 +- hurricane/src/hurricane/Slice.h | 54 +- hurricane/src/hurricane/Slices.h | 8 +- hurricane/src/hurricane/Slot.h | 18 +- hurricane/src/hurricane/SlotAdapter.h | 193 +- hurricane/src/hurricane/Symbols.h | 4 +- hurricane/src/hurricane/Tabulation.cpp | 44 +- hurricane/src/hurricane/Tabulation.h | 28 +- hurricane/src/hurricane/Technology.cpp | 102 +- hurricane/src/hurricane/Technology.h | 70 +- hurricane/src/hurricane/Timer.cpp | 66 +- hurricane/src/hurricane/Timer.h | 14 +- hurricane/src/hurricane/Transformation.cpp | 28 +- hurricane/src/hurricane/Transformation.h | 22 +- hurricane/src/hurricane/Unit.cpp | 136 +- hurricane/src/hurricane/Unit.h | 22 +- hurricane/src/hurricane/UpdateSession.cpp | 114 +- hurricane/src/hurricane/UpdateSession.h | 28 +- hurricane/src/hurricane/UserGo.cpp | 208 +- hurricane/src/hurricane/UserGo.h | 27 +- hurricane/src/hurricane/UserGos.h | 4 +- hurricane/src/hurricane/VectorCollection.h | 206 +- hurricane/src/hurricane/Vertical.cpp | 130 +- hurricane/src/hurricane/Vertical.h | 52 +- hurricane/src/hurricane/Verticals.h | 4 +- hurricane/src/hurricane/Views.h | 4 +- hurricane/src/hurricane/Warning.cpp | 24 +- hurricane/src/hurricane/Warning.h | 20 +- hurricane/src/pyext/ProxyProperty.cpp | 50 +- hurricane/src/pyext/ProxyProperty.h | 46 +- hurricane/src/pyext/PyBox.cpp | 119 +- hurricane/src/pyext/PyCell.cpp | 304 +-- hurricane/src/pyext/PyCellLocator.cpp | 12 +- hurricane/src/pyext/PyComponent.cpp | 64 +- hurricane/src/pyext/PyComponentLocator.cpp | 10 +- hurricane/src/pyext/PyContact.cpp | 46 +- hurricane/src/pyext/PyDataBase.cpp | 28 +- hurricane/src/pyext/PyDataBase.h | 2 +- hurricane/src/pyext/PyEntity.cpp | 20 +- hurricane/src/pyext/PyHorizontal.cpp | 30 +- hurricane/src/pyext/PyHurricane.cpp | 108 +- hurricane/src/pyext/PyHurricane.h | 86 +- hurricane/src/pyext/PyHyperNet.cpp | 32 +- hurricane/src/pyext/PyInstance.cpp | 134 +- hurricane/src/pyext/PyInstanceLocator.cpp | 12 +- hurricane/src/pyext/PyLayer.cpp | 34 +- hurricane/src/pyext/PyLibrary.cpp | 48 +- hurricane/src/pyext/PyName.cpp | 19 +- hurricane/src/pyext/PyNet.cpp | 133 +- hurricane/src/pyext/PyNetLocator.cpp | 12 +- hurricane/src/pyext/PyOccurrence.cpp | 95 +- hurricane/src/pyext/PyOccurrenceLocator.cpp | 43 +- hurricane/src/pyext/PyPath.cpp | 144 +- hurricane/src/pyext/PyPin.cpp | 16 +- hurricane/src/pyext/PyPinLocator.cpp | 12 +- hurricane/src/pyext/PyPlug.cpp | 36 +- hurricane/src/pyext/PyPlugLocator.cpp | 20 +- hurricane/src/pyext/PyPoint.cpp | 22 +- hurricane/src/pyext/PyReference.cpp | 54 +- hurricane/src/pyext/PyReferenceLocator.cpp | 12 +- hurricane/src/pyext/PySegment.cpp | 66 +- hurricane/src/pyext/PySegmentLocator.cpp | 12 +- hurricane/src/pyext/PyTechnology.cpp | 34 +- hurricane/src/pyext/PyTransformation.cpp | 187 +- hurricane/src/pyext/PyUnit.cpp | 34 +- hurricane/src/pyext/PyUnit.h | 14 +- hurricane/src/pyext/PyVertical.cpp | 44 +- hurricane/src/viewer/CellViewer.cpp | 2 +- hurricane/src/viewer/CellWidget.cpp | 1918 ++++++++--------- hurricane/src/viewer/LayersWidget.cpp | 8 +- 206 files changed, 10167 insertions(+), 10784 deletions(-) diff --git a/hurricane/src/editor/CellEditor.cpp b/hurricane/src/editor/CellEditor.cpp index aff8fd42..76ae31fd 100644 --- a/hurricane/src/editor/CellEditor.cpp +++ b/hurricane/src/editor/CellEditor.cpp @@ -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); diff --git a/hurricane/src/editor/CellGraphicsItem.cpp b/hurricane/src/editor/CellGraphicsItem.cpp index 5b08c05e..d0e70cdb 100644 --- a/hurricane/src/editor/CellGraphicsItem.cpp +++ b/hurricane/src/editor/CellGraphicsItem.cpp @@ -12,19 +12,19 @@ using namespace H; #include "CellGraphicsItem.h" CellGraphicsItem::CellGraphicsItem(Cell* c): - QGraphicsItem(), - 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()) { - // new InstanceGraphicsItem(this, instance); - // end_for; - //} + QGraphicsItem(), + 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()) { + // 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(go); if (segment) { SegmentGraphicsItem* segmentItem = new SegmentGraphicsItem(this, segment); @@ -38,43 +38,43 @@ CellGraphicsItem::CellGraphicsItem(Cell* c): } CellGraphicsItem::CellGraphicsItem(InstanceGraphicsItem* master, Cell* c) : QGraphicsItem(master), cell(c) { - //for_each_instance(instance, cell->GetInstances()) { - // new InstanceGraphicsItem(this, instance); - // end_for; - //} - //for_each_slice(slice, cell->GetSlices()) { - // new SliceFigure(this, slice); - // end_for; - //} + //for_each_instance(instance, cell->getInstances()) { + // new InstanceGraphicsItem(this, instance); + // end_for; + //} + //for_each_slice(slice, cell->getSlices()) { + // new SliceFigure(this, slice); + // end_for; + //} } QRectF CellGraphicsItem::boundingRect() const { - Box box = cell->GetBoundingBox(); - QRectF rect; - boxToRectangle(box, rect); - //rect = transform().mapRect(rect); - return rect; + Box box = cell->getBoundingBox(); + QRectF rect; + boxToRectangle(box, rect); + //rect = transform().mapRect(rect); + return rect; } void CellGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem* option, QWidget *) { - painter->setClipRect(option->exposedRect); - drawBoundary(painter); - //drawPhantom(painter); + painter->setClipRect(option->exposedRect); + drawBoundary(painter); + //drawPhantom(painter); } void CellGraphicsItem::drawBoundary(QPainter* painter) { - QPen pen(Qt::black); - painter->setPen(pen); - Box box = cell->GetAbutmentBox(); - QRectF rect; - boxToRectangle(box, rect); - painter->drawRect(rect); + QPen pen(Qt::black); + painter->setPen(pen); + Box box = cell->getAbutmentBox(); + QRectF rect; + boxToRectangle(box, rect); + painter->drawRect(rect); } void CellGraphicsItem::drawPhantom(QPainter* painter) { - painter->setBrush(Qt::red); - Box box = cell->GetAbutmentBox(); - QRectF rect; - boxToRectangle(box, rect); - painter->drawRect(rect); + painter->setBrush(Qt::red); + Box box = cell->getAbutmentBox(); + QRectF rect; + boxToRectangle(box, rect); + painter->drawRect(rect); } diff --git a/hurricane/src/editor/InstanceGraphicsItem.cpp b/hurricane/src/editor/InstanceGraphicsItem.cpp index 5d20a1e7..ea11c825 100644 --- a/hurricane/src/editor/InstanceGraphicsItem.cpp +++ b/hurricane/src/editor/InstanceGraphicsItem.cpp @@ -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; @@ -62,29 +62,29 @@ QRectF InstanceGraphicsItem::boundingRect() const { void InstanceGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->setClipRect(option->exposedRect.adjusted(-1.0, -1.0, 1.0, 1.0)); if (option->levelOfDetail > 1.0) { - drawBoundary(painter); - drawElements(painter); + drawBoundary(painter); + drawElements(painter); } else { - drawPhantom(painter); + drawPhantom(painter); } } void InstanceGraphicsItem::drawElements(QPainter* painter) { - for_each_slice(slice, cell->GetSlices()) { + for_each_slice(slice, cell->getSlices()) { painter->save(); - BasicLayer* layer = dynamic_cast(slice->GetLayer()); + BasicLayer* layer = dynamic_cast(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(go); if (segment) { - Box box = segment->GetBoundingBox(); - QRectF rect; - boxToRectangle(box, rect); - painter->drawRect(rect); + Box box = segment->getBoundingBox(); + QRectF rect; + boxToRectangle(box, rect); + painter->drawRect(rect); } end_for; @@ -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); diff --git a/hurricane/src/editor/SegmentFigure.cpp b/hurricane/src/editor/SegmentFigure.cpp index 23dcaae0..2095ccb7 100644 --- a/hurricane/src/editor/SegmentFigure.cpp +++ b/hurricane/src/editor/SegmentFigure.cpp @@ -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(segment->GetLayer()); + BasicLayer* blayer = dynamic_cast(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(segment->GetLayer()); + CompositeLayer* clayer = dynamic_cast(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; diff --git a/hurricane/src/editor/Utils.h b/hurricane/src/editor/Utils.h index 1ef29668..2ff68098 100644 --- a/hurricane/src/editor/Utils.h +++ b/hurricane/src/editor/Utils.h @@ -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); diff --git a/hurricane/src/hurricane/BasicLayer.cpp b/hurricane/src/hurricane/BasicLayer.cpp index 876d34f3..2f475a65 100644 --- a/hurricane/src/hurricane/BasicLayer.cpp +++ b/hurricane/src/hurricane/BasicLayer.cpp @@ -37,14 +37,14 @@ class BasicLayer_BasicLayers : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual BasicLayer* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual BasicLayer* getElement() const; + public: virtual Hurricane::Locator* 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 { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* 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_BasicLayers::GetClone() const +Collection* BasicLayer_BasicLayers::getClone() const // ************************************************************** { return new BasicLayer_BasicLayers(*this); } -Locator* BasicLayer_BasicLayers::GetLocator() const +Locator* 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_BasicLayers::Locator::GetClone() const +Locator* 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; } diff --git a/hurricane/src/hurricane/BasicLayer.h b/hurricane/src/hurricane/BasicLayer.h index 19222b83..7798df54 100644 --- a/hurricane/src/hurricane/BasicLayer.h +++ b/hurricane/src/hurricane/BasicLayer.h @@ -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 ( 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; } diff --git a/hurricane/src/hurricane/BasicLayers.h b/hurricane/src/hurricane/BasicLayers.h index 2f71db84..fa8e1ffd 100644 --- a/hurricane/src/hurricane/BasicLayers.h +++ b/hurricane/src/hurricane/BasicLayers.h @@ -46,10 +46,10 @@ typedef GenericFilter BasicLayerFilter; #define for_each_basic_layer(basicLayer, basicLayers)\ /****************************************************/\ {\ - BasicLayerLocator _locator = basicLayers.GetLocator();\ - while (_locator.IsValid()) {\ - BasicLayer* basicLayer = _locator.GetElement();\ - _locator.Progress(); + BasicLayerLocator _locator = basicLayers.getLocator();\ + while (_locator.IsValid()) {\ + BasicLayer* basicLayer = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Box.cpp b/hurricane/src/hurricane/Box.cpp index 34de8ed4..97ea8b0b 100644 --- a/hurricane/src/hurricane/Box.cpp +++ b/hurricane/src/hurricane/Box.cpp @@ -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; } diff --git a/hurricane/src/hurricane/Box.h b/hurricane/src/hurricane/Box.h index fbdea3ca..b512f613 100644 --- a/hurricane/src/hurricane/Box.h +++ b/hurricane/src/hurricane/Box.h @@ -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; }; diff --git a/hurricane/src/hurricane/Boxes.h b/hurricane/src/hurricane/Boxes.h index 774b0b2d..cbf0c151 100644 --- a/hurricane/src/hurricane/Boxes.h +++ b/hurricane/src/hurricane/Boxes.h @@ -45,10 +45,10 @@ typedef GenericFilter BoxFilter; #define for_each_box(box, boxes)\ /*******************************/\ {\ - BoxLocator _locator = boxes.GetLocator();\ - while (_locator.IsValid()) {\ - Box box = _locator.GetElement();\ - _locator.Progress(); + BoxLocator _locator = boxes.getLocator();\ + while (_locator.IsValid()) {\ + Box box = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index 1056fce4..79315eed 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -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(occurrence.GetEntity()); + Net* net = static_cast(occurrence.getEntity()); - for_each_component ( component, net->GetComponents() ) { + for_each_component ( component, net->getComponents() ) { Plug* primaryPlug = dynamic_cast( 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( plugOccurrence.GetEntity() ); - if ( plugOccurrence.GetPath().IsEmpty() ) { - plug->GetBodyHook()->Attach ( currentRP->GetBodyHook() ); - plug->GetBodyHook()->Detach (); + Plug* plug = static_cast( 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( 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,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 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(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(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. // **************************************************************************************************** diff --git a/hurricane/src/hurricane/Cell.h b/hurricane/src/hurricane/Cell.h index bfc40fc3..3e920b9f 100644 --- a/hurricane/src/hurricane/Cell.h +++ b/hurricane/src/hurricane/Cell.h @@ -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 { - //// ********************************************** - - // public: typedef IntrusiveSet 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 // ********** diff --git a/hurricane/src/hurricane/CellCollections.cpp b/hurricane/src/hurricane/CellCollections.cpp index a9ebdc4e..b0c9bdfe 100644 --- a/hurricane/src/hurricane/CellCollections.cpp +++ b/hurricane/src/hurricane/CellCollections.cpp @@ -38,14 +38,14 @@ class Cell_Slices : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Slice* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Slice* getElement() const; + public: virtual Hurricane::Locator* 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 Cell_Slices : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -111,14 +111,14 @@ class Cell_Components : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Component* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Component* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -143,13 +143,13 @@ class Cell_Components : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -185,14 +185,14 @@ class Cell_ComponentsUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Component* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Component* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -218,13 +218,13 @@ class Cell_ComponentsUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -262,14 +262,14 @@ class Cell_Occurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -294,13 +294,13 @@ class Cell_Occurrences : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -339,14 +339,14 @@ class Cell_OccurrencesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -372,13 +372,13 @@ class Cell_OccurrencesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -410,14 +410,14 @@ class Cell_LeafInstanceOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -440,13 +440,13 @@ class Cell_LeafInstanceOccurrences : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -482,14 +482,14 @@ class Cell_LeafInstanceOccurrencesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -514,13 +514,13 @@ class Cell_LeafInstanceOccurrencesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -554,14 +554,14 @@ class Cell_TerminalInstanceOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -584,13 +584,13 @@ class Cell_TerminalInstanceOccurrences : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -626,14 +626,14 @@ class Cell_TerminalInstanceOccurrencesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -658,13 +658,13 @@ class Cell_TerminalInstanceOccurrencesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -700,14 +700,14 @@ class Cell_ComponentOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -732,13 +732,13 @@ class Cell_ComponentOccurrences : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -775,14 +775,14 @@ class Cell_ComponentOccurrencesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -808,13 +808,13 @@ class Cell_ComponentOccurrencesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -846,14 +846,14 @@ class Cell_HyperNetRootNetOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -878,13 +878,13 @@ class Cell_HyperNetRootNetOccurrences : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -917,14 +917,14 @@ class Cell_HyperNetRootNetOccurrences : public Collection { // // public: Locator& operator=(const Locator& locator); // -// public: virtual MainView* GetElement() const; -// public: virtual Hurricane::Locator* GetClone() const; +// public: virtual MainView* getElement() const; +// public: virtual Hurricane::Locator* getClone() const; // // public: virtual bool IsValid() const; // // public: virtual void Progress(); // -// public: virtual string _GetString() const; +// public: virtual string _getString() const; // // }; // @@ -947,13 +947,13 @@ class Cell_HyperNetRootNetOccurrences : public Collection { //// Accessors //// ********* // -// public: virtual Collection* GetClone() const; -// public: virtual Hurricane::Locator* GetLocator() const; +// public: virtual Collection* getClone() const; +// public: virtual Hurricane::Locator* getLocator() const; // //// Others //// ****** // -// public: virtual string _GetString() const; +// public: virtual string _getString() const; // //}; // @@ -983,14 +983,14 @@ class Cell_SubCells : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Cell* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Cell* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1014,13 +1014,13 @@ class Cell_SubCells : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1050,13 +1050,13 @@ class Cell_SubCells : public Collection { { }; // Accessors. public: - virtual Path GetElement () const { return _instancePath; }; - virtual Hurricane::Locator* GetClone () const { return new Locator(*this); }; + virtual Path getElement () const { return _instancePath; }; + virtual Hurricane::Locator* getClone () const { return new Locator(*this); }; virtual bool IsValid () const { return _instancesStack.size(); }; virtual void Progress (); // Hurricane Managment. public: - virtual string _GetString() const; + virtual string _getString() const; }; // Attributes. @@ -1076,12 +1076,12 @@ class Cell_SubCells : public Collection { // Accessors. public: - virtual Collection* GetClone () const { return new Cell_RecursiveSlavePathes(*this); }; - virtual Hurricane::Locator* GetLocator () const { return new Locator(_cell); }; + virtual Collection* getClone () const { return new Cell_RecursiveSlavePathes(*this); }; + virtual Hurricane::Locator* getLocator () const { return new Locator(_cell); }; // Hurricane Managment. public: - virtual string _GetString() const; + virtual string _getString() const; }; @@ -1092,276 +1092,276 @@ class Cell_SubCells : public Collection { // Cell further definition // **************************************************************************************************** -Instances Cell::GetInstancesUnder(const Box& area) const +Instances Cell::getInstancesUnder(const Box& area) const // ***************************************************** { - // return _quadTree.GetGosUnder(area).GetSubSet(); - return SubTypeCollection(_quadTree.GetGosUnder(area)); + // return _quadTree.getGosUnder(area).getSubSet(); + return SubTypeCollection(_quadTree.getGosUnder(area)); } -Instances Cell::GetSlaveInstances() const +Instances Cell::getSlaveInstances() const // ************************************** { - return _slaveInstanceSet.GetElements(); + return _slaveInstanceSet.getElements(); } -Instances Cell::GetTerminalInstances() const +Instances Cell::getTerminalInstances() const // ***************************************** { - return GetInstances().GetSubSet(Instance::GetIsTerminalFilter()); + return getInstances().getSubSet(Instance::getIsTerminalFilter()); } -Instances Cell::GetLeafInstances() const +Instances Cell::getLeafInstances() const // ************************************* { - return GetInstances().GetSubSet(Instance::GetIsLeafFilter()); + return getInstances().getSubSet(Instance::getIsLeafFilter()); } -Instances Cell::GetPlacedInstances() const +Instances Cell::getPlacedInstances() const // *************************************** { - return GetInstances().GetSubSet(Instance::GetIsPlacedFilter()); + return getInstances().getSubSet(Instance::getIsPlacedFilter()); } -Instances Cell::GetFixedInstances() const +Instances Cell::getFixedInstances() const // ************************************** { - return GetInstances().GetSubSet(Instance::GetIsFixedFilter()); + return getInstances().getSubSet(Instance::getIsFixedFilter()); } -Instances Cell::GetUnplacedInstances() const +Instances Cell::getUnplacedInstances() const // ************************************** { - return GetInstances().GetSubSet(Instance::GetIsUnplacedFilter()); + return getInstances().getSubSet(Instance::getIsUnplacedFilter()); } -Instances Cell::GetNotUnplacedInstances() const +Instances Cell::getNotUnplacedInstances() const // ************************************** { - return GetInstances().GetSubSet(Instance::GetIsNotUnplacedFilter()); + return getInstances().getSubSet(Instance::getIsNotUnplacedFilter()); } -Instances Cell::GetPlacedInstancesUnder(const Box& area) const +Instances Cell::getPlacedInstancesUnder(const Box& area) const // *********************************************************** { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsPlacedFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsPlacedFilter()); } -Instances Cell::GetFixedInstancesUnder(const Box& area) const +Instances Cell::getFixedInstancesUnder(const Box& area) const // ********************************************************** { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsFixedFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsFixedFilter()); } -Instances Cell::GetUnplacedInstancesUnder(const Box& area) const +Instances Cell::getUnplacedInstancesUnder(const Box& area) const // ************************************************************* { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsUnplacedFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsUnplacedFilter()); } -Instances Cell::GetNotUnplacedInstancesUnder(const Box& area) const +Instances Cell::getNotUnplacedInstancesUnder(const Box& area) const // **************************************************************** { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsNotUnplacedFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsNotUnplacedFilter()); } -Instances Cell::GetTerminalInstancesUnder(const Box& area) const +Instances Cell::getTerminalInstancesUnder(const Box& area) const // ************************************************************* { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsTerminalFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsTerminalFilter()); } -Instances Cell::GetNonTerminalInstances() const +Instances Cell::getNonTerminalInstances() const // ******************************************** { - return GetInstances().GetSubSet(!Instance::GetIsTerminalFilter()); + return getInstances().getSubSet(!Instance::getIsTerminalFilter()); } -Instances Cell::GetNonTerminalInstancesUnder(const Box& area) const +Instances Cell::getNonTerminalInstancesUnder(const Box& area) const // **************************************************************** { - return GetInstancesUnder(area).GetSubSet(!Instance::GetIsTerminalFilter()); + return getInstancesUnder(area).getSubSet(!Instance::getIsTerminalFilter()); } -Instances Cell::GetLeafInstancesUnder(const Box& area) const +Instances Cell::getLeafInstancesUnder(const Box& area) const // ********************************************************* { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsLeafFilter()); + return getInstancesUnder(area).getSubSet(Instance::getIsLeafFilter()); } -Instances Cell::GetNonLeafInstances() const +Instances Cell::getNonLeafInstances() const // **************************************** { - return GetInstances().GetSubSet(!Instance::GetIsLeafFilter()); + return getInstances().getSubSet(!Instance::getIsLeafFilter()); } -Instances Cell::GetNonLeafInstancesUnder(const Box& area) const +Instances Cell::getNonLeafInstancesUnder(const Box& area) const // ************************************************************ { - return GetInstancesUnder(area).GetSubSet(!Instance::GetIsLeafFilter()); + return getInstancesUnder(area).getSubSet(!Instance::getIsLeafFilter()); } -Nets Cell::GetGlobalNets() const +Nets Cell::getGlobalNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsGlobalFilter()); + return getNets().getSubSet(Net::getIsGlobalFilter()); } -Nets Cell::GetExternalNets() const +Nets Cell::getExternalNets() const // ******************************* { - return GetNets().GetSubSet(Net::GetIsExternalFilter()); + return getNets().getSubSet(Net::getIsExternalFilter()); } -Nets Cell::GetInternalNets() const +Nets Cell::getInternalNets() const // ******************************* { - return GetNets().GetSubSet(Net::GetIsInternalFilter()); + return getNets().getSubSet(Net::getIsInternalFilter()); } -Nets Cell::GetClockNets() const +Nets Cell::getClockNets() const // **************************** { - return GetNets().GetSubSet(Net::GetIsClockFilter()); + return getNets().getSubSet(Net::getIsClockFilter()); } -Nets Cell::GetSupplyNets() const +Nets Cell::getSupplyNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsSupplyFilter()); + return getNets().getSubSet(Net::getIsSupplyFilter()); } -Nets Cell::GetPowerNets() const +Nets Cell::getPowerNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsPowerFilter()); + return getNets().getSubSet(Net::getIsPowerFilter()); } -Nets Cell::GetGroundNets() const +Nets Cell::getGroundNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsGroundFilter()); + return getNets().getSubSet(Net::getIsGroundFilter()); } -Slices Cell::GetSlices(const Layer::Mask& mask) const +Slices Cell::getSlices(const Layer::Mask& mask) const // ************************************************** { return Cell_Slices(this, mask); } -//MainViews Cell::GetMainViews() const +//MainViews Cell::getMainViews() const //// ********************************* //{ -// // return GetViews().GetSubSet(); -// return SubTypeCollection(GetViews()); +// // return getViews().getSubSet(); +// return SubTypeCollection(getViews()); //} // -//MainViews Cell::GetImpactedMainViews() const +//MainViews Cell::getImpactedMainViews() const //// ***************************************** //{ // return Cell_ImpactedMainViews(this); //} // -Rubbers Cell::GetRubbers() const +Rubbers Cell::getRubbers() const // ***************************** { - // return _quadTree.GetGos().GetSubSet(); - return SubTypeCollection(_quadTree.GetGos()); + // return _quadTree.getGos().getSubSet(); + return SubTypeCollection(_quadTree.getGos()); } -Rubbers Cell::GetRubbersUnder(const Box& area) const +Rubbers Cell::getRubbersUnder(const Box& area) const // ************************************************* { - // return (area.isEmpty()) ? Rubbers() : _quadTree.GetGosUnder(area).GetSubSet(); - return SubTypeCollection(_quadTree.GetGosUnder(area)); + // return (area.isEmpty()) ? Rubbers() : _quadTree.getGosUnder(area).getSubSet(); + return SubTypeCollection(_quadTree.getGosUnder(area)); } -Markers Cell::GetMarkersUnder(const Box& area) const +Markers Cell::getMarkersUnder(const Box& area) const // ************************************************* { - // return (area.isEmpty()) ? Markers() : _quadTree.GetGosUnder(area).GetSubSet(); - return SubTypeCollection(_quadTree.GetGosUnder(area)); + // return (area.isEmpty()) ? Markers() : _quadTree.getGosUnder(area).getSubSet(); + return SubTypeCollection(_quadTree.getGosUnder(area)); } -References Cell::GetReferences() const +References Cell::getReferences() const // ********************************** { - return SubTypeCollection(GetMarkers()); + return SubTypeCollection(getMarkers()); } -Cells Cell::GetSubCells() const +Cells Cell::getSubCells() const // **************************** { return Cell_SubCells(this); } -Components Cell::GetComponents(const Layer::Mask& mask) const +Components Cell::getComponents(const Layer::Mask& mask) const // ********************************************************** { return Cell_Components(this, mask); } -Components Cell::GetComponentsUnder(const Box& area, const Layer::Mask& mask) const +Components Cell::getComponentsUnder(const Box& area, const Layer::Mask& mask) const // ******************************************************************************** { return Cell_ComponentsUnder(this, area, mask); } -Occurrences Cell::GetOccurrences(unsigned searchDepth) const +Occurrences Cell::getOccurrences(unsigned searchDepth) const // ******************************************************* { return Cell_Occurrences(this, searchDepth); } -Occurrences Cell::GetOccurrencesUnder(const Box& area, unsigned searchDepth) const +Occurrences Cell::getOccurrencesUnder(const Box& area, unsigned searchDepth) const // ***************************************************************************** { return Cell_OccurrencesUnder(this, area, searchDepth); } -Occurrences Cell::GetTerminalInstanceOccurrences() const +Occurrences Cell::getTerminalInstanceOccurrences() const // *************************************************** { return Cell_TerminalInstanceOccurrences(this); } -Occurrences Cell::GetTerminalInstanceOccurrencesUnder(const Box& area) const +Occurrences Cell::getTerminalInstanceOccurrencesUnder(const Box& area) const // *********************************************************************** { return Cell_TerminalInstanceOccurrencesUnder(this, area); } -Occurrences Cell::GetLeafInstanceOccurrences() const +Occurrences Cell::getLeafInstanceOccurrences() const // *********************************************** { return Cell_LeafInstanceOccurrences(this); } -Occurrences Cell::GetLeafInstanceOccurrencesUnder(const Box& area) const +Occurrences Cell::getLeafInstanceOccurrencesUnder(const Box& area) const // ******************************************************************* { return Cell_LeafInstanceOccurrencesUnder(this, area); } -Occurrences Cell::GetComponentOccurrences(const Layer::Mask& mask) const +Occurrences Cell::getComponentOccurrences(const Layer::Mask& mask) const // ******************************************************************* { return Cell_ComponentOccurrences(this, mask); } -Occurrences Cell::GetComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask) const +Occurrences Cell::getComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask) const // ***************************************************************************************** { return Cell_ComponentOccurrencesUnder(this, area, mask); } -Pathes Cell::GetRecursiveSlavePathes() const +Pathes Cell::getRecursiveSlavePathes() const // ***************************************** { return Cell_RecursiveSlavePathes(this); } -Occurrences Cell::GetHyperNetRootNetOccurrences() const +Occurrences Cell::getHyperNetRootNetOccurrences() const // ********************************* { return Cell_HyperNetRootNetOccurrences(this,Path()); @@ -1403,25 +1403,25 @@ Cell_Slices& Cell_Slices::operator=(const Cell_Slices& slices) return *this; } -Collection* Cell_Slices::GetClone() const +Collection* Cell_Slices::getClone() const // ********************************************** { return new Cell_Slices(*this); } -Locator* Cell_Slices::GetLocator() const +Locator* Cell_Slices::getLocator() const // ********************************************* { return new Locator(_cell, _mask); } -string Cell_Slices::_GetString() const +string Cell_Slices::_getString() const // *********************************** { string s = "<" + _TName("Cell::Slices"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -1450,8 +1450,8 @@ Cell_Slices::Locator::Locator(const Cell* cell, const Layer::Mask& mask) _sliceLocator() { if (_cell && (_mask != 0)) { - _sliceLocator = ((Cell*)_cell)->_GetSliceMap().GetElements().GetLocator(); - while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->getMask() & _mask)) + _sliceLocator = ((Cell*)_cell)->_getSliceMap().getElements().getLocator(); + while (_sliceLocator.IsValid() && !(_sliceLocator.getElement()->getLayer()->getMask() & _mask)) _sliceLocator.Progress(); } } @@ -1474,13 +1474,13 @@ Cell_Slices::Locator& Cell_Slices::Locator::operator=(const Locator& locator) return *this; } -Slice* Cell_Slices::Locator::GetElement() const +Slice* Cell_Slices::Locator::getElement() const // ******************************************** { - return _sliceLocator.GetElement(); + return _sliceLocator.getElement(); } -Locator* Cell_Slices::Locator::GetClone() const +Locator* Cell_Slices::Locator::getClone() const // **************************************************** { return new Locator(*this); @@ -1499,17 +1499,17 @@ void Cell_Slices::Locator::Progress() do { _sliceLocator.Progress(); } - while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->getMask() & _mask)); + while (_sliceLocator.IsValid() && !(_sliceLocator.getElement()->getLayer()->getMask() & _mask)); } } -string Cell_Slices::Locator::_GetString() const +string Cell_Slices::Locator::_getString() const // ******************************************** { string s = "<" + _TName("Cell::Slices::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -1553,25 +1553,25 @@ Cell_Components& Cell_Components::operator=(const Cell_Components& components) return *this; } -Collection* Cell_Components::GetClone() const +Collection* Cell_Components::getClone() const // ****************************************************** { return new Cell_Components(*this); } -Locator* Cell_Components::GetLocator() const +Locator* Cell_Components::getLocator() const // ***************************************************** { return new Locator(_cell, _mask); } -string Cell_Components::_GetString() const +string Cell_Components::_getString() const // *************************************** { string s = "<" + _TName("Cell::Components"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -1604,13 +1604,13 @@ Cell_Components::Locator::Locator(const Cell* cell, const Layer::Mask& mask) _component(NULL) { if (_cell && (_mask != 0)) { - _sliceLocator = _cell->GetSlices(_mask).GetLocator(); + _sliceLocator = _cell->getSlices(_mask).getLocator(); while (!_component && _sliceLocator.IsValid()) { - Slice* slice = _sliceLocator.GetElement(); + Slice* slice = _sliceLocator.getElement(); if (slice) { - _componentLocator = slice->GetComponents().GetLocator(); + _componentLocator = slice->getComponents().getLocator(); while (!_component && _componentLocator.IsValid()) { - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); if (!_component) _componentLocator.Progress(); } } @@ -1641,13 +1641,13 @@ Cell_Components::Locator& Cell_Components::Locator::operator=(const Locator& loc return *this; } -Component* Cell_Components::Locator::GetElement() const +Component* Cell_Components::Locator::getElement() const // **************************************************** { return _component; } -Locator* Cell_Components::Locator::GetClone() const +Locator* Cell_Components::Locator::getClone() const // ************************************************************ { return new Locator(*this); @@ -1666,17 +1666,17 @@ void Cell_Components::Locator::Progress() _component = NULL; do { _componentLocator.Progress(); - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); } while (!_component && _componentLocator.IsValid()); if (!_component) { do { _sliceLocator.Progress(); - Slice* slice = _sliceLocator.GetElement(); + Slice* slice = _sliceLocator.getElement(); if (slice) { - _componentLocator = slice->GetComponents().GetLocator(); + _componentLocator = slice->getComponents().getLocator(); while (!_component && _componentLocator.IsValid()) { - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); if (!_component) _componentLocator.Progress(); } } @@ -1686,13 +1686,13 @@ void Cell_Components::Locator::Progress() } } -string Cell_Components::Locator::_GetString() const +string Cell_Components::Locator::_getString() const // ************************************************ { string s = "<" + _TName("Cell::Components::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -1740,26 +1740,26 @@ Cell_ComponentsUnder& Cell_ComponentsUnder::operator=(const Cell_ComponentsUnder return *this; } -Collection* Cell_ComponentsUnder::GetClone() const +Collection* Cell_ComponentsUnder::getClone() const // *********************************************************** { return new Cell_ComponentsUnder(*this); } -Locator* Cell_ComponentsUnder::GetLocator() const +Locator* Cell_ComponentsUnder::getLocator() const // ********************************************************** { return new Locator(_cell, _area, _mask); } -string Cell_ComponentsUnder::_GetString() const +string Cell_ComponentsUnder::_getString() const // ******************************************** { string s = "<" + _TName("Cell::ComponentsUnder"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_area); + s += " " + getString(_mask); } s += ">"; return s; @@ -1794,13 +1794,13 @@ Cell_ComponentsUnder::Locator::Locator(const Cell* cell, const Box& area, const _component(NULL) { if (_cell && !_area.isEmpty()) { - _sliceLocator = _cell->GetSlices(_mask).GetLocator(); + _sliceLocator = _cell->getSlices(_mask).getLocator(); while (!_component && _sliceLocator.IsValid()) { - Slice* slice = _sliceLocator.GetElement(); + Slice* slice = _sliceLocator.getElement(); if (slice) { - _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); + _componentLocator = slice->getComponentsUnder(_area).getLocator(); if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); } if (!_component) _sliceLocator.Progress(); } @@ -1831,13 +1831,13 @@ Cell_ComponentsUnder::Locator& Cell_ComponentsUnder::Locator::operator=(const Lo return *this; } -Component* Cell_ComponentsUnder::Locator::GetElement() const +Component* Cell_ComponentsUnder::Locator::getElement() const // ********************************************************* { return _component; } -Locator* Cell_ComponentsUnder::Locator::GetClone() const +Locator* Cell_ComponentsUnder::Locator::getClone() const // ***************************************************************** { return new Locator(*this); @@ -1856,29 +1856,29 @@ void Cell_ComponentsUnder::Locator::Progress() _component = NULL; _componentLocator.Progress(); if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); else { do { _sliceLocator.Progress(); - Slice* slice = _sliceLocator.GetElement(); + Slice* slice = _sliceLocator.getElement(); if (slice) { - _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); + _componentLocator = slice->getComponentsUnder(_area).getLocator(); if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); + _component = _componentLocator.getElement(); } } while (!_component && _sliceLocator.IsValid()); } } } -string Cell_ComponentsUnder::Locator::_GetString() const +string Cell_ComponentsUnder::Locator::_getString() const // ***************************************************** { string s = "<" + _TName("Cell::ComponentsUnder::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_area); + s += " " + getString(_mask); } s += ">"; return s; @@ -1922,25 +1922,25 @@ Cell_Occurrences& Cell_Occurrences::operator=(const Cell_Occurrences& occurrence return *this; } -Collection* Cell_Occurrences::GetClone() const +Collection* Cell_Occurrences::getClone() const // ***************************************************** { return new Cell_Occurrences(*this); } -Locator* Cell_Occurrences::GetLocator() const +Locator* Cell_Occurrences::getLocator() const // **************************************************** { return new Locator(_cell, _searchDepth); } -string Cell_Occurrences::_GetString() const +string Cell_Occurrences::_getString() const // *************************************** { string s = "<" + _TName("Cell::Occurrences"); if (_cell) { - s += " " + GetString(_cell); - if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + s += " " + getString(_cell); + if (_searchDepth != ((unsigned)-1)) s += " " + getString(_searchDepth); } s += ">"; return s; @@ -1979,19 +1979,19 @@ Cell_Occurrences::Locator::Locator(const Cell* cell, unsigned searchDepth) _occurrenceLocator() { if (_cell) { - _componentLocator = _cell->GetComponents().GetLocator(); + _componentLocator = _cell->getComponents().getLocator(); if (_componentLocator.IsValid()) _state = 1; else { - _rubberLocator = _cell->GetRubbers().GetLocator(); + _rubberLocator = _cell->getRubbers().getLocator(); if (_rubberLocator.IsValid()) _state = 2; else { - _markerLocator = _cell->GetMarkers().GetLocator(); + _markerLocator = _cell->getMarkers().getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); if (_instanceLocator.IsValid()) _state = 4; } @@ -2028,19 +2028,19 @@ Cell_Occurrences::Locator& Cell_Occurrences::Locator::operator=(const Locator& l return *this; } -Occurrence Cell_Occurrences::Locator::GetElement() const +Occurrence Cell_Occurrences::Locator::getElement() const // *************************************************** { if (_state) { switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); - case 2 : return Occurrence(_rubberLocator.GetElement()); - case 3 : return Occurrence(_markerLocator.GetElement()); - case 4 : return Occurrence(_instanceLocator.GetElement()); + case 1 : return Occurrence(_componentLocator.getElement()); + case 2 : return Occurrence(_rubberLocator.getElement()); + case 3 : return Occurrence(_markerLocator.getElement()); + case 4 : return Occurrence(_instanceLocator.getElement()); case 5 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_instanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -2048,7 +2048,7 @@ Occurrence Cell_Occurrences::Locator::GetElement() const return Occurrence(); } -Locator* Cell_Occurrences::Locator::GetClone() const +Locator* Cell_Occurrences::Locator::getClone() const // *********************************************************** { return new Locator(*this); @@ -2068,15 +2068,15 @@ void Cell_Occurrences::Locator::Progress() case 1 : _componentLocator.Progress(); if (!_componentLocator.IsValid()) { - _rubberLocator = _cell->GetRubbers().GetLocator(); + _rubberLocator = _cell->getRubbers().getLocator(); if (_rubberLocator.IsValid()) _state = 2; else { - _markerLocator = _cell->GetMarkers().GetLocator(); + _markerLocator = _cell->getMarkers().getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2088,11 +2088,11 @@ void Cell_Occurrences::Locator::Progress() case 2 : _rubberLocator.Progress(); if (!_rubberLocator.IsValid()) { - _markerLocator = _cell->GetMarkers().GetLocator(); + _markerLocator = _cell->getMarkers().getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2103,7 +2103,7 @@ void Cell_Occurrences::Locator::Progress() case 3 : _markerLocator.Progress(); if (!_markerLocator.IsValid()) { - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2116,14 +2116,14 @@ void Cell_Occurrences::Locator::Progress() if (!_instanceLocator.IsValid()) _state = 0; } else { - Instance* instance = _instanceLocator.GetElement(); + Instance* instance = _instanceLocator.getElement(); if (instance->IsTerminal()) { _instanceLocator.Progress(); if (!_instanceLocator.IsValid()) _state = 0; } else { _occurrenceLocator = - instance->GetMasterCell()->GetOccurrences(_searchDepth - 1).GetLocator(); + instance->getMasterCell()->getOccurrences(_searchDepth - 1).getLocator(); if (_occurrenceLocator.IsValid()) _state = 5; else { @@ -2147,13 +2147,13 @@ void Cell_Occurrences::Locator::Progress() } } -string Cell_Occurrences::Locator::_GetString() const +string Cell_Occurrences::Locator::_getString() const // ************************************************ { string s = "<" + _TName("Cell::Occurrences::Locator"); if (_cell) { - s += " " + GetString(_cell); - if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + s += " " + getString(_cell); + if (_searchDepth != ((unsigned)-1)) s += " " + getString(_searchDepth); } s += ">"; return s; @@ -2201,26 +2201,26 @@ Cell_OccurrencesUnder& Cell_OccurrencesUnder::operator=(const Cell_OccurrencesUn return *this; } -Collection* Cell_OccurrencesUnder::GetClone() const +Collection* Cell_OccurrencesUnder::getClone() const // ********************************************************** { return new Cell_OccurrencesUnder(*this); } -Locator* Cell_OccurrencesUnder::GetLocator() const +Locator* Cell_OccurrencesUnder::getLocator() const // ********************************************************* { return new Locator(_cell, _area, _searchDepth); } -string Cell_OccurrencesUnder::_GetString() const +string Cell_OccurrencesUnder::_getString() const // ******************************************** { string s = "<" + _TName("Cell::OccurrencesUnder"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + s += " " + getString(_cell); + s += " " + getString(_area); + if (_searchDepth != ((unsigned)-1)) s += " " + getString(_searchDepth); } s += ">"; return s; @@ -2261,19 +2261,19 @@ Cell_OccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area, unsig _occurrenceLocator() { if (_cell && !_area.isEmpty()) { - _componentLocator = _cell->GetComponentsUnder(_area).GetLocator(); + _componentLocator = _cell->getComponentsUnder(_area).getLocator(); if (_componentLocator.IsValid()) _state = 1; else { - _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); + _rubberLocator = _cell->getRubbersUnder(_area).getLocator(); if (_rubberLocator.IsValid()) _state = 2; else { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + _markerLocator = _cell->getMarkersUnder(_area).getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); if (_instanceLocator.IsValid()) _state = 4; } @@ -2312,19 +2312,19 @@ Cell_OccurrencesUnder::Locator& Cell_OccurrencesUnder::Locator::operator=(const return *this; } -Occurrence Cell_OccurrencesUnder::Locator::GetElement() const +Occurrence Cell_OccurrencesUnder::Locator::getElement() const // ******************************************************** { if (_state) { switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); - case 2 : return Occurrence(_rubberLocator.GetElement()); - case 3 : return Occurrence(_markerLocator.GetElement()); - case 4 : return Occurrence(_instanceLocator.GetElement()); + case 1 : return Occurrence(_componentLocator.getElement()); + case 2 : return Occurrence(_rubberLocator.getElement()); + case 3 : return Occurrence(_markerLocator.getElement()); + case 4 : return Occurrence(_instanceLocator.getElement()); case 5 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_instanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -2332,7 +2332,7 @@ Occurrence Cell_OccurrencesUnder::Locator::GetElement() const return Occurrence(); } -Locator* Cell_OccurrencesUnder::Locator::GetClone() const +Locator* Cell_OccurrencesUnder::Locator::getClone() const // **************************************************************** { return new Locator(*this); @@ -2352,15 +2352,15 @@ void Cell_OccurrencesUnder::Locator::Progress() case 1 : _componentLocator.Progress(); if (!_componentLocator.IsValid()) { - _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); + _rubberLocator = _cell->getRubbersUnder(_area).getLocator(); if (_rubberLocator.IsValid()) _state = 2; else { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + _markerLocator = _cell->getMarkersUnder(_area).getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2372,11 +2372,11 @@ void Cell_OccurrencesUnder::Locator::Progress() case 2 : _rubberLocator.Progress(); if (!_rubberLocator.IsValid()) { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + _markerLocator = _cell->getMarkersUnder(_area).getLocator(); if (_markerLocator.IsValid()) _state = 3; else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2387,7 +2387,7 @@ void Cell_OccurrencesUnder::Locator::Progress() case 3 : _markerLocator.Progress(); if (!_markerLocator.IsValid()) { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); if (_instanceLocator.IsValid()) _state = 4; else @@ -2400,17 +2400,17 @@ void Cell_OccurrencesUnder::Locator::Progress() if (!_instanceLocator.IsValid()) _state = 0; } else { - Instance* instance = _instanceLocator.GetElement(); + Instance* instance = _instanceLocator.getElement(); if (instance->IsTerminal()) { _instanceLocator.Progress(); if (!_instanceLocator.IsValid()) _state = 0; } else { Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - Cell* masterCell = instance->GetMasterCell(); + instance->getTransformation().getInvert().applyOn(masterArea); + Cell* masterCell = instance->getMasterCell(); _occurrenceLocator = - masterCell->GetOccurrencesUnder(masterArea, _searchDepth - 1).GetLocator(); + masterCell->getOccurrencesUnder(masterArea, _searchDepth - 1).getLocator(); if (_occurrenceLocator.IsValid()) _state = 5; else { @@ -2434,14 +2434,14 @@ void Cell_OccurrencesUnder::Locator::Progress() } } -string Cell_OccurrencesUnder::Locator::_GetString() const +string Cell_OccurrencesUnder::Locator::_getString() const // ***************************************************** { string s = "<" + _TName("Cell::OccurrencesUnder::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + s += " " + getString(_cell); + s += " " + getString(_area); + if (_searchDepth != ((unsigned)-1)) s += " " + getString(_searchDepth); } s += ">"; return s; @@ -2472,23 +2472,23 @@ Cell_LeafInstanceOccurrences& Cell_LeafInstanceOccurrences::operator=(const Cell return *this; } -Collection* Cell_LeafInstanceOccurrences::GetClone() const +Collection* Cell_LeafInstanceOccurrences::getClone() const // ********************************************************************* { return new Cell_LeafInstanceOccurrences(*this); } -Locator* Cell_LeafInstanceOccurrences::GetLocator() const +Locator* Cell_LeafInstanceOccurrences::getLocator() const // ******************************************************************** { return new Locator(_cell); } -string Cell_LeafInstanceOccurrences::_GetString() const +string Cell_LeafInstanceOccurrences::_getString() const // ******************************************************* { string s = "<" + _TName("Cell::LeafInstanceOccurrences"); - if (_cell) s += " " + GetString(_cell); + if (_cell) s += " " + getString(_cell); s += ">"; return s; } @@ -2509,14 +2509,14 @@ Cell_LeafInstanceOccurrences::Locator::Locator(const Cell* cell) _occurrenceLocator() { if (_cell) { - _leafInstanceLocator = _cell->GetLeafInstances().GetLocator(); + _leafInstanceLocator = _cell->getLeafInstances().getLocator(); if (_leafInstanceLocator.IsValid()) _state = 1; else { - _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); + _nonLeafInstanceLocator = _cell->getNonLeafInstances().getLocator(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); + Cell* masterCell = _nonLeafInstanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getLeafInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2548,16 +2548,16 @@ Cell_LeafInstanceOccurrences::Locator& Cell_LeafInstanceOccurrences::Locator::op return *this; } -Occurrence Cell_LeafInstanceOccurrences::Locator::GetElement() const +Occurrence Cell_LeafInstanceOccurrences::Locator::getElement() const // ******************************************************************* { if (_state) { switch (_state) { - case 1 : return Occurrence(_leafInstanceLocator.GetElement()); + case 1 : return Occurrence(_leafInstanceLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_nonLeafInstanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -2565,7 +2565,7 @@ Occurrence Cell_LeafInstanceOccurrences::Locator::GetElement() const return Occurrence(); } -Locator* Cell_LeafInstanceOccurrences::Locator::GetClone() const +Locator* Cell_LeafInstanceOccurrences::Locator::getClone() const // *************************************************************************** { return new Locator(*this); @@ -2586,10 +2586,10 @@ void Cell_LeafInstanceOccurrences::Locator::Progress() _leafInstanceLocator.Progress(); if (!_leafInstanceLocator.IsValid()) { _state = 0; - _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); + _nonLeafInstanceLocator = _cell->getNonLeafInstances().getLocator(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); + Cell* masterCell = _nonLeafInstanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getLeafInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2604,9 +2604,9 @@ void Cell_LeafInstanceOccurrences::Locator::Progress() if (_nonLeafInstanceLocator.IsValid()) { _nonLeafInstanceLocator.Progress(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); + Cell* masterCell = _nonLeafInstanceLocator.getElement()->getMasterCell(); _occurrenceLocator = - masterCell->GetLeafInstanceOccurrences().GetLocator(); + masterCell->getLeafInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2619,11 +2619,11 @@ void Cell_LeafInstanceOccurrences::Locator::Progress() } } -string Cell_LeafInstanceOccurrences::Locator::_GetString() const +string Cell_LeafInstanceOccurrences::Locator::_getString() const // **************************************************************** { string s = "<" + _TName("Cell::LeafInstanceOccurrences::Locator"); - if (_cell) s += " " + GetString(_cell); + if (_cell) s += " " + getString(_cell); s += ">"; return s; } @@ -2666,25 +2666,25 @@ Cell_LeafInstanceOccurrencesUnder& Cell_LeafInstanceOccurrencesUnder::operator=( return *this; } -Collection* Cell_LeafInstanceOccurrencesUnder::GetClone() const +Collection* Cell_LeafInstanceOccurrencesUnder::getClone() const // ************************************************************************** { return new Cell_LeafInstanceOccurrencesUnder(*this); } -Locator* Cell_LeafInstanceOccurrencesUnder::GetLocator() const +Locator* Cell_LeafInstanceOccurrencesUnder::getLocator() const // ************************************************************************* { return new Locator(_cell, _area); } -string Cell_LeafInstanceOccurrencesUnder::_GetString() const +string Cell_LeafInstanceOccurrencesUnder::_getString() const // ************************************************************ { string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); + s += " " + getString(_cell); + s += " " + getString(_area); } s += ">"; return s; @@ -2719,18 +2719,18 @@ Cell_LeafInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& _occurrenceLocator() { if (_cell && !_area.isEmpty()) { - _leafInstanceLocator = _cell->GetLeafInstancesUnder(_area).GetLocator(); + _leafInstanceLocator = _cell->getLeafInstancesUnder(_area).getLocator(); if (_leafInstanceLocator.IsValid()) _state = 1; else { - _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); + _nonLeafInstanceLocator = _cell->getNonLeafInstancesUnder(_area).getLocator(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonLeafInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getLeafInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2764,16 +2764,16 @@ Cell_LeafInstanceOccurrencesUnder::Locator& Cell_LeafInstanceOccurrencesUnder::L return *this; } -Occurrence Cell_LeafInstanceOccurrencesUnder::Locator::GetElement() const +Occurrence Cell_LeafInstanceOccurrencesUnder::Locator::getElement() const // ************************************************************************ { if (_state) { switch (_state) { - case 1 : return Occurrence(_leafInstanceLocator.GetElement()); + case 1 : return Occurrence(_leafInstanceLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_nonLeafInstanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -2781,7 +2781,7 @@ Occurrence Cell_LeafInstanceOccurrencesUnder::Locator::GetElement() const return Occurrence(); } -Locator* Cell_LeafInstanceOccurrencesUnder::Locator::GetClone() const +Locator* Cell_LeafInstanceOccurrencesUnder::Locator::getClone() const // ******************************************************************************** { return new Locator(*this); @@ -2802,14 +2802,14 @@ void Cell_LeafInstanceOccurrencesUnder::Locator::Progress() _leafInstanceLocator.Progress(); if (!_leafInstanceLocator.IsValid()) { _state = 0; - _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); + _nonLeafInstanceLocator = _cell->getNonLeafInstancesUnder(_area).getLocator(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonLeafInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getLeafInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2824,12 +2824,12 @@ void Cell_LeafInstanceOccurrencesUnder::Locator::Progress() if (_nonLeafInstanceLocator.IsValid()) { _nonLeafInstanceLocator.Progress(); while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonLeafInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getLeafInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2842,13 +2842,13 @@ void Cell_LeafInstanceOccurrencesUnder::Locator::Progress() } } -string Cell_LeafInstanceOccurrencesUnder::Locator::_GetString() const +string Cell_LeafInstanceOccurrencesUnder::Locator::_getString() const // ********************************************************************* { string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); + s += " " + getString(_cell); + s += " " + getString(_area); } s += ">"; return s; @@ -2881,23 +2881,23 @@ Cell_TerminalInstanceOccurrences& Cell_TerminalInstanceOccurrences::operator=(co return *this; } -Collection* Cell_TerminalInstanceOccurrences::GetClone() const +Collection* Cell_TerminalInstanceOccurrences::getClone() const // ********************************************************************* { return new Cell_TerminalInstanceOccurrences(*this); } -Locator* Cell_TerminalInstanceOccurrences::GetLocator() const +Locator* Cell_TerminalInstanceOccurrences::getLocator() const // ******************************************************************** { return new Locator(_cell); } -string Cell_TerminalInstanceOccurrences::_GetString() const +string Cell_TerminalInstanceOccurrences::_getString() const // ******************************************************* { string s = "<" + _TName("Cell::TerminalInstanceOccurrences"); - if (_cell) s += " " + GetString(_cell); + if (_cell) s += " " + getString(_cell); s += ">"; return s; } @@ -2918,14 +2918,14 @@ Cell_TerminalInstanceOccurrences::Locator::Locator(const Cell* cell) _occurrenceLocator() { if (_cell) { - _terminalInstanceLocator = _cell->GetTerminalInstances().GetLocator(); + _terminalInstanceLocator = _cell->getTerminalInstances().getLocator(); if (_terminalInstanceLocator.IsValid()) _state = 1; else { - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); + _nonTerminalInstanceLocator = _cell->getNonTerminalInstances().getLocator(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); + Cell* masterCell = _nonTerminalInstanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getTerminalInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -2957,16 +2957,16 @@ Cell_TerminalInstanceOccurrences::Locator& Cell_TerminalInstanceOccurrences::Loc return *this; } -Occurrence Cell_TerminalInstanceOccurrences::Locator::GetElement() const +Occurrence Cell_TerminalInstanceOccurrences::Locator::getElement() const // ******************************************************************* { if (_state) { switch (_state) { - case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); + case 1 : return Occurrence(_terminalInstanceLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_nonTerminalInstanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -2974,7 +2974,7 @@ Occurrence Cell_TerminalInstanceOccurrences::Locator::GetElement() const return Occurrence(); } -Locator* Cell_TerminalInstanceOccurrences::Locator::GetClone() const +Locator* Cell_TerminalInstanceOccurrences::Locator::getClone() const // *************************************************************************** { return new Locator(*this); @@ -2995,10 +2995,10 @@ void Cell_TerminalInstanceOccurrences::Locator::Progress() _terminalInstanceLocator.Progress(); if (!_terminalInstanceLocator.IsValid()) { _state = 0; - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); + _nonTerminalInstanceLocator = _cell->getNonTerminalInstances().getLocator(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); + Cell* masterCell = _nonTerminalInstanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getTerminalInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3013,9 +3013,9 @@ void Cell_TerminalInstanceOccurrences::Locator::Progress() if (_nonTerminalInstanceLocator.IsValid()) { _nonTerminalInstanceLocator.Progress(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); + Cell* masterCell = _nonTerminalInstanceLocator.getElement()->getMasterCell(); _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrences().GetLocator(); + masterCell->getTerminalInstanceOccurrences().getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3028,11 +3028,11 @@ void Cell_TerminalInstanceOccurrences::Locator::Progress() } } -string Cell_TerminalInstanceOccurrences::Locator::_GetString() const +string Cell_TerminalInstanceOccurrences::Locator::_getString() const // **************************************************************** { string s = "<" + _TName("Cell::TerminalInstanceOccurrences::Locator"); - if (_cell) s += " " + GetString(_cell); + if (_cell) s += " " + getString(_cell); s += ">"; return s; } @@ -3075,25 +3075,25 @@ Cell_TerminalInstanceOccurrencesUnder& Cell_TerminalInstanceOccurrencesUnder::op return *this; } -Collection* Cell_TerminalInstanceOccurrencesUnder::GetClone() const +Collection* Cell_TerminalInstanceOccurrencesUnder::getClone() const // ************************************************************************** { return new Cell_TerminalInstanceOccurrencesUnder(*this); } -Locator* Cell_TerminalInstanceOccurrencesUnder::GetLocator() const +Locator* Cell_TerminalInstanceOccurrencesUnder::getLocator() const // ************************************************************************* { return new Locator(_cell, _area); } -string Cell_TerminalInstanceOccurrencesUnder::_GetString() const +string Cell_TerminalInstanceOccurrencesUnder::_getString() const // ************************************************************ { string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); + s += " " + getString(_cell); + s += " " + getString(_area); } s += ">"; return s; @@ -3128,18 +3128,18 @@ Cell_TerminalInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const _occurrenceLocator() { if (_cell && !_area.isEmpty()) { - _terminalInstanceLocator = _cell->GetTerminalInstancesUnder(_area).GetLocator(); + _terminalInstanceLocator = _cell->getTerminalInstancesUnder(_area).getLocator(); if (_terminalInstanceLocator.IsValid()) _state = 1; else { - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); + _nonTerminalInstanceLocator = _cell->getNonTerminalInstancesUnder(_area).getLocator(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonTerminalInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getTerminalInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3173,16 +3173,16 @@ Cell_TerminalInstanceOccurrencesUnder::Locator& Cell_TerminalInstanceOccurrences return *this; } -Occurrence Cell_TerminalInstanceOccurrencesUnder::Locator::GetElement() const +Occurrence Cell_TerminalInstanceOccurrencesUnder::Locator::getElement() const // ************************************************************************ { if (_state) { switch (_state) { - case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); + case 1 : return Occurrence(_terminalInstanceLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_nonTerminalInstanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -3190,7 +3190,7 @@ Occurrence Cell_TerminalInstanceOccurrencesUnder::Locator::GetElement() const return Occurrence(); } -Locator* Cell_TerminalInstanceOccurrencesUnder::Locator::GetClone() const +Locator* Cell_TerminalInstanceOccurrencesUnder::Locator::getClone() const // ******************************************************************************** { return new Locator(*this); @@ -3211,14 +3211,14 @@ void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress() _terminalInstanceLocator.Progress(); if (!_terminalInstanceLocator.IsValid()) { _state = 0; - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); + _nonTerminalInstanceLocator = _cell->getNonTerminalInstancesUnder(_area).getLocator(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonTerminalInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getTerminalInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3233,12 +3233,12 @@ void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress() if (_nonTerminalInstanceLocator.IsValid()) { _nonTerminalInstanceLocator.Progress(); while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _nonTerminalInstanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + masterCell->getTerminalInstanceOccurrencesUnder(masterArea).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3251,13 +3251,13 @@ void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress() } } -string Cell_TerminalInstanceOccurrencesUnder::Locator::_GetString() const +string Cell_TerminalInstanceOccurrencesUnder::Locator::_getString() const // ********************************************************************* { string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); + s += " " + getString(_cell); + s += " " + getString(_area); } s += ">"; return s; @@ -3301,25 +3301,25 @@ Cell_ComponentOccurrences& Cell_ComponentOccurrences::operator=(const Cell_Compo return *this; } -Collection* Cell_ComponentOccurrences::GetClone() const +Collection* Cell_ComponentOccurrences::getClone() const // ************************************************************** { return new Cell_ComponentOccurrences(*this); } -Locator* Cell_ComponentOccurrences::GetLocator() const +Locator* Cell_ComponentOccurrences::getLocator() const // ************************************************************* { return new Locator(_cell, _mask); } -string Cell_ComponentOccurrences::_GetString() const +string Cell_ComponentOccurrences::_getString() const // ************************************************ { string s = "<" + _TName("Cell::ComponentOccurrences"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -3354,14 +3354,14 @@ Cell_ComponentOccurrences::Locator::Locator(const Cell* cell, const Layer::Mask& _occurrenceLocator() { if (_cell && (_mask != 0)) { - _componentLocator = _cell->GetComponents(_mask).GetLocator(); + _componentLocator = _cell->getComponents(_mask).getLocator(); if (_componentLocator.IsValid()) _state = 1; else { - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + Cell* masterCell = _instanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getComponentOccurrences(_mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3395,16 +3395,16 @@ Cell_ComponentOccurrences::Locator& Cell_ComponentOccurrences::Locator::operator return *this; } -Occurrence Cell_ComponentOccurrences::Locator::GetElement() const +Occurrence Cell_ComponentOccurrences::Locator::getElement() const // ************************************************************ { if (_state) { switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); + case 1 : return Occurrence(_componentLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_instanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -3412,7 +3412,7 @@ Occurrence Cell_ComponentOccurrences::Locator::GetElement() const return Occurrence(); } -Locator* Cell_ComponentOccurrences::Locator::GetClone() const +Locator* Cell_ComponentOccurrences::Locator::getClone() const // ******************************************************************** { return new Locator(*this); @@ -3433,10 +3433,10 @@ void Cell_ComponentOccurrences::Locator::Progress() _componentLocator.Progress(); if (!_componentLocator.IsValid()) { _state = 0; - _instanceLocator = _cell->GetInstances().GetLocator(); + _instanceLocator = _cell->getInstances().getLocator(); while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + Cell* masterCell = _instanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getComponentOccurrences(_mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3451,8 +3451,8 @@ void Cell_ComponentOccurrences::Locator::Progress() if (_instanceLocator.IsValid()) { _instanceLocator.Progress(); while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + Cell* masterCell = _instanceLocator.getElement()->getMasterCell(); + _occurrenceLocator = masterCell->getComponentOccurrences(_mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3465,13 +3465,13 @@ void Cell_ComponentOccurrences::Locator::Progress() } } -string Cell_ComponentOccurrences::Locator::_GetString() const +string Cell_ComponentOccurrences::Locator::_getString() const // ********************************************************* { string s = "<" + _TName("Cell::ComponentOccurrences::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_mask); } s += ">"; return s; @@ -3519,26 +3519,26 @@ Cell_ComponentOccurrencesUnder& Cell_ComponentOccurrencesUnder::operator=(const return *this; } -Collection* Cell_ComponentOccurrencesUnder::GetClone() const +Collection* Cell_ComponentOccurrencesUnder::getClone() const // ******************************************************************* { return new Cell_ComponentOccurrencesUnder(*this); } -Locator* Cell_ComponentOccurrencesUnder::GetLocator() const +Locator* Cell_ComponentOccurrencesUnder::getLocator() const // ****************************************************************** { return new Locator(_cell, _area, _mask); } -string Cell_ComponentOccurrencesUnder::_GetString() const +string Cell_ComponentOccurrencesUnder::_getString() const // ***************************************************** { string s = "<" + _TName("Cell::ComponentOccurrencesUnder"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_area); + s += " " + getString(_mask); } s += ">"; return s; @@ -3575,18 +3575,18 @@ Cell_ComponentOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& ar _occurrenceLocator() { if (_cell && !_area.isEmpty() && (_mask != 0)) { - _componentLocator = _cell->GetComponentsUnder(_area, _mask).GetLocator(); + _componentLocator = _cell->getComponentsUnder(_area, _mask).getLocator(); if (_componentLocator.IsValid()) _state = 1; else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _instanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + masterCell->getComponentOccurrencesUnder(masterArea, _mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3622,16 +3622,16 @@ Cell_ComponentOccurrencesUnder::Locator& Cell_ComponentOccurrencesUnder::Locator return *this; } -Occurrence Cell_ComponentOccurrencesUnder::Locator::GetElement() const +Occurrence Cell_ComponentOccurrencesUnder::Locator::getElement() const // ***************************************************************** { if (_state) { switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); + case 1 : return Occurrence(_componentLocator.getElement()); case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + Occurrence occurrence = _occurrenceLocator.getElement(); + Entity* entity = occurrence.getEntity(); + Path path = Path(_instanceLocator.getElement(), occurrence.getPath()); return Occurrence(entity, path); } } @@ -3639,7 +3639,7 @@ Occurrence Cell_ComponentOccurrencesUnder::Locator::GetElement() const return Occurrence(); } -Locator* Cell_ComponentOccurrencesUnder::Locator::GetClone() const +Locator* Cell_ComponentOccurrencesUnder::Locator::getClone() const // ************************************************************************* { return new Locator(*this); @@ -3660,14 +3660,14 @@ void Cell_ComponentOccurrencesUnder::Locator::Progress() _componentLocator.Progress(); if (!_componentLocator.IsValid()) { _state = 0; - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + _instanceLocator = _cell->getInstancesUnder(_area).getLocator(); while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _instanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + masterCell->getComponentOccurrencesUnder(masterArea, _mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3682,12 +3682,12 @@ void Cell_ComponentOccurrencesUnder::Locator::Progress() if (_instanceLocator.IsValid()) { _instanceLocator.Progress(); while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); + Instance* instance = _instanceLocator.getElement(); + Cell* masterCell = instance->getMasterCell(); Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); + instance->getTransformation().getInvert().applyOn(masterArea); _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + masterCell->getComponentOccurrencesUnder(masterArea, _mask).getLocator(); if (_occurrenceLocator.IsValid()) _state = 2; else @@ -3700,14 +3700,14 @@ void Cell_ComponentOccurrencesUnder::Locator::Progress() } } -string Cell_ComponentOccurrencesUnder::Locator::_GetString() const +string Cell_ComponentOccurrencesUnder::Locator::_getString() const // ************************************************************** { string s = "<" + _TName("Cell::ComponentOccurrencesUnder::Locator"); if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); + s += " " + getString(_cell); + s += " " + getString(_area); + s += " " + getString(_mask); } s += ">"; return s; @@ -3749,25 +3749,25 @@ Cell_HyperNetRootNetOccurrences& Cell_HyperNetRootNetOccurrences::operator=(cons return *this; } -Collection* Cell_HyperNetRootNetOccurrences::GetClone() const +Collection* Cell_HyperNetRootNetOccurrences::getClone() const // ******************************************************** { return new Cell_HyperNetRootNetOccurrences(*this); } -Locator* Cell_HyperNetRootNetOccurrences::GetLocator() const +Locator* Cell_HyperNetRootNetOccurrences::getLocator() const // ******************************************************* { return new Locator(_cell, _path); } -string Cell_HyperNetRootNetOccurrences::_GetString() const +string Cell_HyperNetRootNetOccurrences::_getString() const // ****************************************** { string s = "<" + _TName("Cell::HyperNetRootNetOccurrences"); if (_cell) { - s += " " + GetString(_cell); - if (!_path.IsEmpty()) s += " " + GetString(_path); + s += " " + getString(_cell); + if (!_path.IsEmpty()) s += " " + getString(_path); } s += ">"; return s; @@ -3797,18 +3797,18 @@ Cell_HyperNetRootNetOccurrences::Locator::Locator(const Cell* cell, Path path) _instanceLocator(), _hyperNetRootNetOccurrenceLocator() { - _netLocator=cell->GetNets().GetLocator(); + _netLocator=cell->getNets().getLocator(); - _instanceLocator=cell->GetInstances().GetLocator(); + _instanceLocator=cell->getInstances().getLocator(); - while (_netLocator.IsValid() && !IsHyperNetRootNetOccurrence(Occurrence(_netLocator.GetElement(),_path))) + while (_netLocator.IsValid() && !IsHyperNetRootNetOccurrence(Occurrence(_netLocator.getElement(),_path))) _netLocator.Progress(); if (!_netLocator.IsValid()) while (!_hyperNetRootNetOccurrenceLocator.IsValid() && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - _hyperNetRootNetOccurrenceLocator=Locator(instance->GetMasterCell(),Path(_path,instance)); + Instance* instance = _instanceLocator.getElement(); + _hyperNetRootNetOccurrenceLocator=Locator(instance->getMasterCell(),Path(_path,instance)); _instanceLocator.Progress(); } } @@ -3833,19 +3833,19 @@ Cell_HyperNetRootNetOccurrences::Locator& Cell_HyperNetRootNetOccurrences::Locat return *this; } -Occurrence Cell_HyperNetRootNetOccurrences::Locator::GetElement() const +Occurrence Cell_HyperNetRootNetOccurrences::Locator::getElement() const // ****************************************************** { if (_netLocator.IsValid()) - return Occurrence(_netLocator.GetElement(),_path); + return Occurrence(_netLocator.getElement(),_path); else if (_hyperNetRootNetOccurrenceLocator.IsValid()) - return _hyperNetRootNetOccurrenceLocator.GetElement(); + return _hyperNetRootNetOccurrenceLocator.getElement(); else return Occurrence(); } -Locator* Cell_HyperNetRootNetOccurrences::Locator::GetClone() const +Locator* Cell_HyperNetRootNetOccurrences::Locator::getClone() const // ************************************************************** { return new Locator(*this); @@ -3865,7 +3865,7 @@ void Cell_HyperNetRootNetOccurrences::Locator::Progress() do { _netLocator.Progress(); } - while (_netLocator.IsValid() && !IsHyperNetRootNetOccurrence(Occurrence(_netLocator.GetElement(),_path))); + while (_netLocator.IsValid() && !IsHyperNetRootNetOccurrence(Occurrence(_netLocator.getElement(),_path))); } else if (_hyperNetRootNetOccurrenceLocator.IsValid()) _hyperNetRootNetOccurrenceLocator.Progress(); @@ -3873,19 +3873,19 @@ void Cell_HyperNetRootNetOccurrences::Locator::Progress() if (!_netLocator.IsValid()) while (!_hyperNetRootNetOccurrenceLocator.IsValid() && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - _hyperNetRootNetOccurrenceLocator=Locator(instance->GetMasterCell(),Path(_path,instance)); + Instance* instance = _instanceLocator.getElement(); + _hyperNetRootNetOccurrenceLocator=Locator(instance->getMasterCell(),Path(_path,instance)); _instanceLocator.Progress(); } } -string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const +string Cell_HyperNetRootNetOccurrences::Locator::_getString() const // *************************************************** { string s = "<" + _TName("Cell::HyperNetRootNetOccurrences::Locator"); if (!_path.IsEmpty()) - s += " " + _path.GetName(); + s += " " + _path.getName(); s += ">"; return s; } @@ -3916,23 +3916,23 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // return *this; //} // -//Collection* Cell_ImpactedMainViews::GetClone() const +//Collection* Cell_ImpactedMainViews::getClone() const //// ************************************************************ //{ // return new Cell_ImpactedMainViews(*this); //} // -//Locator* Cell_ImpactedMainViews::GetLocator() const +//Locator* Cell_ImpactedMainViews::getLocator() const //// *********************************************************** //{ // return new Locator(_cell); //} // -//string Cell_ImpactedMainViews::_GetString() const +//string Cell_ImpactedMainViews::_getString() const //// ********************************************** //{ // string s = "<" + _TName("Cell::ImpactedMainViews"); -// if (_cell) s += " " + GetString(_cell); +// if (_cell) s += " " + getString(_cell); // s += ">"; // return s; //} @@ -3958,16 +3958,16 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // while (!_mainView && !_cellStack.empty()) { // Cell* cell = _cellStack.top(); // _cellStack.pop(); -// for_each_instance(instance, cell->GetSlaveInstances()) { -// Cell* cell = instance->GetCell(); +// for_each_instance(instance, cell->getSlaveInstances()) { +// Cell* cell = instance->getCell(); // if (_cellSet.find(cell) == _cellSet.end()) { // _cellSet.insert(cell); // _cellStack.push(cell); // } // end_for; // } -// _mainViewLocator = cell->GetMainViews().GetLocator(); -// _mainView = _mainViewLocator.GetElement(); +// _mainViewLocator = cell->getMainViews().getLocator(); +// _mainView = _mainViewLocator.getElement(); // } // } //} @@ -3994,13 +3994,13 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // return *this; //} // -//MainView* Cell_ImpactedMainViews::Locator::GetElement() const +//MainView* Cell_ImpactedMainViews::Locator::getElement() const //// ********************************************************** //{ // return _mainView; //} // -//Locator* Cell_ImpactedMainViews::Locator::GetClone() const +//Locator* Cell_ImpactedMainViews::Locator::getClone() const //// ****************************************************************** //{ // return new Locator(*this); @@ -4019,30 +4019,30 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // _mainView = NULL; // do { // _mainViewLocator.Progress(); -// _mainView = _mainViewLocator.GetElement(); +// _mainView = _mainViewLocator.getElement(); // if (!_mainView && !_cellStack.empty()) { // Cell* cell = _cellStack.top(); // _cellStack.pop(); -// for_each_instance(instance, cell->GetSlaveInstances()) { -// Cell* cell = instance->GetCell(); +// for_each_instance(instance, cell->getSlaveInstances()) { +// Cell* cell = instance->getCell(); // if (_cellSet.find(cell) == _cellSet.end()) { // _cellSet.insert(cell); // _cellStack.push(cell); // } // end_for; // } -// _mainViewLocator = cell->GetMainViews().GetLocator(); -// _mainView = _mainViewLocator.GetElement(); +// _mainViewLocator = cell->getMainViews().getLocator(); +// _mainView = _mainViewLocator.getElement(); // } // } while (!_mainView && !_cellStack.empty()); // } //} // -//string Cell_ImpactedMainViews::Locator::_GetString() const +//string Cell_ImpactedMainViews::Locator::_getString() const //// ******************************************************* //{ // string s = "<" + _TName("Cell::ImpactedMainViews::Locator"); -// if (_cell) s += " " + GetString(_cell); +// if (_cell) s += " " + getString(_cell); // s += ">"; // return s; //} @@ -4080,24 +4080,24 @@ Cell_SubCells& Cell_SubCells::operator=(const Cell_SubCells& subCells) return *this; } -Collection* Cell_SubCells::GetClone() const +Collection* Cell_SubCells::getClone() const // *********************************************** { return new Cell_SubCells(*this); } -Locator* Cell_SubCells::GetLocator() const +Locator* Cell_SubCells::getLocator() const // ********************************************** { - return new Locator(_cell->GetInstances().GetLocator()); + return new Locator(_cell->getInstances().getLocator()); } -string Cell_SubCells::_GetString() const +string Cell_SubCells::_getString() const // ************************************* { string s = "<" + _TName("Cell::SubCells"); if (_cell) { - s += " " + GetString(_cell); + s += " " + getString(_cell); } s += ">"; return s; @@ -4124,7 +4124,7 @@ Cell_SubCells::Locator::Locator(InstanceLocator instanceLocator) _instanceLocator(instanceLocator) { if ( IsValid() ) - _cellSet.insert ( _instanceLocator.GetElement()->GetMasterCell() ); + _cellSet.insert ( _instanceLocator.getElement()->getMasterCell() ); } Cell_SubCells::Locator::Locator(const Locator& locator) @@ -4143,13 +4143,13 @@ Cell_SubCells::Locator& Cell_SubCells::Locator::operator=(const Locator& locator return *this; } -Cell* Cell_SubCells::Locator::GetElement() const +Cell* Cell_SubCells::Locator::getElement() const // ********************************************* { - return _instanceLocator.GetElement()->GetMasterCell(); + return _instanceLocator.getElement()->getMasterCell(); } -Locator* Cell_SubCells::Locator::GetClone() const +Locator* Cell_SubCells::Locator::getClone() const // ***************************************************** { return new Locator(*this); @@ -4164,18 +4164,18 @@ bool Cell_SubCells::Locator::IsValid() const void Cell_SubCells::Locator::Progress() // ************************************ { - while ( IsValid() && ( _cellSet.find ( _instanceLocator.GetElement()->GetMasterCell() ) != _cellSet.end() ) ) + while ( IsValid() && ( _cellSet.find ( _instanceLocator.getElement()->getMasterCell() ) != _cellSet.end() ) ) _instanceLocator.Progress(); if ( IsValid() ) - _cellSet.insert ( _instanceLocator.GetElement()->GetMasterCell() ); + _cellSet.insert ( _instanceLocator.getElement()->getMasterCell() ); } -string Cell_SubCells::Locator::_GetString() const +string Cell_SubCells::Locator::_getString() const // ************************************************** { string s = "<" + _TName("Cell::SubCells::Locator"); - s += " " + _GetString(); - s += " " + GetString(_instanceLocator); + s += " " + _getString(); + s += " " + getString(_instanceLocator); s += ">"; return s; } @@ -4200,17 +4200,17 @@ Cell_RecursiveSlavePathes::Locator::Locator ( const Cell* cell ) const Cell* topCell = cell; do { - Instances slaveInstances = topCell->GetSlaveInstances(); + Instances slaveInstances = topCell->getSlaveInstances(); if ( !slaveInstances.IsEmpty() ) { - _instancesStack.push_back ( *slaveInstances.GetLocator() ); - _instancePath = Path ( _instancesStack.back().GetElement(), _instancePath ); + _instancesStack.push_back ( *slaveInstances.getLocator() ); + _instancePath = Path ( _instancesStack.back().getElement(), _instancePath ); -// cerr << "Instances of I: " << topCell->GetName() << endl; -// cerr << "Head I: " << _instancesStack.back().GetElement()->GetName() << endl; -// cerr << "TailPath I: " << _instancePath.GetName() << endl; +// cerr << "Instances of I: " << topCell->getName() << endl; +// cerr << "Head I: " << _instancesStack.back().getElement()->getName() << endl; +// cerr << "TailPath I: " << _instancePath.getName() << endl; - topCell = _instancesStack.back().GetElement()->GetCell(); + topCell = _instancesStack.back().getElement()->getCell(); } else topCell = NULL; @@ -4229,23 +4229,23 @@ void Cell_RecursiveSlavePathes::Locator::Progress () _instancesStack.back().Progress(); if ( _instancesStack.back().IsValid() ) { -// cerr << "Head N: " << _instancesStack.back().GetElement()->GetName() << endl; -// cerr << "TailPath N: " << _instancePath.GetTailPath().GetName() << endl; - _instancePath = Path ( _instancesStack.back().GetElement(), _instancePath.GetTailPath() ); +// cerr << "Head N: " << _instancesStack.back().getElement()->getName() << endl; +// cerr << "TailPath N: " << _instancePath.getTailPath().getName() << endl; + _instancePath = Path ( _instancesStack.back().getElement(), _instancePath.getTailPath() ); - Cell* topCell = _instancesStack.back().GetElement()->GetCell(); + Cell* topCell = _instancesStack.back().getElement()->getCell(); do { - Instances slaveInstances = topCell->GetSlaveInstances(); + Instances slaveInstances = topCell->getSlaveInstances(); if ( !slaveInstances.IsEmpty() ) { - _instancesStack.push_back ( *slaveInstances.GetLocator() ); -// cerr << "Instances of R: " << topCell->GetName() << endl; -// cerr << "Head R: " << _instancesStack.back().GetElement()->GetName() << endl; -// cerr << "TailPath R: " << _instancePath.GetName() << endl; - _instancePath = Path ( _instancesStack.back().GetElement(), _instancePath ); + _instancesStack.push_back ( *slaveInstances.getLocator() ); +// cerr << "Instances of R: " << topCell->getName() << endl; +// cerr << "Head R: " << _instancesStack.back().getElement()->getName() << endl; +// cerr << "TailPath R: " << _instancePath.getName() << endl; + _instancePath = Path ( _instancesStack.back().getElement(), _instancePath ); - topCell = _instancesStack.back().GetElement()->GetCell(); + topCell = _instancesStack.back().getElement()->getCell(); } else topCell = NULL; } while ( topCell ); @@ -4253,8 +4253,8 @@ void Cell_RecursiveSlavePathes::Locator::Progress () return; } else { _instancesStack.pop_back(); - _instancePath = _instancePath.GetTailPath(); -// cerr << "TailPath F: " << _instancePath.GetName() << endl; + _instancePath = _instancePath.getTailPath(); +// cerr << "TailPath F: " << _instancePath.getName() << endl; return; } } @@ -4263,17 +4263,17 @@ void Cell_RecursiveSlavePathes::Locator::Progress () // ------------------------------------------------------------------- -// Hurricane Management : "Cell_RecursiveSlavePathes::Locator::_GetString ()". +// Hurricane Management : "Cell_RecursiveSlavePathes::Locator::_getString ()". -string Cell_RecursiveSlavePathes::Locator::_GetString () const +string Cell_RecursiveSlavePathes::Locator::_getString () const { Name masterCellName = "Finished"; if ( IsValid() ) - masterCellName = _instancesStack.front().GetElement()->GetMasterCell()->GetName(); + masterCellName = _instancesStack.front().getElement()->getMasterCell()->getName(); string s = "<" + _TName("Cell_RecursiveSlavePathes::Locator") - + GetString(masterCellName) + + getString(masterCellName) + ">"; return s; @@ -4288,12 +4288,12 @@ string Cell_RecursiveSlavePathes::Locator::_GetString () const // ------------------------------------------------------------------- -// Hurricane Management : "Cell_RecursiveSlavePathes::_GetString ()". +// Hurricane Management : "Cell_RecursiveSlavePathes::_getString ()". -string Cell_RecursiveSlavePathes::_GetString () const +string Cell_RecursiveSlavePathes::_getString () const { string s = "<" + _TName("Cell_RecursiveSlavePathes") + " " - + GetString(_cell) + " " + + getString(_cell) + " " + ">"; return s; diff --git a/hurricane/src/hurricane/Cells.h b/hurricane/src/hurricane/Cells.h index 7fc6c58b..a761a051 100644 --- a/hurricane/src/hurricane/Cells.h +++ b/hurricane/src/hurricane/Cells.h @@ -46,10 +46,10 @@ typedef GenericFilter CellFilter; #define for_each_cell(cell, cells)\ /*********************************/\ {\ - CellLocator _locator = cells.GetLocator();\ - while (_locator.IsValid()) {\ - Cell* cell = _locator.GetElement();\ - _locator.Progress(); + CellLocator _locator = cells.getLocator();\ + while (_locator.IsValid()) {\ + Cell* cell = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Collection.h b/hurricane/src/hurricane/Collection.h index ea28cad3..2e07d9ff 100644 --- a/hurricane/src/hurricane/Collection.h +++ b/hurricane/src/hurricane/Collection.h @@ -29,159 +29,159 @@ template class Collection : public NestedSlotAdapter { // Constructors // ************ - protected: Collection() - // ******************** - { - } + protected: Collection() + // ******************** + { + } - private: Collection(const Collection& collection); - // *********************************************** - // not implemented to forbid copy construction - // *********************************************** + private: Collection(const Collection& collection); + // *********************************************** + // not implemented to forbid copy construction + // *********************************************** // Destructor // ********** - public: virtual ~Collection() - // ************************** - { - } + public: virtual ~Collection() + // ************************** + { + } // Operators // ********* - private: Collection& operator=(const Collection& collection); - // ********************************************************** - // not implemented to forbid assignment - // ********************************************************** + private: Collection& operator=(const Collection& collection); + // ********************************************************** + // not implemented to forbid assignment + // ********************************************************** // Accessors // ********* - public: virtual Collection* GetClone() const = 0; + public: virtual Collection* getClone() const = 0; - public: virtual Locator* GetLocator() const = 0; + public: virtual Locator* getLocator() const = 0; - public: virtual unsigned GetSize() const - // ************************************* - { - unsigned size = 0; - // we use a GenericLocator to delete the locator allocated by GetLocator() - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - size++; - locator.Progress(); - } - return size; - } + public: virtual unsigned getSize() const + // ************************************* + { + unsigned size = 0; + // we use a GenericLocator to delete the locator allocated by getLocator() + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + size++; + locator.Progress(); + } + return size; + } - public: Type GetFirst() const - // ************************** - { - // we use a GenericLocator to delete the locator allocated by GetLocator() - return GenericLocator(GetLocator()).GetElement(); - } + public: Type getFirst() const + // ************************** + { + // we use a GenericLocator to delete the locator allocated by getLocator() + return GenericLocator(getLocator()).getElement(); + } - public: GenericCollection GetSubSet(const Filter& filter) const - // ************************************************************************ - { - return SubSetCollection(*this, filter); - } + public: GenericCollection getSubSet(const Filter& filter) const + // ************************************************************************ + { + return SubSetCollection(*this, filter); + } - public: template GenericCollection GetSubSet() const - // ************************************************************************* - { - return SubTypeCollection(this); - } + public: template GenericCollection getSubSet() const + // ************************************************************************* + { + return SubTypeCollection(this); + } - public: template - GenericCollection GetSubSet(const Filter& filter) const - // ****************************************************************************** - { - return GetSubSet().GetSubSet(filter); - } + public: template + GenericCollection getSubSet(const Filter& filter) const + // ****************************************************************************** + { + return getSubSet().getSubSet(filter); + } // Predicates // ********** - public: bool IsEmpty() const - // ************************* - { - // we use a GenericLocator to delete the locator allocated by GetLocator() - return !GenericLocator(GetLocator()).IsValid(); - } + public: bool IsEmpty() const + // ************************* + { + // we use a GenericLocator to delete the locator allocated by getLocator() + return !GenericLocator(getLocator()).IsValid(); + } // Utilitarians // ************ - public: void Fill(list& list) const - // ************************************** - { - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - list.push_back(locator.GetElement()); - locator.Progress(); - } - } + public: void Fill(list& list) const + // ************************************** + { + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + list.push_back(locator.getElement()); + locator.Progress(); + } + } - public: void Fill(set& set) const - // ************************************ - { - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - set.insert(locator.GetElement()); - locator.Progress(); - } - } + public: void Fill(set& set) const + // ************************************ + { + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + set.insert(locator.getElement()); + locator.Progress(); + } + } - public: template void Fill(set& set) const - // ********************************************************************* - { - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - set.insert(locator.GetElement()); - locator.Progress(); - } - } + public: template void Fill(set& set) const + // ********************************************************************* + { + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + set.insert(locator.getElement()); + locator.Progress(); + } + } - public: void Fill(vector& vector) const - // ****************************************** - { - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - vector.push_back(locator.GetElement()); - locator.Progress(); - } - } + public: void Fill(vector& vector) const + // ****************************************** + { + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + vector.push_back(locator.getElement()); + locator.Progress(); + } + } // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("Collection"); }; - public: virtual string _GetString() const = 0; + public: virtual string _getString() const = 0; - public: Record* _GetRecord() const - // ************************* - { - Record* record = NULL; - if (!IsEmpty()) { - record = new Record(GetString(this)); - unsigned n = 1; - GenericLocator locator = GetLocator(); - while (locator.IsValid()) { - string slotName = GetString(n++); - Type slotRecord = locator.GetElement(); - record->Add(GetSlot(slotName, slotRecord)); - locator.Progress(); - } - } - return record; - } + public: Record* _getRecord() const + // ************************* + { + Record* record = NULL; + if (!IsEmpty()) { + record = new Record(getString(this)); + unsigned n = 1; + GenericLocator locator = getLocator(); + while (locator.IsValid()) { + string slotName = getString(n++); + Type slotRecord = locator.getElement(); + record->Add(getSlot(slotName, slotRecord)); + locator.Progress(); + } + } + return record; + } }; @@ -197,122 +197,122 @@ template class GenericCollection : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; // Attributes // ********** - private: Collection* _collection; + private: Collection* _collection; // Constructors // ************ - public: GenericCollection() - // *********************** - : Inherit(), - _collection(NULL) - { - } + public: GenericCollection() + // *********************** + : Inherit(), + _collection(NULL) + { + } - public: GenericCollection(const Collection& collection) - // ********************************************************** - : Inherit(), - _collection(collection.GetClone()) - { - } + public: GenericCollection(const Collection& collection) + // ********************************************************** + : Inherit(), + _collection(collection.getClone()) + { + } - public: GenericCollection(const GenericCollection& genericCollection) - // ************************************************************************ - : Inherit(), - _collection(genericCollection.GetClone()) - { - } + public: GenericCollection(const GenericCollection& genericCollection) + // ************************************************************************ + : Inherit(), + _collection(genericCollection.getClone()) + { + } - public: GenericCollection(Collection* collection) - // ************************************************************* - // CAUTION : collection will be deleted by the GenericCollection - // ************************************************************* - : Inherit(), - _collection(collection) - { - } + public: GenericCollection(Collection* collection) + // ************************************************************* + // CAUTION : collection will be deleted by the GenericCollection + // ************************************************************* + : Inherit(), + _collection(collection) + { + } // Destructor // ********** - public: virtual ~GenericCollection() - // ********************************* - { - if (_collection) delete _collection; - } + public: virtual ~GenericCollection() + // ********************************* + { + if (_collection) delete _collection; + } // Operators // ********* - public: GenericCollection& operator=(const Collection& collection) - // ********************************************************************* - { - if (_collection) delete _collection; - _collection = collection.GetClone(); - return *this; - } + public: GenericCollection& operator=(const Collection& collection) + // ********************************************************************* + { + if (_collection) delete _collection; + _collection = collection.getClone(); + return *this; + } - public: GenericCollection& operator=(const GenericCollection& genericCollection) - // ***************************************************************************** - { - if (_collection) delete _collection; - _collection = genericCollection.GetClone(); - return *this; - } + public: GenericCollection& operator=(const GenericCollection& genericCollection) + // ***************************************************************************** + { + if (_collection) delete _collection; + _collection = genericCollection.getClone(); + return *this; + } - public: GenericCollection& operator=(Collection* collection) - // *************************************************************** - // CAUTION : collection will be deleted by the GenericCollection - // *************************************************************** - { - if (_collection) delete _collection; - _collection = collection; - return *this; - } + public: GenericCollection& operator=(Collection* collection) + // *************************************************************** + // CAUTION : collection will be deleted by the GenericCollection + // *************************************************************** + { + if (_collection) delete _collection; + _collection = collection; + return *this; + } // Accessors // ********* - public: virtual Collection* GetClone() const - // *********************************************** - { - return (_collection) ? _collection->GetClone() : NULL; - } + public: virtual Collection* getClone() const + // *********************************************** + { + return (_collection) ? _collection->getClone() : NULL; + } - public: virtual Locator* GetLocator() const - // ********************************************** - { - return (_collection) ? _collection->GetLocator() : NULL; - } + public: virtual Locator* getLocator() const + // ********************************************** + { + return (_collection) ? _collection->getLocator() : NULL; + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_collection) ? _collection->GetSize() : 0; - } + public: virtual unsigned getSize() const + // ************************************* + { + return (_collection) ? _collection->getSize() : 0; + } // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("GenericCollection"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!_collection) - return "<" + _GetTypeName() + " unbound>"; - else - return "<" + _GetTypeName()+ " " + GetString(_collection) + ">"; - } + public: virtual string _getString() const + // ************************************** + { + if (!_collection) + return "<" + _getTypeName() + " unbound>"; + else + return "<" + _getTypeName()+ " " + getString(_collection) + ">"; + } }; @@ -341,88 +341,88 @@ template class ElementCollection : public Collection { // Accessors // ********* - public: virtual ElType GetElement () const { return const_cast(_element); }; - public: virtual Locator* GetClone () const { return new Locator(*this); }; + public: virtual ElType getElement () const { return const_cast(_element); }; + public: virtual Locator* 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 { - if (!_element) - return "<" + _TName("ElementCollection::Locator") + " unbound>"; - else - return "<" + _TName("ElementCollection::Locator") + " " + GetString(_element) + ">"; - } + public: virtual string _getString () const { + if (!_element) + return "<" + _TName("ElementCollection::Locator") + " unbound>"; + else + return "<" + _TName("ElementCollection::Locator") + " " + getString(_element) + ">"; + } }; // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; // Attributes // ********** - private: Type _element; + private: Type _element; // Constructors // ************ - public: ElementCollection() - // *********************** - : Inherit(), - _element(NULL) - { - } + public: ElementCollection() + // *********************** + : Inherit(), + _element(NULL) + { + } - public: ElementCollection(const Type element) - // ********************************************************** - : Inherit(), - _element(element) - { - } + public: ElementCollection(const Type element) + // ********************************************************** + : Inherit(), + _element(element) + { + } - public: ElementCollection(const ElementCollection& elementCollection) - // ************************************************************************ - : Inherit(), - _element(elementCollection._element) - { - } + public: ElementCollection(const ElementCollection& elementCollection) + // ************************************************************************ + : Inherit(), + _element(elementCollection._element) + { + } // Accessors // ********* - public: virtual Collection* GetClone() const - // *********************************************** - { - return ( new ElementCollection (*this) ); - } + public: virtual Collection* getClone() const + // *********************************************** + { + return ( new ElementCollection (*this) ); + } - public: virtual Locator* GetLocator() const - // ********************************************** - { - return ( new Locator (_element) ); - } + public: virtual Locator* getLocator() const + // ********************************************** + { + return ( new Locator (_element) ); + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_element) ? 1 : 0; - } + public: virtual unsigned getSize() const + // ************************************* + { + return (_element) ? 1 : 0; + } // Others // ****** - public: virtual string _GetString() const - // ************************************** - { - if (!_element) - return "<" + _TName("ElementCollection") + " unbound>"; - else - return "<" + _TName("ElementCollection") + " " + GetString(_element) + ">"; - } + public: virtual string _getString() const + // ************************************** + { + if (!_element) + return "<" + _TName("ElementCollection") + " unbound>"; + else + return "<" + _TName("ElementCollection") + " " + getString(_element) + ">"; + } }; @@ -438,158 +438,158 @@ template class SubTypeCollection : public Collection< // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - // Types - // ***** + // Types + // ***** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - // Attributes - // ********** + // Attributes + // ********** - private: GenericLocator _locator; + private: GenericLocator _locator; - // Constructors - // ************ + // Constructors + // ************ - public: Locator(const GenericCollection& collection) - // ******************************************************** - : Inherit(), - _locator(collection.GetLocator()) - { - while (_locator.IsValid() && !is_a(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const GenericCollection& collection) + // ******************************************************** + : Inherit(), + _locator(collection.getLocator()) + { + while (_locator.IsValid() && !is_a(_locator.getElement())) + _locator.Progress(); + } - public: Locator(const GenericLocator& genericLocator) - // ******************************************************** - : Inherit(), - _locator(genericLocator.GetClone()) - { - while (_locator.IsValid() && !is_a(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const GenericLocator& genericLocator) + // ******************************************************** + : Inherit(), + _locator(genericLocator.getClone()) + { + while (_locator.IsValid() && !is_a(_locator.getElement())) + _locator.Progress(); + } - // Accessors - // ********* + // Accessors + // ********* - public: virtual SubType GetElement() const - // *************************************** - { - return (_locator.IsValid()) ? (SubType)_locator.GetElement() : SubType(); - } + public: virtual SubType getElement() const + // *************************************** + { + return (_locator.IsValid()) ? (SubType)_locator.getElement() : SubType(); + } - public: virtual Hurricane::Locator* GetClone() const - // ********************************************************** - { - return new Locator(_locator); - } + public: virtual Hurricane::Locator* getClone() const + // ********************************************************** + { + return new Locator(_locator); + } - public: virtual Hurricane::Locator* GetLocator() // 21-10-03 - // ************************************************* - { - return dynamic_cast*> ( - _locator.GetLocator()->GetLocator() ); - } + public: virtual Hurricane::Locator* getLocator() // 21-10-03 + // ************************************************* + { + return dynamic_cast*> ( + _locator.getLocator()->getLocator() ); + } - // Predicates - // ********** + // Predicates + // ********** - public: virtual bool IsValid() const - // ********************************* - { - return _locator.IsValid(); - } + public: virtual bool IsValid() const + // ********************************* + { + return _locator.IsValid(); + } - // Updators - // ******** + // Updators + // ******** - public: virtual void Progress() - // **************************** - { - if (_locator.IsValid()) { - do { - _locator.Progress(); - } while (_locator.IsValid() && !is_a(_locator.GetElement())); - } - } + public: virtual void Progress() + // **************************** + { + if (_locator.IsValid()) { + do { + _locator.Progress(); + } while (_locator.IsValid() && !is_a(_locator.getElement())); + } + } - }; + }; // Attributes // ********** - private: GenericCollection _collection; + private: GenericCollection _collection; // Constructors // ************ - public: SubTypeCollection() - // ******************** - : Inherit(), - _collection() - { - } + public: SubTypeCollection() + // ******************** + : Inherit(), + _collection() + { + } - public: SubTypeCollection(const Collection* collection) - // ********************************************************** - : Inherit(), - _collection(collection->GetClone()) - { - } + public: SubTypeCollection(const Collection* collection) + // ********************************************************** + : Inherit(), + _collection(collection->getClone()) + { + } - public: SubTypeCollection(const GenericCollection& collection) - // ***************************************************************** - : Inherit(), - _collection(collection) - { - } + public: SubTypeCollection(const GenericCollection& collection) + // ***************************************************************** + : Inherit(), + _collection(collection) + { + } - public: SubTypeCollection(const SubTypeCollection& subTypeCollection) - // ****************************************************************** - : Inherit(), - _collection(subTypeCollection._collection) - { - } + public: SubTypeCollection(const SubTypeCollection& subTypeCollection) + // ****************************************************************** + : Inherit(), + _collection(subTypeCollection._collection) + { + } // Operators // ********* - public: SubTypeCollection& operator=(const SubTypeCollection& subTypeCollection) - // ***************************************************************************** - { - _collection = subTypeCollection._collection; - return *this; - } + public: SubTypeCollection& operator=(const SubTypeCollection& subTypeCollection) + // ***************************************************************************** + { + _collection = subTypeCollection._collection; + return *this; + } // Accessors // ********* - public: virtual Collection* GetClone() const - // ************************************************** - { - return new SubTypeCollection(_collection); - } + public: virtual Collection* getClone() const + // ************************************************** + { + return new SubTypeCollection(_collection); + } - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************ - { - return new Locator(_collection); - } + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************ + { + return new Locator(_collection); + } // Accessors // ********* - public: virtual string _GetString() const - // ************************************** - { - return "<" + _TName("SubTypeCollection") + " " + GetString(_collection) + ">"; - } + public: virtual string _getString() const + // ************************************** + { + return "<" + _TName("SubTypeCollection") + " " + getString(_collection) + ">"; + } }; @@ -605,177 +605,177 @@ template class SubSetCollection : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // **************************************************** + public: class Locator : public Hurricane::Locator { + // **************************************************** - // Types - // ***** + // Types + // ***** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - // Attributes - // ********** + // Attributes + // ********** - private: GenericLocator _locator; - private: GenericFilter _filter; + private: GenericLocator _locator; + private: GenericFilter _filter; - // Constructors - // ************ + // Constructors + // ************ - public: Locator(const SubSetCollection& collection, const Filter& filter) - // ********************************************************************************** - : Inherit(), - _locator(collection.GetLocator()), - _filter(filter) - { - while (_locator.IsValid() && !_filter.Accept(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const SubSetCollection& collection, const Filter& filter) + // ********************************************************************************** + : Inherit(), + _locator(collection.getLocator()), + _filter(filter) + { + while (_locator.IsValid() && !_filter.Accept(_locator.getElement())) + _locator.Progress(); + } - public: Locator(const Collection& collection, const Filter& filter) - // **************************************************************************** - : Inherit(), - _locator(collection.GetLocator()), - _filter(filter) - { - while (_locator.IsValid() && !_filter.Accept(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const Collection& collection, const Filter& filter) + // **************************************************************************** + : Inherit(), + _locator(collection.getLocator()), + _filter(filter) + { + while (_locator.IsValid() && !_filter.Accept(_locator.getElement())) + _locator.Progress(); + } - public: Locator(const GenericCollection& genericCollection, const Filter& filter) - // ****************************************************************************************** - : Inherit(), - _locator(genericCollection.GetLocator()), - _filter(filter) - { - while (_locator.IsValid() && !_filter.Accept(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const GenericCollection& genericCollection, const Filter& filter) + // ****************************************************************************************** + : Inherit(), + _locator(genericCollection.getLocator()), + _filter(filter) + { + while (_locator.IsValid() && !_filter.Accept(_locator.getElement())) + _locator.Progress(); + } - public: Locator(const GenericLocator& genericLocator, const Filter& filter) - // ************************************************************************************ - : Inherit(), - _locator(genericLocator), - _filter(filter) - { - while (_locator.IsValid() && !_filter.Accept(_locator.GetElement())) - _locator.Progress(); - } + public: Locator(const GenericLocator& genericLocator, const Filter& filter) + // ************************************************************************************ + : Inherit(), + _locator(genericLocator), + _filter(filter) + { + while (_locator.IsValid() && !_filter.Accept(_locator.getElement())) + _locator.Progress(); + } - // Accessors - // ********* + // Accessors + // ********* - public: virtual Type GetElement() const - // ************************************ - { - return (_locator.IsValid()) ? _locator.GetElement() : Type(); - } + public: virtual Type getElement() const + // ************************************ + { + return (_locator.IsValid()) ? _locator.getElement() : Type(); + } - public: virtual Hurricane::Locator* GetClone() const - // ******************************************************* - { - return new Locator(_locator, _filter); - } + public: virtual Hurricane::Locator* getClone() const + // ******************************************************* + { + return new Locator(_locator, _filter); + } - public: virtual Hurricane::Locator* GetLocator() // 21-10-03 - // *************************************************** - { - return ( _locator.GetLocator()->GetLocator() ); - } + public: virtual Hurricane::Locator* getLocator() // 21-10-03 + // *************************************************** + { + return ( _locator.getLocator()->getLocator() ); + } - // Predicates - // ********** + // Predicates + // ********** - public: virtual bool IsValid() const - // ********************************* - { - return _locator.IsValid(); - } + public: virtual bool IsValid() const + // ********************************* + { + return _locator.IsValid(); + } - // Updators - // ******** + // Updators + // ******** - public: virtual void Progress() - // **************************** - { - if (_locator.IsValid()) { - do { - _locator.Progress(); - } while (_locator.IsValid() && !_filter.Accept(_locator.GetElement())); - } - } + public: virtual void Progress() + // **************************** + { + if (_locator.IsValid()) { + do { + _locator.Progress(); + } while (_locator.IsValid() && !_filter.Accept(_locator.getElement())); + } + } - }; + }; // Attributes // ********** - private: GenericCollection _collection; - private: GenericFilter _filter; + private: GenericCollection _collection; + private: GenericFilter _filter; // Constructors // ************ - public: SubSetCollection() - // *********************** - : Inherit(), - _collection(), - _filter() - { - } + public: SubSetCollection() + // *********************** + : Inherit(), + _collection(), + _filter() + { + } - public: SubSetCollection(const Collection& collection, const Filter& filter) - // ************************************************************************************* - : Inherit(), - _collection(collection), - _filter(filter) - { - } + public: SubSetCollection(const Collection& collection, const Filter& filter) + // ************************************************************************************* + : Inherit(), + _collection(collection), + _filter(filter) + { + } - public: SubSetCollection(const SubSetCollection& subSetCollection) - // *************************************************************** - : Inherit(), - _collection(subSetCollection._collection), - _filter(subSetCollection._filter) - { - } + public: SubSetCollection(const SubSetCollection& subSetCollection) + // *************************************************************** + : Inherit(), + _collection(subSetCollection._collection), + _filter(subSetCollection._filter) + { + } // Operators // ********* - public: SubSetCollection& operator=(const SubSetCollection& subSetCollection) - // ************************************************************************** - { - _collection = subSetCollection._collection; - _filter = subSetCollection._filter; - return *this; - } + public: SubSetCollection& operator=(const SubSetCollection& subSetCollection) + // ************************************************************************** + { + _collection = subSetCollection._collection; + _filter = subSetCollection._filter; + return *this; + } // Accessors // ********* - public: virtual Collection* GetClone() const - // *********************************************** - { - return new SubSetCollection(_collection, _filter); - } + public: virtual Collection* getClone() const + // *********************************************** + { + return new SubSetCollection(_collection, _filter); + } - public: virtual Hurricane::Locator* GetLocator() const - // ********************************************************* - { - return new Locator(_collection, _filter); - } + public: virtual Hurricane::Locator* getLocator() const + // ********************************************************* + { + return new Locator(_collection, _filter); + } // Accessors // ********* - public: virtual string _GetString() const - // ************************************** - { - return "<" + _TName("SubSetCollection") + " " + GetString(_collection) + ">"; - } + public: virtual string _getString() const + // ************************************** + { + return "<" + _TName("SubSetCollection") + " " + getString(_collection) + ">"; + } }; @@ -793,24 +793,24 @@ template class SubSetCollection : public Collection { #define end_for\ /**************/\ - }\ - } + }\ + } #define for_each_object(Type, element, collection)\ /*************************************************/\ {\ - GenericLocator _locator = collection.GetLocator();\ - while (_locator.IsValid()) {\ - Type element = _locator.GetElement();\ - _locator.Progress(); + GenericLocator _locator = collection.getLocator();\ + while (_locator.IsValid()) {\ + Type element = _locator.getElement();\ + _locator.Progress(); #define for_each_element(Type, element, collection)\ /*************************************************/\ {\ - ElementCollection::Locator* _locator = collection.GetLocator();\ - while (_locator->IsValid()) {\ - Type element = _locator->GetElement();\ - _locator->Progress(); + ElementCollection::Locator* _locator = collection.getLocator();\ + while (_locator->IsValid()) {\ + Type element = _locator->getElement();\ + _locator->Progress(); template diff --git a/hurricane/src/hurricane/Commons.h b/hurricane/src/hurricane/Commons.h index f2833124..5930ea53 100644 --- a/hurricane/src/hurricane/Commons.h +++ b/hurricane/src/hurricane/Commons.h @@ -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. diff --git a/hurricane/src/hurricane/Component.cpp b/hurricane/src/hurricane/Component.cpp index 4563da90..efaaef3a 100644 --- a/hurricane/src/hurricane/Component.cpp +++ b/hurricane/src/hurricane/Component.cpp @@ -23,44 +23,44 @@ namespace Hurricane { class Component_IsUnderFilter : public Filter { // ****************************************************** - public: Box _area; + public: Box _area; - public: Component_IsUnderFilter(const Box& area) - // ********************************************* - : _area(area) - { - }; + public: Component_IsUnderFilter(const Box& area) + // ********************************************* + : _area(area) + { + }; - public: Component_IsUnderFilter(const Component_IsUnderFilter& filter) - // ******************************************************************* - : _area(filter._area) - { - }; + public: Component_IsUnderFilter(const Component_IsUnderFilter& filter) + // ******************************************************************* + : _area(filter._area) + { + }; - public: Component_IsUnderFilter& operator=(const Component_IsUnderFilter& filter) - // ****************************************************************************** - { - _area = filter._area; - return *this; - }; + public: Component_IsUnderFilter& operator=(const Component_IsUnderFilter& filter) + // ****************************************************************************** + { + _area = filter._area; + return *this; + }; - public: virtual Filter* GetClone() const - // ************************************************* - { - return new Component_IsUnderFilter(*this); - }; + public: virtual Filter* getClone() const + // ************************************************* + { + return new Component_IsUnderFilter(*this); + }; - public: virtual bool Accept(Component* component) const - // **************************************************** - { - return _area.intersect(component->GetBoundingBox()); - }; + public: virtual bool Accept(Component* component) const + // **************************************************** + { + return _area.intersect(component->getBoundingBox()); + }; - public: virtual string _GetString() const - // ************************************** - { - return "<" + _TName("Component::IsUnderFilter") + " " + GetString(_area) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + return "<" + _TName("Component::IsUnderFilter") + " " + getString(_area) + ">"; + }; }; @@ -76,58 +76,58 @@ class Component_Hooks : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ***************************************************** + public: class Locator : public Hurricane::Locator { + // ***************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Component* _component; - private: Hook* _hook; + private: const Component* _component; + private: Hook* _hook; - public: Locator(const Component* component = NULL); - public: Locator(const Locator& locator); + public: Locator(const Component* component = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Hook* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Hook* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Component* _component; + private: const Component* _component; // Constructors // ************ - public: Component_Hooks(const Component* component = NULL); - public: Component_Hooks(const Component_Hooks& hooks); + public: Component_Hooks(const Component* component = NULL); + public: Component_Hooks(const Component_Hooks& hooks); // Operators // ********* - public: Component_Hooks& operator=(const Component_Hooks& hooks); + public: Component_Hooks& operator=(const Component_Hooks& hooks); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -143,59 +143,59 @@ class Component_ConnexComponents : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ********************************************************** + public: class Locator : public Hurricane::Locator { + // ********************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Component* _component; - private: set _componentSet; - private: stack _componentStack; + private: const Component* _component; + private: set _componentSet; + private: stack _componentStack; - public: Locator(const Component* component = NULL); - public: Locator(const Locator& locator); + public: Locator(const Component* component = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Component* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Component* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Component* _component; + private: const Component* _component; // Constructors // ************ - public: Component_ConnexComponents(const Component* component = NULL); - public: Component_ConnexComponents(const Component_ConnexComponents& connexComponents); + public: Component_ConnexComponents(const Component* component = NULL); + public: Component_ConnexComponents(const Component_ConnexComponents& connexComponents); // Operators // ********* - public: Component_ConnexComponents& operator=(const Component_ConnexComponents& connexComponents); + public: Component_ConnexComponents& operator=(const Component_ConnexComponents& connexComponents); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -211,59 +211,59 @@ class Component_SlaveComponents : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ********************************************************** + public: class Locator : public Hurricane::Locator { + // ********************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Component* _component; - private: set _componentSet; - private: stack _componentStack; + private: const Component* _component; + private: set _componentSet; + private: stack _componentStack; - public: Locator(const Component* component = NULL); - public: Locator(const Locator& locator); + public: Locator(const Component* component = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Component* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Component* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; // Attributes // ********** - private: const Component* _component; + private: const Component* _component; // Constructors // ************ - public: Component_SlaveComponents(const Component* component = NULL); - public: Component_SlaveComponents(const Component_SlaveComponents& slaveComponents); + public: Component_SlaveComponents(const Component* component = NULL); + public: Component_SlaveComponents(const Component_SlaveComponents& slaveComponents); // Operators // ********* - public: Component_SlaveComponents& operator=(const Component_SlaveComponents& slaveComponents); + public: Component_SlaveComponents& operator=(const Component_SlaveComponents& slaveComponents); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -274,44 +274,44 @@ class Component_SlaveComponents : public Collection { Component::Component(Net* net, bool inPlugCreate) // ********************************************** -: Inherit(), - _net(net), - _rubber(NULL), - _bodyHook(this), - _nextOfNetComponentSet(NULL) +: Inherit(), + _net(net), + _rubber(NULL), + _bodyHook(this), + _nextOfNetComponentSet(NULL) { - if (!inPlugCreate && !_net) - throw Error("Can't create " + _TName("Component") + " : null net"); + if (!inPlugCreate && !_net) + 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); + return Component_Hooks(this); } -Components Component::GetConnexComponents() const +Components Component::getConnexComponents() const // ********************************************** { - return Component_ConnexComponents(this); + return Component_ConnexComponents(this); } -Components Component::GetSlaveComponents() const +Components Component::getSlaveComponents() const // ********************************************* { - return Component_SlaveComponents(this); + return Component_SlaveComponents(this); } -ComponentFilter Component::GetIsUnderFilter(const Box& area) +ComponentFilter Component::getIsUnderFilter(const Box& area) // ********************************************************* { - return Component_IsUnderFilter(area); + return Component_IsUnderFilter(area); } void Component::Materialize() @@ -319,19 +319,19 @@ void Component::Materialize() { // trace << "Materialize() - " << this << endl; - if (!IsMaterialized()) { - Cell* cell = GetCell(); - Layer* layer = GetLayer(); + if (!IsMaterialized()) { + 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; } - } + } } void Component::Unmaterialize() @@ -339,58 +339,58 @@ void Component::Unmaterialize() { // trace << "Unmaterializing " << this << endl; - if (IsMaterialized()) { - Cell* cell = GetCell(); - Slice* slice = cell->GetSlice(GetLayer()); - if (slice) { - cell->_Unfit(GetBoundingBox()); - slice->_GetQuadTree()->Remove(this); - if (slice->IsEmpty()) slice->_Delete(); - } - } + if (IsMaterialized()) { + Cell* cell = getCell(); + Slice* slice = cell->getSlice(getLayer()); + if (slice) { + cell->_Unfit(getBoundingBox()); + slice->_getQuadTree()->Remove(this); + if (slice->IsEmpty()) slice->_destroy(); + } + } } void Component::Invalidate(bool propagateFlag) // ******************************************* { - Inherit::Invalidate(false); + Inherit::Invalidate(false); - if (propagateFlag) { - Rubber* rubber = GetRubber(); - if (rubber) rubber->Invalidate(); - for_each_component(component, GetSlaveComponents()) { - component->Invalidate(false); - end_for; - } - } + if (propagateFlag) { + Rubber* rubber = getRubber(); + if (rubber) rubber->Invalidate(); + 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 componentSet; - GetSlaveComponents().Fill(componentSet); + getSlaveComponents().Fill(componentSet); set 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 rubberSet; set 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,79 +432,79 @@ 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(); - if (!_net) - s.insert(s.length() - 1, " UNCONNECTED"); - else - s.insert(s.length() - 1, " " + GetString(_net->GetName())); - return s; + string s = Inherit::_getString(); + if (!_net) + s.insert(s.length() - 1, " UNCONNECTED"); + else + s.insert(s.length() - 1, " " + getString(_net->getName())); + return s; } -Record* Component::_GetRecord() const +Record* Component::_getRecord() const // **************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Net", _net)); - record->Add(GetSlot("Rubber", _rubber)); - record->Add(GetSlot("BodyHook", &_bodyHook)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Net", _net)); + record->Add(getSlot("Rubber", _rubber)); + record->Add(getSlot("BodyHook", &_bodyHook)); + } + return record; } void Component::_SetNet(Net* net) // ****************************** { - if (net != _net) { - if (_net) _net->_GetComponentSet()._Remove(this); - _net = net; - if (_net) _net->_GetComponentSet()._Insert(this); - } + if (net != _net) { + if (_net) _net->_getComponentSet()._Remove(this); + _net = net; + if (_net) _net->_getComponentSet()._Insert(this); + } } void Component::_SetRubber(Rubber* rubber) // *************************************** { - if (rubber != _rubber) { - if (_rubber) _rubber->_Release(); - _rubber = rubber; - if (_rubber) _rubber->_Capture(); - } + if (rubber != _rubber) { + if (_rubber) _rubber->_Release(); + _rubber = rubber; + if (_rubber) _rubber->_Capture(); + } } //bool Component::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const //// ***************************************************************************************** //{ -// Box area(point); -// area.Inflate(aperture); -// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) { -// if (view->IsVisible(basicLayer) && GetBoundingBox(basicLayer).intersect(area)) -// return true; -// end_for; -// } +// Box area(point); +// area.Inflate(aperture); +// for_each_basic_layer(basicLayer, getLayer()->getBasicLayers()) { +// if (view->IsVisible(basicLayer) && getBoundingBox(basicLayer).intersect(area)) +// return true; +// end_for; +// } // -// return false; +// return false; //} // //void Component::_Highlight(View* view, const Box& updateArea, const Transformation& transformation) //// ************************************************************************************************ //{ -// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) { -// _Draw(view, basicLayer, updateArea, transformation); -// end_for; -// } +// for_each_basic_layer(basicLayer, getLayer()->getBasicLayers()) { +// _Draw(view, basicLayer, updateArea, transformation); +// end_for; +// } //} // @@ -516,25 +516,25 @@ static int BODY_HOOK_OFFSET = -1; Component::BodyHook::BodyHook(Component* component) // ************************************************ -: Inherit() +: Inherit() { - if (!component) - throw Error("Can't create " + _TName("Component::BodyHook") + " : null component"); + if (!component) + throw Error("Can't create " + _TName("Component::BodyHook") + " : null component"); - if (BODY_HOOK_OFFSET == -1) - BODY_HOOK_OFFSET = (unsigned long)this - (unsigned long)component; + if (BODY_HOOK_OFFSET == -1) + 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); + 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()) + ">"; } // **************************************************************************************************** @@ -543,44 +543,44 @@ string Component::BodyHook::_GetString() const Component_Hooks::Component_Hooks(const Component* component) // ********************************************************* -: Inherit(), - _component(component) +: Inherit(), + _component(component) { } Component_Hooks::Component_Hooks(const Component_Hooks& hooks) // *********************************************************** -: Inherit(), - _component(hooks._component) +: Inherit(), + _component(hooks._component) { } Component_Hooks& Component_Hooks::operator=(const Component_Hooks& hooks) // ********************************************************************** { - _component = hooks._component; - return *this; + _component = hooks._component; + return *this; } -Collection* Component_Hooks::GetClone() const +Collection* Component_Hooks::getClone() const // ************************************************* { - return new Component_Hooks(*this); + return new Component_Hooks(*this); } -Locator* Component_Hooks::GetLocator() const +Locator* Component_Hooks::getLocator() const // ************************************************ { - return new Locator(_component); + return new Locator(_component); } -string Component_Hooks::_GetString() const +string Component_Hooks::_getString() const // *************************************** { - string s = "<" + _TName("Component::Hooks"); - if (_component) s += " " + GetString(_component); - s += ">"; - return s; + string s = "<" + _TName("Component::Hooks"); + if (_component) s += " " + getString(_component); + s += ">"; + return s; } @@ -591,60 +591,60 @@ string Component_Hooks::_GetString() const Component_Hooks::Locator::Locator(const Component* component) // ********************************************************** -: Inherit(), - _component(component), - _hook(NULL) +: Inherit(), + _component(component), + _hook(NULL) { - if (_component) _hook = ((Component*)_component)->GetBodyHook(); + if (_component) _hook = ((Component*)_component)->getBodyHook(); } Component_Hooks::Locator::Locator(const Locator& locator) // ****************************************************** -: Inherit(), - _component(locator._component), - _hook(locator._hook) +: Inherit(), + _component(locator._component), + _hook(locator._hook) { } Component_Hooks::Locator& Component_Hooks::Locator::operator=(const Locator& locator) // ********************************************************************************** { - _component = locator._component; - _hook = locator._hook; - return *this; + _component = locator._component; + _hook = locator._hook; + return *this; } -Hook* Component_Hooks::Locator::GetElement() const +Hook* Component_Hooks::Locator::getElement() const // *********************************************** { - return _hook; + return _hook; } -Locator* Component_Hooks::Locator::GetClone() const +Locator* Component_Hooks::Locator::getClone() const // ******************************************************* { - return new Locator(*this); + return new Locator(*this); } bool Component_Hooks::Locator::IsValid() const // ******************************************* { - return (_hook != NULL); + return (_hook != NULL); } void Component_Hooks::Locator::Progress() // ************************************** { - _hook = NULL; + _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); - s += ">"; - return s; + string s = "<" + _TName("Component::Hooks::Locator"); + if (_component) s += " " + getString(_component); + s += ">"; + return s; } @@ -655,45 +655,45 @@ string Component_Hooks::Locator::_GetString() const Component_ConnexComponents::Component_ConnexComponents(const Component* component) // ******************************************************************************* -: Inherit(), - _component(component) +: Inherit(), + _component(component) { } Component_ConnexComponents::Component_ConnexComponents(const Component_ConnexComponents& connexComponents) // **************************************************************************************************** -: Inherit(), - _component(connexComponents._component) +: Inherit(), + _component(connexComponents._component) { } Component_ConnexComponents& - Component_ConnexComponents::operator=(const Component_ConnexComponents& connexComponents) + Component_ConnexComponents::operator=(const Component_ConnexComponents& connexComponents) // ***************************************************************************************** { - _component = connexComponents._component; - return *this; + _component = connexComponents._component; + return *this; } -Collection* Component_ConnexComponents::GetClone() const +Collection* Component_ConnexComponents::getClone() const // ***************************************************************** { - return new Component_ConnexComponents(*this); + return new Component_ConnexComponents(*this); } -Locator* Component_ConnexComponents::GetLocator() const +Locator* Component_ConnexComponents::getLocator() const // **************************************************************** { - return new Locator(_component); + return new Locator(_component); } -string Component_ConnexComponents::_GetString() const +string Component_ConnexComponents::_getString() const // ************************************************** { - string s = "<" + _TName("Component::ConnexComponents"); - if (_component) s += " " + GetString(_component); - s += ">"; - return s; + string s = "<" + _TName("Component::ConnexComponents"); + if (_component) s += " " + getString(_component); + s += ">"; + return s; } @@ -704,88 +704,88 @@ string Component_ConnexComponents::_GetString() const Component_ConnexComponents::Locator::Locator(const Component* component) // ********************************************************************* -: Inherit(), - _component(component), - _componentSet(), - _componentStack() +: Inherit(), + _component(component), + _componentSet(), + _componentStack() { - if (_component) { - _componentSet.insert((Component*)_component); - _componentStack.push((Component*)_component); - } + if (_component) { + _componentSet.insert((Component*)_component); + _componentStack.push((Component*)_component); + } } Component_ConnexComponents::Locator::Locator(const Locator& locator) // ***************************************************************** -: Inherit(), - _component(locator._component), - _componentSet(locator._componentSet), - _componentStack(locator._componentStack) +: Inherit(), + _component(locator._component), + _componentSet(locator._componentSet), + _componentStack(locator._componentStack) { } Component_ConnexComponents::Locator& Component_ConnexComponents::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _component = locator._component; - _componentSet = locator._componentSet; - _componentStack = locator._componentStack; - return *this; + _component = locator._component; + _componentSet = locator._componentSet; + _componentStack = locator._componentStack; + return *this; } -Component* Component_ConnexComponents::Locator::GetElement() const +Component* Component_ConnexComponents::Locator::getElement() const // *************************************************************** { - return _componentStack.top(); + return _componentStack.top(); } -Locator* Component_ConnexComponents::Locator::GetClone() const +Locator* Component_ConnexComponents::Locator::getClone() const // *********************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Component_ConnexComponents::Locator::IsValid() const // ****************************************************** { - return !_componentStack.empty(); + return !_componentStack.empty(); } void Component_ConnexComponents::Locator::Progress() // ************************************************* { - if (!_componentStack.empty()) { - Component* component = _componentStack.top(); - _componentStack.pop(); - for_each_hook(componentHook, component->GetHooks()) { - Hook* masterHook = componentHook->GetMasterHook(); - if (masterHook) { - 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(); - if (_componentSet.find(component) == _componentSet.end()) { - _componentSet.insert(component); - _componentStack.push(component); - } - } - end_for; - } - } + if (!_componentStack.empty()) { + Component* component = _componentStack.top(); + _componentStack.pop(); + for_each_hook(componentHook, component->getHooks()) { + Hook* masterHook = componentHook->getMasterHook(); + if (masterHook) { + 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(); + if (_componentSet.find(component) == _componentSet.end()) { + _componentSet.insert(component); + _componentStack.push(component); + } + } + end_for; + } + } } -string Component_ConnexComponents::Locator::_GetString() const +string Component_ConnexComponents::Locator::_getString() const // *********************************************************** { - string s = "<" + _TName("Component::ConnexComponents::Locator"); - if (_component) s += " " + GetString(_component); - s += ">"; - return s; + string s = "<" + _TName("Component::ConnexComponents::Locator"); + if (_component) s += " " + getString(_component); + s += ">"; + return s; } @@ -796,45 +796,45 @@ string Component_ConnexComponents::Locator::_GetString() const Component_SlaveComponents::Component_SlaveComponents(const Component* component) // ***************************************************************************** -: Inherit(), - _component(component) +: Inherit(), + _component(component) { } Component_SlaveComponents::Component_SlaveComponents(const Component_SlaveComponents& slaveComponents) // *************************************************************************************************** -: Inherit(), - _component(slaveComponents._component) +: Inherit(), + _component(slaveComponents._component) { } Component_SlaveComponents& - Component_SlaveComponents::operator=(const Component_SlaveComponents& slaveComponents) + Component_SlaveComponents::operator=(const Component_SlaveComponents& slaveComponents) // ************************************************************************************** { - _component = slaveComponents._component; - return *this; + _component = slaveComponents._component; + return *this; } -Collection* Component_SlaveComponents::GetClone() const +Collection* Component_SlaveComponents::getClone() const // **************************************************************** { - return new Component_SlaveComponents(*this); + return new Component_SlaveComponents(*this); } -Locator* Component_SlaveComponents::GetLocator() const +Locator* Component_SlaveComponents::getLocator() const // *************************************************************** { - return new Locator(_component); + return new Locator(_component); } -string Component_SlaveComponents::_GetString() const +string Component_SlaveComponents::_getString() const // ************************************************* { - string s = "<" + _TName("Component::SlaveComponents"); - if (_component) s += " " + GetString(_component); - s += ">"; - return s; + string s = "<" + _TName("Component::SlaveComponents"); + if (_component) s += " " + getString(_component); + s += ">"; + return s; } @@ -845,95 +845,95 @@ string Component_SlaveComponents::_GetString() const Component_SlaveComponents::Locator::Locator(const Component* component) // ******************************************************************** -: Inherit(), - _component(component), - _componentSet(), - _componentStack() +: Inherit(), + _component(component), + _componentSet(), + _componentStack() { - if (_component) { - _componentSet.insert((Component*)_component); - 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); - } - end_for; - } - } + if (_component) { + _componentSet.insert((Component*)_component); + 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); + } + end_for; + } + } } Component_SlaveComponents::Locator::Locator(const Locator& locator) // **************************************************************** -: Inherit(), - _component(locator._component), - _componentSet(locator._componentSet), - _componentStack(locator._componentStack) +: Inherit(), + _component(locator._component), + _componentSet(locator._componentSet), + _componentStack(locator._componentStack) { } Component_SlaveComponents::Locator& - Component_SlaveComponents::Locator::operator=(const Locator& locator) + Component_SlaveComponents::Locator::operator=(const Locator& locator) // ********************************************************************* { - _component = locator._component; - _componentSet = locator._componentSet; - _componentStack = locator._componentStack; - return *this; + _component = locator._component; + _componentSet = locator._componentSet; + _componentStack = locator._componentStack; + return *this; } -Component* Component_SlaveComponents::Locator::GetElement() const +Component* Component_SlaveComponents::Locator::getElement() const // ************************************************************** { - return _componentStack.top(); + return _componentStack.top(); } -Locator* Component_SlaveComponents::Locator::GetClone() const +Locator* Component_SlaveComponents::Locator::getClone() const // ********************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Component_SlaveComponents::Locator::IsValid() const // ***************************************************** { - return !_componentStack.empty(); + return !_componentStack.empty(); } 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(); - if (_componentSet.find(component) == _componentSet.end()) { - _componentSet.insert(component); - _componentStack.push(component); - } - end_for; - } - } + if (!_componentStack.empty()) { + Component* component = _componentStack.top(); + _componentStack.pop(); + 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); + } + end_for; + } + } } -string Component_SlaveComponents::Locator::_GetString() const +string Component_SlaveComponents::Locator::_getString() const // ********************************************************** { - string s = "<" + _TName("Component::SlaveComponents::Locator"); - if (_component) s += " " + GetString(_component); - s += ">"; - return s; + string s = "<" + _TName("Component::SlaveComponents::Locator"); + 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()); } diff --git a/hurricane/src/hurricane/Component.h b/hurricane/src/hurricane/Component.h index 3d14515f..6fc1b76d 100644 --- a/hurricane/src/hurricane/Component.h +++ b/hurricane/src/hurricane/Component.h @@ -31,91 +31,88 @@ class Component : public Go { // Types // ***** - public: typedef Go Inherit; + public: typedef Go Inherit; - public: class BodyHook : public Hook { - // ********************************* + public: class BodyHook : public Hook { + // ********************************* - friend class Component; + friend class Component; - public: typedef Hook Inherit; + public: typedef Hook Inherit; - private: BodyHook(Component* component); + private: BodyHook(Component* component); - public: virtual Component* GetComponent() const; + public: virtual Component* getComponent() const; - public: virtual bool IsMaster() const {return true;}; + 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; - }; + }; // Attributes // ********** - private: Net* _net; - private: Rubber* _rubber; - private: BodyHook _bodyHook; - private: Component* _nextOfNetComponentSet; + private: Net* _net; + private: Rubber* _rubber; + private: BodyHook _bodyHook; + private: Component* _nextOfNetComponentSet; // Constructors // ************ - protected: Component(Net* net, bool inPlugCreate = false); + protected: Component(Net* net, bool inPlugCreate = false); // 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 // ******** - public: virtual void Materialize(); - public: virtual void Unmaterialize(); - public: virtual void Invalidate(bool propagateFlag = true); + public: virtual void Materialize(); + public: virtual void Unmaterialize(); + public: virtual void Invalidate(bool propagateFlag = true); // 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); + public: void _SetNet(Net* net); + public: void _SetRubber(Rubber* rubber); + public: void _SetNextOfNetComponentSet(Component* component) {_nextOfNetComponentSet = component;}; }; -double GetArea ( Component* component ); +double getArea ( Component* component ); diff --git a/hurricane/src/hurricane/Components.h b/hurricane/src/hurricane/Components.h index 4f386933..47faa7e8 100644 --- a/hurricane/src/hurricane/Components.h +++ b/hurricane/src/hurricane/Components.h @@ -46,10 +46,10 @@ typedef GenericFilter ComponentFilter; #define for_each_component(component, components)\ /************************************************/\ {\ - ComponentLocator _locator = components.GetLocator();\ - while (_locator.IsValid()) {\ - Component* component = _locator.GetElement();\ - _locator.Progress(); + ComponentLocator _locator = components.getLocator();\ + while (_locator.IsValid()) {\ + Component* component = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/CompositeLayer.cpp b/hurricane/src/hurricane/CompositeLayer.cpp index eb5f2fb2..a6850d55 100644 --- a/hurricane/src/hurricane/CompositeLayer.cpp +++ b/hurricane/src/hurricane/CompositeLayer.cpp @@ -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; } diff --git a/hurricane/src/hurricane/CompositeLayer.h b/hurricane/src/hurricane/CompositeLayer.h index b34575e8..5e0f9b63 100644 --- a/hurricane/src/hurricane/CompositeLayer.h +++ b/hurricane/src/hurricane/CompositeLayer.h @@ -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;}; diff --git a/hurricane/src/hurricane/CompositeLayers.h b/hurricane/src/hurricane/CompositeLayers.h index 25dd7a63..ca3eacde 100644 --- a/hurricane/src/hurricane/CompositeLayers.h +++ b/hurricane/src/hurricane/CompositeLayers.h @@ -46,10 +46,10 @@ typedef GenericFilter CompositeLayerFilter; #define for_each_composite_layer(compositeLayer, compositeLayers)\ /****************************************************************/\ {\ - CompositeLayerLocator _locator = compositeLayers.GetLocator();\ - while (_locator.IsValid()) {\ - CompositeLayer* compositeLayer = _locator.GetElement();\ - _locator.Progress(); + CompositeLayerLocator _locator = compositeLayers.getLocator();\ + while (_locator.IsValid()) {\ + CompositeLayer* compositeLayer = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Contact.cpp b/hurricane/src/hurricane/Contact.cpp index 6f7d5d9a..7f02dcac 100644 --- a/hurricane/src/hurricane/Contact.cpp +++ b/hurricane/src/hurricane/Contact.cpp @@ -25,58 +25,58 @@ class Contact_Hooks : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ***************************************************** + public: class Locator : public Hurricane::Locator { + // ***************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Contact* _contact; - private: Hook* _hook; + private: const Contact* _contact; + private: Hook* _hook; - public: Locator(const Contact* contact = NULL); - public: Locator(const Locator& locator); + public: Locator(const Contact* contact = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Hook* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Hook* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Contact* _contact; + private: const Contact* _contact; // Constructors // ************ - public: Contact_Hooks(const Contact* contact = NULL); - public: Contact_Hooks(const Contact_Hooks& hooks); + public: Contact_Hooks(const Contact* contact = NULL); + public: Contact_Hooks(const Contact_Hooks& hooks); // Operators // ********* - public: Contact_Hooks& operator=(const Contact_Hooks& hooks); + public: Contact_Hooks& operator=(const Contact_Hooks& hooks); // Accessors // ********^ - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -89,284 +89,284 @@ class Contact_Hooks : public Collection { Contact::Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height) // **************************************************************************************************** : Inherit(net), - _anchorHook(this), - _layer(layer), - _dx(x), - _dy(y), - _width(width), - _height(height) + _anchorHook(this), + _layer(layer), + _dx(x), + _dy(y), + _width(width), + _height(height) { - if (!_layer) - throw Error("Can't create " + _TName("Contact") + " : null layer"); + if (!_layer) + throw Error("Can't create " + _TName("Contact") + " : null layer"); } Contact::Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height) // **************************************************************************************************** : Inherit(net), - _anchorHook(this), - _layer(layer), - _dx(dx), - _dy(dy), - _width(width), - _height(height) + _anchorHook(this), + _layer(layer), + _dx(dx), + _dy(dy), + _width(width), + _height(height) { - if (!anchor) - throw Error("Can't create " + _TName("Contact") + " : null anchor"); + if (!anchor) + throw Error("Can't create " + _TName("Contact") + " : null anchor"); - if (!anchor->GetNet()) - throw Error("Can't create " + _TName("Contact") + " : unconnected anchor"); + if (!anchor->getNet()) + throw Error("Can't create " + _TName("Contact") + " : unconnected anchor"); - if (anchor->GetNet() != GetNet()) - throw Error("Can't create " + _TName("Contact") + " : incompatible anchor"); + if (anchor->getNet() != getNet()) + throw Error("Can't create " + _TName("Contact") + " : incompatible anchor"); - if (!_layer) - throw Error("Can't create " + _TName("Contact") + " : null layer"); + 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) // **************************************************************************************************** { - Contact* contact = new Contact(net, layer, x, y, width, height); + Contact* contact = new Contact(net, layer, x, y, width, height); - contact->_PostCreate(); + contact->_postCreate(); - return contact; + return contact; } Contact* Contact::Create(Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height) // **************************************************************************************************** { - if (!anchor) - throw Error("Can't create " + _TName("Contact") + " : null anchor"); + 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; + return contact; } -Hooks Contact::GetHooks() const +Hooks Contact::getHooks() const // **************************** { - return Contact_Hooks(this); + 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(); + 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) // **************************************************** { - if ((dx != 0) || (dy != 0)) { - Invalidate(true); - _dx += dx; - _dy += dy; - } + if ((dx != 0) || (dy != 0)) { + Invalidate(true); + _dx += dx; + _dy += dy; + } } void Contact::SetLayer(Layer* layer) // ********************************* { - if (!layer) - throw Error("Can't set layer : null layer"); + if (!layer) + throw Error("Can't set layer : null layer"); - if (layer != _layer) { - Invalidate(false); - _layer = layer; - } + if (layer != _layer) { + Invalidate(false); + _layer = layer; + } } void Contact::SetWidth(const Unit& width) // ************************************** { - if (width != _width) { - Invalidate(false); - _width = width; - } + if (width != _width) { + Invalidate(false); + _width = width; + } } void Contact::SetHeight(const Unit& height) // **************************************** { - if (height != _height) { - Invalidate(false); - _height = height; - } + if (height != _height) { + Invalidate(false); + _height = height; + } } void Contact::SetSizes(const Unit& width, const Unit& height) // ********************************************************** { - if ((width != _width) || (height != _height)) { - Invalidate(false); - _width = width; - _height = height; - } + if ((width != _width) || (height != _height)) { + Invalidate(false); + _width = width; + _height = 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(); - if (!anchor) - SetOffset(x, y); - else - SetOffset(x - anchor->GetX(), y - anchor->GetY()); + Component* anchor = getAnchor(); + if (!anchor) + SetOffset(x, y); + else + SetOffset(x - anchor->getX(), y - anchor->getY()); } void Contact::SetPosition(const Point& position) // ********************************************* { - SetPosition(position.getX(), position.getY()); + SetPosition(position.getX(), position.getY()); } void Contact::SetDx(const Unit& dx) // ******************************** { - SetOffset(dx, _dy); + SetOffset(dx, _dy); } void Contact::SetDy(const Unit& dy) // ******************************** { - SetOffset(_dx, dy); + SetOffset(_dx, dy); } void Contact::SetOffset(const Unit& dx, const Unit& dy) // **************************************************** { - if ((dx != _dx) || (dy != _dy)) { - Invalidate(true); - _dx = dx; - _dy = dy; - } + if ((dx != _dx) || (dy != _dy)) { + Invalidate(true); + _dx = dx; + _dy = 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(); + _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)); - return s; + 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(); - 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)); - } - return record; + 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)); + } + return record; } -Unit Contact::_GetSize() const +Unit Contact::_getSize() const // *************************** { - Unit size = 0; + Unit size = 0; - Layer* layer = GetLayer(); - if (is_a(layer)) - size = ((CompositeLayer*)layer)->getMaximalContactSize(); + Layer* layer = getLayer(); + if (is_a(layer)) + size = ((CompositeLayer*)layer)->getMaximalContactSize(); - return size; + 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; + if (!layer->contains(basicLayer)) return 0; - Unit size = 0; + Unit size = 0; - if (is_a(layer)) - size = ((CompositeLayer*)layer)->getContactSize(basicLayer); + if (is_a(layer)) + size = ((CompositeLayer*)layer)->getContactSize(basicLayer); - return size; + return size; } // **************************************************************************************************** @@ -377,25 +377,25 @@ static int ANCHOR_HOOK_OFFSET = -1; Contact::AnchorHook::AnchorHook(Contact* contact) // ********************************************** -: Inherit() +: Inherit() { - if (!contact) - throw Error("Can't create " + _TName("Contact::AnchorHook") + " : null contact"); + if (!contact) + throw Error("Can't create " + _TName("Contact::AnchorHook") + " : null contact"); - if (ANCHOR_HOOK_OFFSET == -1) - ANCHOR_HOOK_OFFSET = (unsigned long)this - (unsigned long)contact; + if (ANCHOR_HOOK_OFFSET == -1) + 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); + 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()) + ">"; } @@ -406,44 +406,44 @@ string Contact::AnchorHook::_GetString() const Contact_Hooks::Contact_Hooks(const Contact* contact) // ************************************************* -: Inherit(), - _contact(contact) +: Inherit(), + _contact(contact) { } Contact_Hooks::Contact_Hooks(const Contact_Hooks& hooks) // ***************************************************** -: Inherit(), - _contact(hooks._contact) +: Inherit(), + _contact(hooks._contact) { } Contact_Hooks& Contact_Hooks::operator=(const Contact_Hooks& hooks) // **************************************************************** { - _contact = hooks._contact; - return *this; + _contact = hooks._contact; + return *this; } -Collection* Contact_Hooks::GetClone() const +Collection* Contact_Hooks::getClone() const // *********************************************** { - return new Contact_Hooks(*this); + return new Contact_Hooks(*this); } -Locator* Contact_Hooks::GetLocator() const +Locator* Contact_Hooks::getLocator() const // ********************************************** { - return new Locator(_contact); + return new Locator(_contact); } -string Contact_Hooks::_GetString() const +string Contact_Hooks::_getString() const // ************************************* { - string s = "<" + _TName("Contact::Hooks"); - if (_contact) s += " " + GetString(_contact); - s += ">"; - return s; + string s = "<" + _TName("Contact::Hooks"); + if (_contact) s += " " + getString(_contact); + s += ">"; + return s; } @@ -454,65 +454,65 @@ string Contact_Hooks::_GetString() const Contact_Hooks::Locator::Locator(const Contact* contact) // **************************************************** -: Inherit(), - _contact(contact), - _hook(NULL) +: Inherit(), + _contact(contact), + _hook(NULL) { - if (_contact) _hook = ((Contact*)_contact)->GetBodyHook(); + if (_contact) _hook = ((Contact*)_contact)->getBodyHook(); } Contact_Hooks::Locator::Locator(const Locator& locator) // **************************************************** -: Inherit(), - _contact(locator._contact), - _hook(locator._hook) +: Inherit(), + _contact(locator._contact), + _hook(locator._hook) { } Contact_Hooks::Locator& Contact_Hooks::Locator::operator=(const Locator& locator) // ****************************************************************************** { - _contact = locator._contact; - _hook = locator._hook; - return *this; + _contact = locator._contact; + _hook = locator._hook; + return *this; } -Hook* Contact_Hooks::Locator::GetElement() const +Hook* Contact_Hooks::Locator::getElement() const // ********************************************* { - return _hook; + return _hook; } -Locator* Contact_Hooks::Locator::GetClone() const +Locator* Contact_Hooks::Locator::getClone() const // ***************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Contact_Hooks::Locator::IsValid() const // ***************************************** { - return (_hook != NULL); + return (_hook != NULL); } void Contact_Hooks::Locator::Progress() // ************************************ { - if (_hook) { - if (_hook == ((Contact*)_contact)->GetBodyHook()) - _hook = ((Contact*)_contact)->GetAnchorHook(); - else - _hook = NULL; - } + if (_hook) { + 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); - s += ">"; - return s; + string s = "<" + _TName("Contact::Hooks::Locator"); + if (_contact) s += " " + getString(_contact); + s += ">"; + return s; } } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/Contact.h b/hurricane/src/hurricane/Contact.h index d07446f9..a4489f42 100644 --- a/hurricane/src/hurricane/Contact.h +++ b/hurricane/src/hurricane/Contact.h @@ -24,94 +24,91 @@ class Contact : public Component { // Types // ***** - public: typedef Component Inherit; + public: typedef Component Inherit; - public: class AnchorHook : public Hook { - // *********************************** + public: class AnchorHook : public Hook { + // *********************************** - friend class Contact; + friend class Contact; - public: typedef Hook Inherit; + public: typedef Hook Inherit; - private: AnchorHook(Contact* contact); + private: AnchorHook(Contact* contact); - public: virtual Component* GetComponent() const; + public: virtual Component* getComponent() const; - public: virtual bool IsMaster() const {return false;}; + 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 // ********** - private: AnchorHook _anchorHook; - private: Layer* _layer; - private: Unit _dx; - private: Unit _dy; - protected: Unit _width; - protected: Unit _height; + private: AnchorHook _anchorHook; + private: Layer* _layer; + private: Unit _dx; + private: Unit _dy; + protected: Unit _width; + protected: Unit _height; // Constructors // ************ - protected: Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); - protected: Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0); + protected: Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); + protected: Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0); - public: static Contact* Create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); - public: static Contact* Create(Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0); + public: static Contact* Create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); + public: static Contact* Create(Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0); // 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 // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetLayer(Layer* layer); - public: void SetWidth(const Unit& width); - public: void SetHeight(const Unit& height); - public: void SetSizes(const Unit& width, const Unit& height); - public: void SetX(const Unit& x); - public: void SetY(const Unit& y); - public: void SetPosition(const Unit& x, const Unit& y); - public: void SetPosition(const Point& position); - public: void SetDx(const Unit& dx); - public: void SetDy(const Unit& dy); - public: void SetOffset(const Unit& dx, const Unit& dy); + public: void SetLayer(Layer* layer); + public: void SetWidth(const Unit& width); + public: void SetHeight(const Unit& height); + public: void SetSizes(const Unit& width, const Unit& height); + public: void SetX(const Unit& x); + public: void SetY(const Unit& y); + public: void SetPosition(const Unit& x, const Unit& y); + public: void SetPosition(const Point& position); + public: void SetDx(const Unit& dx); + public: void SetDy(const Unit& dy); + public: void SetOffset(const Unit& dx, const Unit& dy); // 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; }; diff --git a/hurricane/src/hurricane/Contacts.h b/hurricane/src/hurricane/Contacts.h index a242cf58..5c03f5f0 100644 --- a/hurricane/src/hurricane/Contacts.h +++ b/hurricane/src/hurricane/Contacts.h @@ -46,9 +46,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/DBo.cpp b/hurricane/src/hurricane/DBo.cpp index 29b986de..351ee3e7 100644 --- a/hurricane/src/hurricane/DBo.cpp +++ b/hurricane/src/hurricane/DBo.cpp @@ -19,7 +19,7 @@ namespace Hurricane { DBo::DBo() // ******* -: _propertySet() +: _propertySet() { } @@ -28,131 +28,131 @@ 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; + 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; - ++iterator; - } - return NULL; + PropertySet::const_iterator iterator = _propertySet.begin(); + while (iterator != _propertySet.end()) { + Property* property = *iterator; + 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"); + if (!property) + throw Error("Can't put property : null property"); - Property* oldProperty = GetProperty(property->GetName()); - if (property != oldProperty) { - if (oldProperty) { - _propertySet.erase(oldProperty); - oldProperty->OnReleasedBy(this); - } - _propertySet.insert(property); - property->OnCapturedBy(this); - } + Property* oldProperty = getProperty(property->getName()); + if (property != oldProperty) { + if (oldProperty) { + _propertySet.erase(oldProperty); + oldProperty->onReleasedBy(this); + } + _propertySet.insert(property); + property->onCapturedBy(this); + } } -void DBo::Remove(Property* property) +void DBo::remove(Property* property) // ********************************* { - if (!property) - throw Error("Can't remove property : null property"); + if (!property) + throw Error("Can't remove property : null property"); - if (_propertySet.find(property) != _propertySet.end()) { - _propertySet.erase(property); - property->OnReleasedBy(this); - if (is_a(this) && _propertySet.empty()) Delete(); - } + if (_propertySet.find(property) != _propertySet.end()) { + _propertySet.erase(property); + property->onReleasedBy(this); + if (is_a(this) && _propertySet.empty()) destroy(); + } } -void DBo::RemoveProperty(const Name& name) +void DBo::removeProperty(const Name& name) // *************************************** { - Property* property = GetProperty(name); - if (property) { - _propertySet.erase(property); - property->OnReleasedBy(this); - if (is_a(this) && _propertySet.empty()) Delete(); - } + Property* property = getProperty(name); + if (property) { + _propertySet.erase(property); + property->onReleasedBy(this); + if (is_a(this) && _propertySet.empty()) destroy(); + } } -void DBo::ClearProperties() +void DBo::clearProperties() // ************************ { // trace << "entering DBo::ClearProperties: " << this << endl; // trace_in(); - while (!_propertySet.empty()) { - Property* property = *_propertySet.begin(); + while (!_propertySet.empty()) { + Property* property = *_propertySet.begin(); // trace << property << endl; - _propertySet.erase(property); - property->OnReleasedBy(this); - } + _propertySet.erase(property); + 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)); - if (record) { - record->Add(GetSlot("Properties", &_propertySet)); - } - return record; + Record* record = new Record(getString(this)); + if (record) { + 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(this) && _propertySet.empty()) Delete(); - } + if (property && (_propertySet.find(property) != _propertySet.end())) { + _propertySet.erase(property); + if (is_a(this) && _propertySet.empty()) destroy(); + } } } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/DBo.h b/hurricane/src/hurricane/DBo.h index 0212348e..cf6c6294 100644 --- a/hurricane/src/hurricane/DBo.h +++ b/hurricane/src/hurricane/DBo.h @@ -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(); }; diff --git a/hurricane/src/hurricane/DBos.h b/hurricane/src/hurricane/DBos.h index 8ec4acf8..0e7b4d92 100644 --- a/hurricane/src/hurricane/DBos.h +++ b/hurricane/src/hurricane/DBos.h @@ -46,10 +46,10 @@ typedef GenericFilter DBoFilter; #define for_each_dbo(dbo, dbos)\ /******************************/\ {\ - DBoLocator _locator = dbos.GetLocator();\ - while (_locator.IsValid()) {\ - DBo* dbo = _locator.GetElement();\ - _locator.Progress(); + DBoLocator _locator = dbos.getLocator();\ + while (_locator.IsValid()) {\ + DBo* dbo = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/DRCError.cpp b/hurricane/src/hurricane/DRCError.cpp index 5ecaf4ba..b75e6ebb 100644 --- a/hurricane/src/hurricane/DRCError.cpp +++ b/hurricane/src/hurricane/DRCError.cpp @@ -20,75 +20,53 @@ namespace Hurricane { DRCError::DRCError(Cell* cell, const Name& name, const Box& boundingBox) // ********************************************************************* : Inherit(cell), - _name(name), - _boundingBox(boundingBox) + _name(name), + _boundingBox(boundingBox) { - if (_name.IsEmpty()) - throw Error("Can't create " + _TName("DRCError") + " : empty name"); + if (_name.IsEmpty()) + throw Error("Can't create " + _TName("DRCError") + " : empty name"); - if (_boundingBox.isEmpty()) - throw Error("Can't create " + _TName("DRCError") + " : empty bounding box"); + if (_boundingBox.isEmpty()) + throw Error("Can't create " + _TName("DRCError") + " : empty bounding box"); } DRCError* DRCError::Create(Cell* cell, const Name& name, const Box& boundingBox) // ***************************************************************************** { - DRCError* drcError = new DRCError(cell, name, boundingBox); + DRCError* drcError = new DRCError(cell, name, boundingBox); - drcError->_PostCreate(); + drcError->_postCreate(); - return drcError; + return drcError; } void DRCError::Translate(const Unit& dx, const Unit& dy) // ***************************************************** { - if ((dx != 0) || (dy != 0)) { - Invalidate(false); - _boundingBox.translate(dx, dy); - } + if ((dx != 0) || (dy != 0)) { + Invalidate(false); + _boundingBox.translate(dx, 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)); - return s; + 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(); - if (record) { - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("BoundingBox", &_boundingBox)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + 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. diff --git a/hurricane/src/hurricane/DRCError.h b/hurricane/src/hurricane/DRCError.h index e36549a9..307644c0 100644 --- a/hurricane/src/hurricane/DRCError.h +++ b/hurricane/src/hurricane/DRCError.h @@ -23,43 +23,39 @@ class DRCError : public Marker { // Types // ***** - public: typedef Marker Inherit; + public: typedef Marker Inherit; // Attributes // ********** - public: Name _name; - public: Box _boundingBox; + public: Name _name; + public: Box _boundingBox; // Constructors // ************ - protected: DRCError(Cell* cell, const Name& name, const Box& boundingBox); + protected: DRCError(Cell* cell, const Name& name, const Box& boundingBox); - public: static DRCError* Create(Cell* cell, const Name& name, const Box& boundingBox); + public: static DRCError* Create(Cell* cell, const Name& name, const Box& boundingBox); // 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 // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); // 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); -// }; diff --git a/hurricane/src/hurricane/DataBase.cpp b/hurricane/src/hurricane/DataBase.cpp index fb35e1b1..630d0eb4 100644 --- a/hurricane/src/hurricane/DataBase.cpp +++ b/hurricane/src/hurricane/DataBase.cpp @@ -24,73 +24,73 @@ static DataBase* DATA_BASE = NULL; DataBase::DataBase() // ***************** -: Inherit(), - _technology(NULL), - _rootLibrary(NULL) +: Inherit(), + _technology(NULL), + _rootLibrary(NULL) { - if (DATA_BASE) - throw Error("Can't create " + _TName("DataBase") + " : already exists"); + if (DATA_BASE) + throw Error("Can't create " + _TName("DataBase") + " : already exists"); } DataBase* DataBase::Create() // ************************* { - DataBase* dataBase = new DataBase(); + DataBase* dataBase = new DataBase(); - dataBase->_PostCreate(); + dataBase->_postCreate(); - return dataBase; + return dataBase; } -void DataBase::_PostCreate() +void DataBase::_postCreate() // ************************* { - Inherit::_PostCreate(); + Inherit::_postCreate(); - DATA_BASE = this; + DATA_BASE = this; } -void DataBase::_PreDelete() +void DataBase::_preDestroy() // ************************ { - OpenUpdateSession(); - Inherit::_PreDelete(); + OpenUpdateSession(); + Inherit::_preDestroy(); - if (_rootLibrary) _rootLibrary->Delete(); - if (_technology) _technology->Delete(); - CloseUpdateSession (); + if (_rootLibrary) _rootLibrary->destroy(); + if (_technology) _technology->destroy(); + CloseUpdateSession (); - DATA_BASE = NULL; + 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(); - 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()))); - } - return record; + 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()))); + } + return record; } // **************************************************************************************************** // Generic functions // **************************************************************************************************** -DataBase* GetDataBase() +DataBase* getDataBase() // ******************** { - return DATA_BASE; + return DATA_BASE; } diff --git a/hurricane/src/hurricane/DataBase.h b/hurricane/src/hurricane/DataBase.h index b652f0ef..62226e91 100644 --- a/hurricane/src/hurricane/DataBase.h +++ b/hurricane/src/hurricane/DataBase.h @@ -29,42 +29,42 @@ class DataBase : public DBo { // Types // ***** - public: typedef DBo Inherit; + public: typedef DBo Inherit; // Attributes // ********** - private: Technology* _technology; - private: Library* _rootLibrary; + private: Technology* _technology; + private: Library* _rootLibrary; // Constructors // ************ - protected: DataBase(); + protected: DataBase(); // 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;}; + public: void _SetTechnology(Technology* technology) {_technology = technology;}; + public: void _SetRootLibrary(Library* rootLibrary) {_rootLibrary = rootLibrary;}; # endif - public: static DataBase* Create(); + public: static DataBase* Create(); // 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(); diff --git a/hurricane/src/hurricane/DeepNet.cpp b/hurricane/src/hurricane/DeepNet.cpp index b57f554b..4d582144 100644 --- a/hurricane/src/hurricane/DeepNet.cpp +++ b/hurricane/src/hurricane/DeepNet.cpp @@ -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()); } diff --git a/hurricane/src/hurricane/DeepNet.h b/hurricane/src/hurricane/DeepNet.h index 994534b2..5eb82b8a 100644 --- a/hurricane/src/hurricane/DeepNet.h +++ b/hurricane/src/hurricane/DeepNet.h @@ -77,21 +77,21 @@ 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 // Constructors. public: - static DeepNet* Create ( HyperNet& hyperNet ); + static DeepNet* Create ( HyperNet& hyperNet ); // Accessors. public: // Predicates. public: - virtual bool IsDeepNet () const { return true; }; + virtual bool IsDeepNet () const { return true; }; // Internal Modifiers. public: @@ -99,7 +99,7 @@ namespace Hurricane { }; -Net* GetDeepNet(HyperNet& hyperNet); +Net* getDeepNet(HyperNet& hyperNet); } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/DisplaySlot.cpp b/hurricane/src/hurricane/DisplaySlot.cpp index 95adbaf4..e7ebd99e 100644 --- a/hurricane/src/hurricane/DisplaySlot.cpp +++ b/hurricane/src/hurricane/DisplaySlot.cpp @@ -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; @@ -88,14 +88,9 @@ void DisplaySlot::Show() void DisplaySlot::Hide() // ********************* { - if (_isVisible) { - _isVisible = false; - //for_each_view(view, _cell->GetViews()) - //{ - // view->Invalidate(); - // end_for; - //} - } + if (_isVisible) { + _isVisible = false; + } } void DisplaySlot::Flush() @@ -103,91 +98,69 @@ void DisplaySlot::Flush() { OpenUpdateSession(); vector 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(); + return _quadTree.getGos().getSubSet(); } -UserGos DisplaySlot::GetUserGosUnder(const Box& area) const +UserGos DisplaySlot::getUserGosUnder(const Box& area) const // ******************************************************** { - return _quadTree.GetGosUnder(area).GetSubSet(); + return _quadTree.getGosUnder(area).getSubSet(); } -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(); + return relation->getSlaveOwners().getSubSet(); } -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()) - { - if (displaySlot->GetName() == name) + for_each_display_slot(displaySlot,relation->getSlaveOwners().getSubSet()) { + if (displaySlot->getName() == name) return displaySlot; end_for; } diff --git a/hurricane/src/hurricane/DisplaySlot.h b/hurricane/src/hurricane/DisplaySlot.h index 9f9e4bf9..dd02d898 100644 --- a/hurricane/src/hurricane/DisplaySlot.h +++ b/hurricane/src/hurricane/DisplaySlot.h @@ -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); diff --git a/hurricane/src/hurricane/DisplaySlots.h b/hurricane/src/hurricane/DisplaySlots.h index 99db0adb..de1578b4 100644 --- a/hurricane/src/hurricane/DisplaySlots.h +++ b/hurricane/src/hurricane/DisplaySlots.h @@ -50,10 +50,10 @@ typedef GenericFilter DisplaySlotFilter; #define for_each_display_slot(displaySlot, displaySlots)\ /******************************************************/\ {\ - DisplaySlotLocator _locator = displaySlots.GetLocator();\ - while (_locator.IsValid()) {\ - DisplaySlot* displaySlot = _locator.GetElement();\ - _locator.Progress(); + DisplaySlotLocator _locator = displaySlots.getLocator();\ + while (_locator.IsValid()) {\ + DisplaySlot* displaySlot = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Entities.h b/hurricane/src/hurricane/Entities.h index fedcd24d..ab5a1695 100644 --- a/hurricane/src/hurricane/Entities.h +++ b/hurricane/src/hurricane/Entities.h @@ -46,9 +46,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/Entity.cpp b/hurricane/src/hurricane/Entity.cpp index 696406cd..34f3f80e 100644 --- a/hurricane/src/hurricane/Entity.cpp +++ b/hurricane/src/hurricane/Entity.cpp @@ -20,71 +20,71 @@ namespace Hurricane { Entity::Entity() // ************* -: Inherit() +: Inherit() { } -void Entity::_PreDelete() +void Entity::_preDestroy() // ********************** { -// trace << "entering Entity::_PreDelete: " << this << endl; +// trace << "entering Entity::_preDestroy: " << this << endl; // trace_in(); vector 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 sharedPathStack; - 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); - if (sharedPath2) sharedPathStack.push(sharedPath2); - end_for; - } - } + stack sharedPathStack; + 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->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(); - if (record) { - Occurrence occurrence = Occurrence(this); - if (occurrence.HasProperty()) - record->Add(GetSlot("Occurrence", occurrence)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + Occurrence occurrence = Occurrence(this); + if (occurrence.HasProperty()) + record->Add(getSlot("Occurrence", occurrence)); + } + return record; } diff --git a/hurricane/src/hurricane/Entity.h b/hurricane/src/hurricane/Entity.h index 0480ce08..2e175345 100644 --- a/hurricane/src/hurricane/Entity.h +++ b/hurricane/src/hurricane/Entity.h @@ -31,29 +31,29 @@ class Entity : public DBo { // Types // ***** - public: typedef DBo Inherit; + public: typedef DBo Inherit; // Constructors // ************ - protected: Entity(); + protected: Entity(); // 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; }; diff --git a/hurricane/src/hurricane/Error.cpp b/hurricane/src/hurricane/Error.cpp index 0f661335..3ce3cb1f 100644 --- a/hurricane/src/hurricane/Error.cpp +++ b/hurricane/src/hurricane/Error.cpp @@ -17,34 +17,34 @@ namespace Hurricane { Error::Error(const string& reason, int code) // ***************************************** -: Inherit(), - _reason(reason), - _code(code) +: Inherit(), + _reason(reason), + _code(code) { } Error::Error(const Error& error) // ***************************** -: Inherit(), - _reason(error._reason), - _code(error._code) +: Inherit(), + _reason(error._reason), + _code(error._code) { } Error& Error::operator=(const Error& error) // **************************************** { - _reason = error._reason; - _code = error._code; - return *this; + _reason = error._reason; + _code = error._code; + return *this; } -string Error::_GetString() const +string Error::_getString() const // ***************************** { - if (!_code) return "[ERROR] " + _reason; + if (!_code) return "[ERROR] " + _reason; - return "[ERROR:" + GetString(_code) + "] " + _reason; + return "[ERROR:" + getString(_code) + "] " + _reason; } diff --git a/hurricane/src/hurricane/Error.h b/hurricane/src/hurricane/Error.h index b896a216..f04cbf33 100644 --- a/hurricane/src/hurricane/Error.h +++ b/hurricane/src/hurricane/Error.h @@ -23,31 +23,31 @@ class Error : public Exception { // Types // ***** - public: typedef Exception Inherit; + public: typedef Exception Inherit; // Attributes // ********** - private: string _reason; - private: int _code; + private: string _reason; + private: int _code; // Constructors // ************ - public: Error(const string& reason, int code = 0); + public: Error(const string& reason, int code = 0); - public: Error(const Error& error); + public: Error(const Error& error); // Operators // ********* - public: Error& operator=(const Error& error); + public: Error& operator=(const Error& error); // 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; }; diff --git a/hurricane/src/hurricane/Exception.h b/hurricane/src/hurricane/Exception.h index c9b92cab..3e71e07d 100644 --- a/hurricane/src/hurricane/Exception.h +++ b/hurricane/src/hurricane/Exception.h @@ -23,29 +23,29 @@ class Exception : public NestedSlotAdapter { // Constructors // ************ - protected: Exception(); + protected: Exception(); - private: Exception(const Exception& exception); // not implemented to forbid copy construction + private: Exception(const Exception& exception); // not implemented to forbid copy construction // Destructor // ********** - public: virtual ~Exception(); + public: virtual ~Exception(); // Operators // ********* - private: Exception& operator=(const Exception& exception); // not implemented to forbid assignment + private: Exception& operator=(const Exception& exception); // not implemented to forbid assignment // 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; }; diff --git a/hurricane/src/hurricane/Filter.h b/hurricane/src/hurricane/Filter.h index 1568d897..977f5ec0 100644 --- a/hurricane/src/hurricane/Filter.h +++ b/hurricane/src/hurricane/Filter.h @@ -26,41 +26,41 @@ template class Filter : public NestedSlotAdapter { // Constructors // ************ - public: Filter() {}; + public: Filter() {}; - private: Filter(const Filter& filter); // not implemented to forbid copie + private: Filter(const Filter& filter); // not implemented to forbid copie // Destructor // ********** - public: virtual ~Filter() {}; + public: virtual ~Filter() {}; // Operators // ********* - private: Filter& operator=(const Filter& filter); // not implemented to forbid assigment + private: Filter& operator=(const Filter& filter); // not implemented to forbid assigment - public: GenericFilter operator!() const - // ****************************************** - { - return NotFilter(*this); - }; + public: GenericFilter operator!() const + // ****************************************** + { + return NotFilter(*this); + }; // Accessors // ********* - public: virtual Filter* GetClone() const = 0; + public: virtual Filter* getClone() const = 0; // Predicates // ********** - public: virtual bool Accept(Type type) const = 0; + public: virtual bool Accept(Type type) const = 0; // 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; }; @@ -76,119 +76,119 @@ template class GenericFilter : public Filter { // Types // ***** - public: typedef Filter Inherit; + public: typedef Filter Inherit; // Attributes // ********** - private: Filter* _filter; + private: Filter* _filter; // Constructors // ************ - public: GenericFilter() - // ******************** - : Inherit(), - _filter(NULL) - { - }; + public: GenericFilter() + // ******************** + : Inherit(), + _filter(NULL) + { + }; - public: GenericFilter(const Filter& filter) - // ********************************************** - : Inherit(), - _filter(filter.GetClone()) - { - }; + public: GenericFilter(const Filter& filter) + // ********************************************** + : Inherit(), + _filter(filter.getClone()) + { + }; - public: GenericFilter(const GenericFilter& genericFilter) - // ************************************************************ - : Inherit(), - _filter(genericFilter.GetClone()) - { - }; + public: GenericFilter(const GenericFilter& genericFilter) + // ************************************************************ + : Inherit(), + _filter(genericFilter.getClone()) + { + }; - public: GenericFilter(Filter* filter) - // ***************************************************** - // CAUTION : filter will be deleted by the GenericFilter - // ***************************************************** - : Inherit(), - _filter(filter) - { - }; + public: GenericFilter(Filter* filter) + // ***************************************************** + // CAUTION : filter will be deleted by the GenericFilter + // ***************************************************** + : Inherit(), + _filter(filter) + { + }; // Destructor // ********** - public: virtual ~GenericFilter() - // ***************************** - { - if (_filter) delete _filter; - }; + public: virtual ~GenericFilter() + // ***************************** + { + if (_filter) delete _filter; + }; // Operators // ********* - public: GenericFilter& operator=(const Filter& filter) - // ********************************************************* - { - if (_filter) delete _filter; - _filter = filter.GetClone(); - return *this; - }; + public: GenericFilter& operator=(const Filter& filter) + // ********************************************************* + { + if (_filter) delete _filter; + _filter = filter.getClone(); + return *this; + }; - public: GenericFilter& operator=(const GenericFilter& genericFilter) - // ***************************************************************** - { - if (_filter) delete _filter; - _filter = genericFilter.GetClone(); - return *this; - }; + public: GenericFilter& operator=(const GenericFilter& genericFilter) + // ***************************************************************** + { + if (_filter) delete _filter; + _filter = genericFilter.getClone(); + return *this; + }; - public: GenericFilter& operator=(Filter* filter) - // ***************************************************** - // CAUTION : filter will be deleted by the GenericFilter - // ***************************************************** - { - if (_filter) delete _filter; - _filter = filter; - return *this; - }; + public: GenericFilter& operator=(Filter* filter) + // ***************************************************** + // CAUTION : filter will be deleted by the GenericFilter + // ***************************************************** + { + if (_filter) delete _filter; + _filter = filter; + return *this; + }; // Accessors // ********* - public: virtual Filter* GetClone() const - // ******************************************* - { - return (_filter) ? _filter->GetClone() : NULL; - }; + public: virtual Filter* getClone() const + // ******************************************* + { + return (_filter) ? _filter->getClone() : NULL; + }; // Predicates // ********** - public: virtual bool Accept(Type type) const - // ***************************************** - { - return (_filter) ? _filter->Accept(type) : false; - }; + public: virtual bool Accept(Type type) const + // ***************************************** + { + return (_filter) ? _filter->Accept(type) : false; + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** - { + public: virtual string _getTypeName() const + // ************************************** + { return _TName("GenericFilter"); } - public: virtual string _GetString() const - // ************************************** - { - if (!_filter) - return "<" + _GetTypeName() + " unbound>"; - else - return "<" + _GetTypeName() + " " + GetString(_filter) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + if (!_filter) + return "<" + _getTypeName() + " unbound>"; + else + return "<" + _getTypeName() + " " + getString(_filter) + ">"; + }; }; @@ -204,79 +204,79 @@ template class NotFilter : public Filter { // Types // ***** - public: typedef Filter Inherit; + public: typedef Filter Inherit; // Attributes // ********** - private: GenericFilter _genericFilter; + private: GenericFilter _genericFilter; // Constructors // ************ - public: NotFilter() - // **************** - : Inherit(), - _genericFilter() - { - }; + public: NotFilter() + // **************** + : Inherit(), + _genericFilter() + { + }; - public: NotFilter(const Filter& filter) - // ****************************************** - : Inherit(), - _genericFilter(filter) - { - }; + public: NotFilter(const Filter& filter) + // ****************************************** + : Inherit(), + _genericFilter(filter) + { + }; - public: NotFilter(const NotFilter& notFilter) - // ************************************************ - : Inherit(), - _genericFilter(notFilter._genericFilter) - { - }; + public: NotFilter(const NotFilter& notFilter) + // ************************************************ + : Inherit(), + _genericFilter(notFilter._genericFilter) + { + }; // Operators // ********* - public: NotFilter& operator=(const NotFilter& notFilter) - // *********************************************************** - { - _genericFilter = notFilter._genericFilter; - return *this; - }; + public: NotFilter& operator=(const NotFilter& notFilter) + // *********************************************************** + { + _genericFilter = notFilter._genericFilter; + return *this; + }; // Accessors // ********* - public: virtual Filter* GetClone() const - // ******************************************* - { - return new NotFilter(*this); - }; + public: virtual Filter* getClone() const + // ******************************************* + { + return new NotFilter(*this); + }; // Predicates // ********** - public: virtual bool Accept(Type type) const - // ***************************************** - { - return !_genericFilter.Accept(type); - }; + public: virtual bool Accept(Type type) const + // ***************************************** + { + return !_genericFilter.Accept(type); + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** - { + public: virtual string _getTypeName() const + // ************************************** + { return _TName("GenericNotFilter"); } - public: virtual string _GetString() const - // ************************************** - { - return "<" + _GetTypeName() + " " + GetString(_genericFilter) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + return "<" + _getTypeName() + " " + getString(_genericFilter) + ">"; + }; }; diff --git a/hurricane/src/hurricane/Go.cpp b/hurricane/src/hurricane/Go.cpp index 3da41847..1ac08ce3 100644 --- a/hurricane/src/hurricane/Go.cpp +++ b/hurricane/src/hurricane/Go.cpp @@ -19,66 +19,66 @@ static bool AUTO_MATERIALIZATION_IS_ENABLED = true; Go::Go() // ***** -: Inherit(), - _quadTree(NULL), - _nextOfQuadTreeGoSet(NULL) +: Inherit(), + _quadTree(NULL), + _nextOfQuadTreeGoSet(NULL) { } bool Go::AutoMaterializationIsDisabled() // ************************************* { - return !AUTO_MATERIALIZATION_IS_ENABLED; + return !AUTO_MATERIALIZATION_IS_ENABLED; } void Go::EnableAutoMaterialization() // ********************************* { - AUTO_MATERIALIZATION_IS_ENABLED = true; + AUTO_MATERIALIZATION_IS_ENABLED = true; } void Go::DisableAutoMaterialization() // ********************************** { - AUTO_MATERIALIZATION_IS_ENABLED = false; + AUTO_MATERIALIZATION_IS_ENABLED = false; } -void Go::_PostCreate() +void Go::_postCreate() // ******************* { - Inherit::_PostCreate(); + Inherit::_postCreate(); - if (!AutoMaterializationIsDisabled()) Materialize(); // materialized after entire post creation + 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 + 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(); - if (record) { - record->Add(GetSlot("QuadTree", _quadTree)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("QuadTree", _quadTree)); + } + return record; } diff --git a/hurricane/src/hurricane/Go.h b/hurricane/src/hurricane/Go.h index d84619fd..c8d3b80e 100644 --- a/hurricane/src/hurricane/Go.h +++ b/hurricane/src/hurricane/Go.h @@ -29,61 +29,57 @@ class Go : public Entity { // Friends // ******* - friend class QuadTree; + friend class QuadTree; // Types // ***** - public: typedef Entity Inherit; + public: typedef Entity Inherit; // Attributes // ********** - private: QuadTree* _quadTree; - private: Go* _nextOfQuadTreeGoSet; + private: QuadTree* _quadTree; + private: Go* _nextOfQuadTreeGoSet; // Constructors // ************ - protected: Go(); + protected: Go(); // Predicates // ********** - public: static bool AutoMaterializationIsDisabled(); + public: static bool AutoMaterializationIsDisabled(); - public: bool IsMaterialized() const {return (_quadTree != NULL);}; + public: bool IsMaterialized() const {return (_quadTree != NULL);}; // Updators // ******** - public: static void EnableAutoMaterialization(); - public: static void DisableAutoMaterialization(); + public: static void EnableAutoMaterialization(); + public: static void DisableAutoMaterialization(); - public: virtual void Materialize() = 0; - public: virtual void Unmaterialize() = 0; + public: virtual void Materialize() = 0; + public: virtual void Unmaterialize() = 0; - public: virtual void Invalidate(bool propagateFlag = true); - // implementation located on file UpdateSession.cpp to access local variables + public: virtual void Invalidate(bool propagateFlag = true); + // implementation located on file UpdateSession.cpp to access local variables - public: virtual void Translate(const Unit& dx, const Unit& dy) = 0; + public: virtual void Translate(const Unit& dx, const Unit& dy) = 0; // 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; + public: void _SetNextOfQuadTreeGoSet(Go* go) {_nextOfQuadTreeGoSet = go;}; }; diff --git a/hurricane/src/hurricane/Gos.h b/hurricane/src/hurricane/Gos.h index f57f666a..1567cbc5 100644 --- a/hurricane/src/hurricane/Gos.h +++ b/hurricane/src/hurricane/Gos.h @@ -46,10 +46,10 @@ typedef GenericFilter GoFilter; #define for_each_go(go, gos)\ /***************************/\ {\ - GoLocator _locator = gos.GetLocator();\ - while (_locator.IsValid()) {\ - Go* go = _locator.GetElement();\ - _locator.Progress(); + GoLocator _locator = gos.getLocator();\ + while (_locator.IsValid()) {\ + Go* go = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Hook.cpp b/hurricane/src/hurricane/Hook.cpp index c5f0a1f9..ad2575a2 100644 --- a/hurricane/src/hurricane/Hook.cpp +++ b/hurricane/src/hurricane/Hook.cpp @@ -20,17 +20,17 @@ namespace Hurricane { class Hook_IsMasterFilter : public Filter { // ********************************************* - public: Hook_IsMasterFilter() {}; + public: Hook_IsMasterFilter() {}; - public: Hook_IsMasterFilter(const Hook_IsMasterFilter& filter) {}; + public: Hook_IsMasterFilter(const Hook_IsMasterFilter& filter) {}; - public: Hook_IsMasterFilter& operator=(const Hook_IsMasterFilter& filter) {return *this;}; + public: Hook_IsMasterFilter& operator=(const Hook_IsMasterFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Hook_IsMasterFilter(*this);}; + public: virtual Filter* getClone() const {return new Hook_IsMasterFilter(*this);}; - public: virtual bool Accept(Hook* hook) const {return hook->IsMaster();}; + 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>");}; }; @@ -46,58 +46,58 @@ class Hook_Hooks : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ***************************************************** + public: class Locator : public Hurricane::Locator { + // ***************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Hook* _hook; - private: Hook* _currentHook; + private: const Hook* _hook; + private: Hook* _currentHook; - public: Locator(const Hook* hook = NULL); - public: Locator(const Locator& locator); + public: Locator(const Hook* hook = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Hook* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Hook* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Hook* _hook; + private: const Hook* _hook; // Constructors // ************ - public: Hook_Hooks(const Hook* hook = NULL); - public: Hook_Hooks(const Hook_Hooks& hooks); + public: Hook_Hooks(const Hook* hook = NULL); + public: Hook_Hooks(const Hook_Hooks& hooks); // Operators // ********* - public: Hook_Hooks& operator=(const Hook_Hooks& hooks); + public: Hook_Hooks& operator=(const Hook_Hooks& hooks); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -113,58 +113,58 @@ class Hook_SlaveHooks : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ***************************************************** + public: class Locator : public Hurricane::Locator { + // ***************************************************** - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Hook* _hook; - private: Hook* _currentHook; + private: const Hook* _hook; + private: Hook* _currentHook; - public: Locator(const Hook* hook = NULL); - public: Locator(const Locator& locator); + public: Locator(const Hook* hook = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual Hook* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Hook* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Hook* _hook; + private: const Hook* _hook; // Constructors // ************ - public: Hook_SlaveHooks(const Hook* hook = NULL); - public: Hook_SlaveHooks(const Hook_SlaveHooks& hooks); + public: Hook_SlaveHooks(const Hook* hook = NULL); + public: Hook_SlaveHooks(const Hook_SlaveHooks& hooks); // Operators // ********* - public: Hook_SlaveHooks& operator=(const Hook_SlaveHooks& hooks); + public: Hook_SlaveHooks& operator=(const Hook_SlaveHooks& hooks); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -176,200 +176,200 @@ class Hook_SlaveHooks : public Collection { Hook::Hook() // ********* -: _nextHook(this) +: _nextHook(this) { } Hook::~Hook() // ********** { - if (_nextHook != this) - throw Error("Abnormal deletion of hook : always attached"); + if (_nextHook != this) + throw Error("Abnormal deletion of hook : always attached"); } -Hook* Hook::GetNextHook() const +Hook* Hook::getNextHook() const // **************************** { - return _nextHook; + return _nextHook; } -Hook* Hook::GetPreviousHook() const +Hook* Hook::getPreviousHook() const // ******************************** { - Hook* hook = (Hook*)this; - while (hook->_nextHook != this) hook = hook->_nextHook; - return hook; + Hook* hook = (Hook*)this; + while (hook->_nextHook != this) hook = hook->_nextHook; + return hook; } -Hook* Hook::GetMasterHook() const +Hook* Hook::getMasterHook() const // ****************************** { - Hook* hook = (Hook*)this; - do { - if (hook->IsMaster()) return hook; - hook = hook->_nextHook; - } while (hook != this); - return NULL; + Hook* hook = (Hook*)this; + do { + if (hook->IsMaster()) return hook; + hook = hook->_nextHook; + } while (hook != this); + 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; - Hook* hook = (Hook*)this; - do { - if (hook->IsMaster()) previousMasterHook = hook; - hook = hook->_nextHook; - } while (hook != this); - return previousMasterHook; + Hook* previousMasterHook = NULL; + Hook* hook = (Hook*)this; + do { + if (hook->IsMaster()) previousMasterHook = hook; + hook = hook->_nextHook; + } while (hook != this); + return previousMasterHook; } -Hooks Hook::GetHooks() const +Hooks Hook::getHooks() const // ************************* { - return Hook_Hooks(this); + return Hook_Hooks(this); } -Hooks Hook::GetSlaveHooks() const +Hooks Hook::getSlaveHooks() const // ****************************** { - return Hook_SlaveHooks(this); + return Hook_SlaveHooks(this); } -HookFilter Hook::GetIsMasterFilter() +HookFilter Hook::getIsMasterFilter() // ********************************* { - return Hook_IsMasterFilter(); + return Hook_IsMasterFilter(); } bool Hook::IsAttached() const // ************************** { - if (!IsMaster()) - return (GetMasterHook() != NULL); - else - return (GetNextMasterHook() != this); + if (!IsMaster()) + return (getMasterHook() != NULL); + else + return (getNextMasterHook() != this); } Hook* Hook::Detach() // ***************** { - Hook* previousHook = NULL; - Hook* hook = _nextHook; - while (hook != this) { - if (!IsMaster() || hook->IsMaster()) previousHook = hook; - hook = hook->_nextHook; - } - if (previousHook) { - Hook* nextHook = _nextHook; - _nextHook = previousHook->_nextHook; - previousHook->_nextHook = nextHook; + Hook* previousHook = NULL; + Hook* hook = _nextHook; + while (hook != this) { + if (!IsMaster() || hook->IsMaster()) previousHook = hook; + hook = hook->_nextHook; + } + if (previousHook) { + Hook* nextHook = _nextHook; + _nextHook = previousHook->_nextHook; + previousHook->_nextHook = nextHook; - // /* - if (IsMaster()) { - assert(previousHook->IsMaster()); - Component* component = GetComponent(); - Rubber* rubber = component->GetRubber(); - if (rubber) { - rubber->_SetHook(previousHook); - component->_SetRubber(NULL); - } - } - // */ + // /* + if (IsMaster()) { + assert(previousHook->IsMaster()); + Component* component = getComponent(); + Rubber* rubber = component->getRubber(); + if (rubber) { + rubber->_SetHook(previousHook); + component->_SetRubber(NULL); + } + } + // */ - } - return previousHook; + } + return previousHook; } Hook* Hook::Attach(Hook* hook) // *************************** { - if (IsAttached()) - throw Error("Can't attach : already attached"); + if (IsAttached()) + throw Error("Can't attach : already attached"); - if (!hook) - throw Error("Can't attach : null hook"); + if (!hook) + throw Error("Can't attach : null hook"); - if (!hook->IsMaster()) - throw Error("Can't attach : not a master hook"); + if (!hook->IsMaster()) + throw Error("Can't attach : not a master hook"); - if (hook == this) - throw Error("Can't attach : itself"); + if (hook == this) + throw Error("Can't attach : itself"); - Hook* masterHook = hook->GetPreviousMasterHook(); - Hook* nextHook = masterHook->_nextHook; - masterHook->_nextHook = _nextHook; - _nextHook = nextHook; + Hook* masterHook = hook->getPreviousMasterHook(); + Hook* nextHook = masterHook->_nextHook; + masterHook->_nextHook = _nextHook; + _nextHook = nextHook; - // /* - if (IsMaster()) { - Rubber* rubber = hook->GetComponent()->GetRubber(); - if (rubber) - GetComponent()->_SetRubber(rubber); - else - Rubber::_Create(this); - } - // */ + // /* + if (IsMaster()) { + Rubber* rubber = hook->getComponent()->getRubber(); + if (rubber) + getComponent()->_SetRubber(rubber); + else + Rubber::_Create(this); + } + // */ - return this; + return this; } void Hook::_SetNextHook(Hook* hook) { - if (IsMaster()) - { - Rubber* rubber = hook->GetComponent()->GetRubber(); - if (rubber) - rubber->_Delete(); - } - _nextHook = hook; + if (IsMaster()) + { + Rubber* rubber = hook->getComponent()->getRubber(); + if (rubber) + rubber->_destroy(); + } + _nextHook = hook; } Hook* Hook::Merge(Hook* hook) // ************************** { - if (!IsMaster()) - throw Error("Can't merge : not a master"); + if (!IsMaster()) + throw Error("Can't merge : not a master"); - if (!hook) - throw Error("Can't merge : null hook"); + if (!hook) + throw Error("Can't merge : null hook"); - if (!hook->IsMaster()) - throw Error("Can't merge : not a master hook"); + if (!hook->IsMaster()) + throw Error("Can't merge : not a master hook"); - if (hook == this) - throw Error("Can't merge : itself"); + if (hook == this) + throw Error("Can't merge : itself"); - Hook* masterHook = hook->GetPreviousMasterHook(); - Hook* nextHook = masterHook->_nextHook; - masterHook->_nextHook = _nextHook; - _nextHook = nextHook; + 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::_Create(this); + Rubber* rubber = getComponent()->getRubber(); + if (rubber) rubber->_destroy(); + rubber = hook->getComponent()->getRubber(); + if (rubber) rubber->_destroy(); + Rubber::_Create(this); - return 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)); - } - return record; + Record* record = NULL; + if (_nextHook != this) { + record = new Record(getString(this)); + record->Add(getSlot("Component", getComponent())); + record->Add(getSlot("NextHook", _nextHook)); + } + return record; } @@ -380,44 +380,44 @@ Record* Hook::_GetRecord() const Hook_Hooks::Hook_Hooks(const Hook* hook) // ************************************* -: Inherit(), - _hook(hook) +: Inherit(), + _hook(hook) { } Hook_Hooks::Hook_Hooks(const Hook_Hooks& hooks) // ******************************************** -: Inherit(), - _hook(hooks._hook) +: Inherit(), + _hook(hooks._hook) { } Hook_Hooks& Hook_Hooks::operator=(const Hook_Hooks& hooks) // ******************************************************* { - _hook = hooks._hook; - return *this; + _hook = hooks._hook; + return *this; } -Collection* Hook_Hooks::GetClone() const +Collection* Hook_Hooks::getClone() const // ******************************************** { - return new Hook_Hooks(*this); + return new Hook_Hooks(*this); } -Locator* Hook_Hooks::GetLocator() const +Locator* Hook_Hooks::getLocator() const // ******************************************* { - return new Locator(_hook); + return new Locator(_hook); } -string Hook_Hooks::_GetString() const +string Hook_Hooks::_getString() const // ********************************** { - string s = "<" + _TName("Hook::Hooks"); - if (_hook) s += " " + GetString(_hook); - s += ">"; - return s; + string s = "<" + _TName("Hook::Hooks"); + if (_hook) s += " " + getString(_hook); + s += ">"; + return s; } @@ -428,62 +428,62 @@ string Hook_Hooks::_GetString() const Hook_Hooks::Locator::Locator(const Hook* hook) // ******************************************* -: Inherit(), - _hook(hook), - _currentHook((Hook*)hook) +: Inherit(), + _hook(hook), + _currentHook((Hook*)hook) { } Hook_Hooks::Locator::Locator(const Locator& locator) // ************************************************* -: Inherit(), - _hook(locator._hook), - _currentHook(locator._currentHook) +: Inherit(), + _hook(locator._hook), + _currentHook(locator._currentHook) { } Hook_Hooks::Locator& Hook_Hooks::Locator::operator=(const Locator& locator) // ************************************************************************ { - _hook = locator._hook; - _currentHook = locator._currentHook; - return *this; + _hook = locator._hook; + _currentHook = locator._currentHook; + return *this; } -Hook* Hook_Hooks::Locator::GetElement() const +Hook* Hook_Hooks::Locator::getElement() const // ****************************************** { - return _currentHook; + return _currentHook; } -Locator* Hook_Hooks::Locator::GetClone() const +Locator* Hook_Hooks::Locator::getClone() const // ************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Hook_Hooks::Locator::IsValid() const // ************************************** { - return (_currentHook != NULL); + return (_currentHook != NULL); } void Hook_Hooks::Locator::Progress() // ********************************* { - if (_currentHook) { - _currentHook = _currentHook->GetNextHook(); - if (_currentHook == _hook) _currentHook = NULL; - } + if (_currentHook) { + _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); - s += ">"; - return s; + string s = "<" + _TName("Hook::Hooks::Locator"); + if (_hook) s += " " + getString(_hook); + s += ">"; + return s; } @@ -494,44 +494,44 @@ string Hook_Hooks::Locator::_GetString() const Hook_SlaveHooks::Hook_SlaveHooks(const Hook* hook) // *********************************************** -: Inherit(), - _hook(hook) +: Inherit(), + _hook(hook) { } Hook_SlaveHooks::Hook_SlaveHooks(const Hook_SlaveHooks& slaveHooks) // **************************************************************** -: Inherit(), - _hook(slaveHooks._hook) +: Inherit(), + _hook(slaveHooks._hook) { } Hook_SlaveHooks& Hook_SlaveHooks::operator=(const Hook_SlaveHooks& slaveHooks) // *************************************************************************** { - _hook = slaveHooks._hook; - return *this; + _hook = slaveHooks._hook; + return *this; } -Collection* Hook_SlaveHooks::GetClone() const +Collection* Hook_SlaveHooks::getClone() const // ************************************************* { - return new Hook_SlaveHooks(*this); + return new Hook_SlaveHooks(*this); } -Locator* Hook_SlaveHooks::GetLocator() const +Locator* Hook_SlaveHooks::getLocator() const // ************************************************ { - return new Locator(_hook); + return new Locator(_hook); } -string Hook_SlaveHooks::_GetString() const +string Hook_SlaveHooks::_getString() const // *************************************** { - string s = "<" + _TName("Hook::SlaveHooks"); - if (_hook) s += " " + GetString(_hook); - s += ">"; - return s; + string s = "<" + _TName("Hook::SlaveHooks"); + if (_hook) s += " " + getString(_hook); + s += ">"; + return s; } @@ -542,71 +542,71 @@ string Hook_SlaveHooks::_GetString() const Hook_SlaveHooks::Locator::Locator(const Hook* hook) // ************************************************ -: Inherit(), - _hook(hook), - _currentHook(NULL) +: Inherit(), + _hook(hook), + _currentHook(NULL) { - if (_hook && _hook->IsMaster()) { - _currentHook = _hook->GetPreviousMasterHook(); - if (_currentHook) { - _currentHook = _currentHook->GetNextHook(); - if (_currentHook == _hook) _currentHook = NULL; - } - assert(!_currentHook || !_currentHook->IsMaster()); - } + if (_hook && _hook->IsMaster()) { + _currentHook = _hook->getPreviousMasterHook(); + if (_currentHook) { + _currentHook = _currentHook->getNextHook(); + if (_currentHook == _hook) _currentHook = NULL; + } + assert(!_currentHook || !_currentHook->IsMaster()); + } } Hook_SlaveHooks::Locator::Locator(const Locator& locator) // ****************************************************** -: Inherit(), - _hook(locator._hook), - _currentHook(locator._currentHook) +: Inherit(), + _hook(locator._hook), + _currentHook(locator._currentHook) { } Hook_SlaveHooks::Locator& Hook_SlaveHooks::Locator::operator=(const Locator& locator) // ********************************************************************************** { - _hook = locator._hook; - _currentHook = locator._currentHook; - return *this; + _hook = locator._hook; + _currentHook = locator._currentHook; + return *this; } -Hook* Hook_SlaveHooks::Locator::GetElement() const +Hook* Hook_SlaveHooks::Locator::getElement() const // *********************************************** { - return _currentHook; + return _currentHook; } -Locator* Hook_SlaveHooks::Locator::GetClone() const +Locator* Hook_SlaveHooks::Locator::getClone() const // ******************************************************* { - return new Locator(*this); + return new Locator(*this); } bool Hook_SlaveHooks::Locator::IsValid() const // ******************************************* { - return (_currentHook != NULL); + return (_currentHook != NULL); } void Hook_SlaveHooks::Locator::Progress() // ************************************** { - if (_currentHook) { - _currentHook = _currentHook->GetNextHook(); - if (_currentHook == _hook) _currentHook = NULL; - assert(!_currentHook || !_currentHook->IsMaster()); - } + if (_currentHook) { + _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); - s += ">"; - return s; + string s = "<" + _TName("Hook::SlaveHooks::Locator"); + if (_hook) s += " " + getString(_hook); + s += ">"; + return s; } diff --git a/hurricane/src/hurricane/Hook.h b/hurricane/src/hurricane/Hook.h index 6aecb4f3..12ce5f18 100644 --- a/hurricane/src/hurricane/Hook.h +++ b/hurricane/src/hurricane/Hook.h @@ -25,65 +25,65 @@ class Hook : public NestedSlotAdapter { // Attributes // ********** - private: Hook* _nextHook; + private: Hook* _nextHook; // Constructors // ************ - protected: Hook(); + protected: Hook(); - private: Hook(const Hook& hook); // not implemented to forbid copy construction + private: Hook(const Hook& hook); // not implemented to forbid copy construction // Destructor // ********** - protected: virtual ~Hook(); + protected: virtual ~Hook(); // Operators // ********* - private: Hook& operator=(const Hook& hook); // not implemented to forbid assignment + private: Hook& operator=(const Hook& hook); // not implemented to forbid assignment // 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 // ********** - public: virtual bool IsMaster() const = 0; + public: virtual bool IsMaster() const = 0; - public: bool IsAttached() const; + public: bool IsAttached() const; // Updators // ******** - public: Hook* Detach(); - public: Hook* Attach(Hook* hook); - public: Hook* Merge(Hook* hook); - public: void _SetNextHook(Hook* hook); + public: Hook* Detach(); + public: Hook* Attach(Hook* hook); + public: Hook* Merge(Hook* hook); + public: void _SetNextHook(Hook* hook); // Others // ****** - public: virtual string _GetString() const = 0; - public: virtual Record* _GetRecord() const; + public: virtual string _getString() const = 0; + public: virtual Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/Hooks.h b/hurricane/src/hurricane/Hooks.h index ac50c5c7..d74e0cdc 100644 --- a/hurricane/src/hurricane/Hooks.h +++ b/hurricane/src/hurricane/Hooks.h @@ -46,10 +46,10 @@ typedef GenericFilter HookFilter; #define for_each_hook(hook, hooks)\ /*********************************/\ {\ - HookLocator _locator = hooks.GetLocator();\ - while (_locator.IsValid()) {\ - Hook* hook = _locator.GetElement();\ - _locator.Progress(); + HookLocator _locator = hooks.getLocator();\ + while (_locator.IsValid()) {\ + Hook* hook = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Horizontal.cpp b/hurricane/src/hurricane/Horizontal.cpp index b0dedf18..11da3f9a 100644 --- a/hurricane/src/hurricane/Horizontal.cpp +++ b/hurricane/src/hurricane/Horizontal.cpp @@ -22,149 +22,149 @@ namespace Hurricane { Horizontal::Horizontal(Net* net, Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget) // **************************************************************************************************** : Inherit(net, source, target, layer, width), - _y(y), - _dxSource(dxSource), - _dxTarget(dxTarget) + _y(y), + _dxSource(dxSource), + _dxTarget(dxTarget) { } Horizontal* Horizontal::Create(Net* net, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget) // **************************************************************************************************** { - if (!net) - throw Error("Can't create " + _TName("Horizontal") + " : null net"); + if (!net) + throw Error("Can't create " + _TName("Horizontal") + " : null net"); - Horizontal* horizontal = new Horizontal(net, NULL, NULL, layer, y, width, dxSource, dxTarget); + Horizontal* horizontal = new Horizontal(net, NULL, NULL, layer, y, width, dxSource, dxTarget); - horizontal->_PostCreate(); + horizontal->_postCreate(); - return horizontal; + return horizontal; } Horizontal* Horizontal::Create(Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget) // **************************************************************************************************** { - if (!source) - throw Error("Can't create " + _TName("Horizontal") + " : null source"); + if (!source) + throw Error("Can't create " + _TName("Horizontal") + " : null source"); - if (!target) - throw Error("Can't create " + _TName("Horizontal") + " : null target"); + if (!target) + throw Error("Can't create " + _TName("Horizontal") + " : null target"); - Horizontal* horizontal = - new Horizontal(source->GetNet(), source, target, layer, y, width, dxSource, dxTarget); + Horizontal* horizontal = + new Horizontal(source->getNet(), source, target, layer, y, width, dxSource, dxTarget); - horizontal->_PostCreate(); + horizontal->_postCreate(); - return horizontal; + 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) // ******************************************************* { - if (dy != 0) { - Invalidate(true); - _y += dy; - } + if (dy != 0) { + Invalidate(true); + _y += dy; + } } void Horizontal::SetY(const Unit& y) // ********************************* { - if (y != _y) { - Invalidate(true); - _y = y; - } + if (y != _y) { + Invalidate(true); + _y = y; + } } void Horizontal::SetDxSource(const Unit& dxSource) // *********************************************** { - if (dxSource != _dxSource) { - Invalidate(false); - _dxSource = dxSource; - } + if (dxSource != _dxSource) { + Invalidate(false); + _dxSource = dxSource; + } } void Horizontal::SetDxTarget(const Unit& dxTarget) // *********************************************** { - if (dxTarget != _dxTarget) { - Invalidate(false); - _dxTarget = dxTarget; - } + if (dxTarget != _dxTarget) { + Invalidate(false); + _dxTarget = dxTarget; + } } void Horizontal::Translate(const Unit& dy) // *************************************** { - if (dy != 0) { - Invalidate(true); - _y += dy; - } + if (dy != 0) { + Invalidate(true); + _y += 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(); - if (record) { - record->Add(GetSlot("Y", &_y)); - record->Add(GetSlot("DxSource", &_dxSource)); - record->Add(GetSlot("DxTarget", &_dxTarget)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Y", &_y)); + record->Add(getSlot("DxSource", &_dxSource)); + record->Add(getSlot("DxTarget", &_dxTarget)); + } + return record; } } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/Horizontal.h b/hurricane/src/hurricane/Horizontal.h index e73f5a1c..7402d810 100644 --- a/hurricane/src/hurricane/Horizontal.h +++ b/hurricane/src/hurricane/Horizontal.h @@ -24,54 +24,54 @@ class Horizontal : public Segment { // Types // ***** - public: typedef Segment Inherit; + public: typedef Segment Inherit; // Attributes // ********** - private: Unit _y; - private: Unit _dxSource; - private: Unit _dxTarget; + private: Unit _y; + private: Unit _dxSource; + private: Unit _dxTarget; // Constructors // ************ - protected: Horizontal(Net* net, Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); + protected: Horizontal(Net* net, Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); - public: static Horizontal* Create(Net* net, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); - public: static Horizontal* Create(Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); + public: static Horizontal* Create(Net* net, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); + public: static Horizontal* Create(Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0); // 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 // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetY(const Unit& y); - public: void SetDxSource(const Unit& dxSource); - public: void SetDxTarget(const Unit& dxSource); - public: void Translate(const Unit& dy); + public: void SetY(const Unit& y); + public: void SetDxSource(const Unit& dxSource); + public: void SetDxTarget(const Unit& dxSource); + public: void Translate(const Unit& dy); // 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; }; diff --git a/hurricane/src/hurricane/Horizontals.h b/hurricane/src/hurricane/Horizontals.h index 8a65cfea..dbb75803 100644 --- a/hurricane/src/hurricane/Horizontals.h +++ b/hurricane/src/hurricane/Horizontals.h @@ -46,9 +46,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/HyperNet.cpp b/hurricane/src/hurricane/HyperNet.cpp index bd92177e..bc924d7e 100644 --- a/hurricane/src/hurricane/HyperNet.cpp +++ b/hurricane/src/hurricane/HyperNet.cpp @@ -47,14 +47,14 @@ class HyperNet_NetOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* 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 { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -121,14 +121,14 @@ class HyperNet_NetOccurrencesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* 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 { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -197,14 +197,14 @@ class HyperNet_LeafPlugOccurrences : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Occurrence GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Occurrence getElement() const; + public: virtual Hurricane::Locator* 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 { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* 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(entity)) _netOccurrence = occurrence; else { if (is_a(entity)) { Rubber* rubber = (Rubber*)entity; - _netOccurrence = Occurrence(rubber->GetNet(), occurrence.GetPath()); + _netOccurrence = Occurrence(rubber->getNet(), occurrence.getPath()); } else { if (is_a(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(netoccurrence.GetEntity()); + Net* net = dynamic_cast(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(netoccurrence.GetEntity()); + Net* net=dynamic_cast(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* HyperNet_NetOccurrences::GetClone() const +Collection* HyperNet_NetOccurrences::getClone() const // ************************************************************ { return new HyperNet_NetOccurrences(*this); } -Locator* HyperNet_NetOccurrences::GetLocator() const +Locator* 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* HyperNet_NetOccurrences::Locator::GetClone() const +Locator* 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(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(occurrence2.GetEntity())) { - Component* component2 = (Component*)occurrence2.GetEntity(); + Box area = occurrence.getBoundingBox(); + for_each_occurrence(occurrence2, cell->getOccurrencesUnder(area)) { + if (is_a(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* HyperNet_NetOccurrencesUnder::GetClone() const +Collection* HyperNet_NetOccurrencesUnder::getClone() const // ***************************************************************** { return new HyperNet_NetOccurrencesUnder(*this); } -Locator* HyperNet_NetOccurrencesUnder::GetLocator() const +Locator* 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* HyperNet_NetOccurrencesUnder::Locator::GetClone() const +Locator* 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(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(occurrence2.GetEntity())) { - Component* component2 = (Component*)occurrence2.GetEntity(); + for_each_occurrence(occurrence2, cell->getOccurrencesUnder(under)) { + if (is_a(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* HyperNet_LeafPlugOccurrences::GetClone() const +Collection* HyperNet_LeafPlugOccurrences::getClone() const // ************************************************************ { return new HyperNet_LeafPlugOccurrences(*this); } -Locator* HyperNet_LeafPlugOccurrences::GetLocator() const +Locator* 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* HyperNet_LeafPlugOccurrences::Locator::GetClone() const +Locator* 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; } diff --git a/hurricane/src/hurricane/HyperNet.h b/hurricane/src/hurricane/HyperNet.h index 48ec72b4..090560d9 100644 --- a/hurricane/src/hurricane/HyperNet.h +++ b/hurricane/src/hurricane/HyperNet.h @@ -24,45 +24,45 @@ class HyperNet { // Attributes // ********** - private: Occurrence _netOccurrence; + private: Occurrence _netOccurrence; // Constructors // ************ - public: HyperNet(const Occurrence& occurrence); + public: HyperNet(const Occurrence& occurrence); - private: HyperNet(const HyperNet& hyperNet); // not implemented to forbid copy construction + private: HyperNet(const HyperNet& hyperNet); // not implemented to forbid copy construction // Operators // ********* - private: HyperNet& operator=(const HyperNet& hyperNet); // not implemented to forbid assignment + private: HyperNet& operator=(const HyperNet& hyperNet); // not implemented to forbid assignment // 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, - bool allowInterruption = false) const; - public: Occurrences GetLeafPlugOccurrences(bool doExtraction = false , bool allowInterruption = false) const; + 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; // Predicates // ********** - public: bool IsValid() const {return _netOccurrence.IsValid();}; + public: bool IsValid() const {return _netOccurrence.IsValid();}; // 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); diff --git a/hurricane/src/hurricane/Instance.cpp b/hurricane/src/hurricane/Instance.cpp index 5cc85663..ff6c1c77 100644 --- a/hurricane/src/hurricane/Instance.cpp +++ b/hurricane/src/hurricane/Instance.cpp @@ -44,7 +44,7 @@ class Instance_IsUnderFilter : public Filter { return *this; }; - public: virtual Filter* GetClone() const + public: virtual Filter* getClone() const // ************************************************ { return new Instance_IsUnderFilter(*this); @@ -53,13 +53,13 @@ class Instance_IsUnderFilter : public Filter { 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 { public: Instance_IsTerminalFilter& operator=(const Instance_IsTerminalFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Instance_IsTerminalFilter(*this);}; + public: virtual Filter* 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 { public: Instance_IsLeafFilter& operator=(const Instance_IsLeafFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Instance_IsLeafFilter(*this);}; + public: virtual Filter* 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 { public: Instance_IsUnplacedFilter& operator=(const Instance_IsUnplacedFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Instance_IsUnplacedFilter(*this);}; + public: virtual Filter* 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 { public: Instance_IsPlacedFilter& operator=(const Instance_IsPlacedFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Instance_IsPlacedFilter(*this);}; + public: virtual Filter* 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 { public: Instance_IsFixedFilter& operator=(const Instance_IsFixedFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Instance_IsFixedFilter(*this);}; + public: virtual Filter* 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 connectedPlugList; list 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; } diff --git a/hurricane/src/hurricane/Instance.h b/hurricane/src/hurricane/Instance.h index b55ab417..9f6f601e 100644 --- a/hurricane/src/hurricane/Instance.h +++ b/hurricane/src/hurricane/Instance.h @@ -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 @@ -32,157 +31,147 @@ class Instance : public Go { // Types // ***** - public: typedef Go Inherit; + public: typedef Go Inherit; public: class PlacementStatus { - // ************************** + // ************************** - public: enum Code {UNPLACED=0, PLACED=1, FIXED=2}; + public: enum Code {UNPLACED=0, PLACED=1, FIXED=2}; - private: Code _code; + private: Code _code; - public: PlacementStatus(const Code& code = UNPLACED); - public: PlacementStatus(const PlacementStatus& placementstatus); + public: PlacementStatus(const Code& code = UNPLACED); + public: PlacementStatus(const PlacementStatus& placementstatus); - public: PlacementStatus& operator=(const PlacementStatus& placementstatus); + public: PlacementStatus& operator=(const PlacementStatus& placementstatus); - public: operator const Code&() const {return _code;}; + 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; - }; + }; - public: class PlugMap : public IntrusiveMap { - // ********************************************************** + public: class PlugMap : public IntrusiveMap { + // ********************************************************** - public: typedef IntrusiveMap Inherit; - - public: PlugMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(Plug* plug, Plug* nextPlug) 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; - }; + }; - public: class SharedPathMap : public IntrusiveMap { - // ***************************************************************************** + public: class SharedPathMap : public IntrusiveMap { + // ***************************************************************************** - public: typedef IntrusiveMap Inherit; - - public: SharedPathMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(SharedPath* sharedPath, SharedPath* nextSharedPath) 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; - }; + }; // Attributes // ********** - private: Cell* _cell; - private: Name _name; - private: Cell* _masterCell; - private: Transformation _transformation; + private: Cell* _cell; + private: Name _name; + private: Cell* _masterCell; + private: Transformation _transformation; private: PlacementStatus _placementStatus; - private: PlugMap _plugMap; - private: SharedPathMap _sharedPathMap; - private: Instance* _nextOfCellInstanceMap; - private: Instance* _nextOfCellSlaveInstanceSet; + private: PlugMap _plugMap; + private: SharedPathMap _sharedPathMap; + private: Instance* _nextOfCellInstanceMap; + private: Instance* _nextOfCellSlaveInstanceSet; // Constructors // ************ - protected: Instance(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag); + protected: Instance(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag); - public: static Instance* Create(Cell* cell, const Name& name, Cell* masterCell, bool secureFlag = true); - public: static Instance* Create(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag = true); + public: static Instance* Create(Cell* cell, const Name& name, Cell* masterCell, bool secureFlag = true); + public: static Instance* Create(Cell* cell, const Name& name, Cell* masterCell, const Transformation& transformation, const PlacementStatus& placementstatus, bool secureFlag = true); // 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 // ********** public: bool IsUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;}; public: bool IsPlaced() const {return _placementStatus == PlacementStatus::PLACED;}; - public: bool IsFixed() const {return _placementStatus == PlacementStatus::FIXED;}; - public: bool IsTerminal() const; - public: bool IsLeaf() const; + public: bool IsFixed() const {return _placementStatus == PlacementStatus::FIXED;}; + public: bool IsTerminal() const; + public: bool IsLeaf() const; // 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 // ******** - public: virtual void Materialize(); - public: virtual void Unmaterialize(); - public: virtual void Invalidate(bool propagateFlag = true); - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Materialize(); + public: virtual void Unmaterialize(); + public: virtual void Invalidate(bool propagateFlag = true); + public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetName(const Name& name); - public: void SetTransformation(const Transformation& transformation); - public: void SetPlacementStatus(const PlacementStatus& placementstatus); - public: void SetMasterCell(Cell* masterCell, bool secureFlag = true); + public: void SetName(const Name& name); + public: void SetTransformation(const Transformation& transformation); + public: void SetPlacementStatus(const PlacementStatus& placementstatus); + public: void SetMasterCell(Cell* masterCell, bool secureFlag = true); // 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); + public: void _SetNextOfCellInstanceMap(Instance* instance) {_nextOfCellInstanceMap = instance;}; + public: void _SetNextOfCellSlaveInstanceSet(Instance* instance) {_nextOfCellSlaveInstanceSet = instance;}; }; @@ -213,8 +202,8 @@ template<> inline Record* ProxyRecord ( 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; } diff --git a/hurricane/src/hurricane/Instances.h b/hurricane/src/hurricane/Instances.h index e74f6023..227b6305 100644 --- a/hurricane/src/hurricane/Instances.h +++ b/hurricane/src/hurricane/Instances.h @@ -46,10 +46,10 @@ typedef GenericFilter InstanceFilter; #define for_each_instance(instance, instances)\ /*********************************************/\ {\ - InstanceLocator _locator = instances.GetLocator();\ - while (_locator.IsValid()) {\ - Instance* instance = _locator.GetElement();\ - _locator.Progress(); + InstanceLocator _locator = instances.getLocator();\ + while (_locator.IsValid()) {\ + Instance* instance = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Interruption.cpp b/hurricane/src/hurricane/Interruption.cpp index 755a9ac9..b9f26597 100644 --- a/hurricane/src/hurricane/Interruption.cpp +++ b/hurricane/src/hurricane/Interruption.cpp @@ -16,34 +16,34 @@ namespace Hurricane { Interruption::Interruption(const string& reason, int code) // ******************************************************* -: Inherit(), - _reason(reason), - _code(code) +: Inherit(), + _reason(reason), + _code(code) { } Interruption::Interruption(const Interruption& interruption) // ********************************************************* -: Inherit(), - _reason(interruption._reason), - _code(interruption._code) +: Inherit(), + _reason(interruption._reason), + _code(interruption._code) { } Interruption& Interruption::operator=(const Interruption& interruption) // ******************************************************************** { - _reason = interruption._reason; - _code = interruption._code; - return *this; + _reason = interruption._reason; + _code = interruption._code; + return *this; } -string Interruption::_GetString() const +string Interruption::_getString() const // ************************************ { - if (!_code) return "[INTERRUPTION] " + _reason; + if (!_code) return "[INTERRUPTION] " + _reason; - return "[INTERRUPTION:" + GetString(_code) + "] " + _reason; + return "[INTERRUPTION:" + getString(_code) + "] " + _reason; } diff --git a/hurricane/src/hurricane/Interruption.h b/hurricane/src/hurricane/Interruption.h index 8032bcc6..d4d17372 100644 --- a/hurricane/src/hurricane/Interruption.h +++ b/hurricane/src/hurricane/Interruption.h @@ -23,37 +23,37 @@ class Interruption : public Exception { // Types // ***** - public: typedef Exception Inherit; + public: typedef Exception Inherit; // Attributes // ********** - private: string _reason; - private: int _code; + private: string _reason; + private: int _code; // Constructors // ************ - public: Interruption(const string& reason, int code = 0); + public: Interruption(const string& reason, int code = 0); - public: Interruption(const Interruption& interruption); + public: Interruption(const Interruption& interruption); // Operators // ********* - public: Interruption& operator=(const Interruption& interruption); + public: Interruption& operator=(const Interruption& interruption); // 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; }; diff --git a/hurricane/src/hurricane/Interval.cpp b/hurricane/src/hurricane/Interval.cpp index 3ca73bc2..5491bc91 100644 --- a/hurricane/src/hurricane/Interval.cpp +++ b/hurricane/src/hurricane/Interval.cpp @@ -16,8 +16,8 @@ namespace Hurricane { Interval::Interval(bool makeEmpty) // ******************************* -: _vMin(1), - _vMax(-1) +: _vMin(1), + _vMax(-1) { if (!makeEmpty) { _vMin = UNIT_MIN; @@ -27,87 +27,87 @@ Interval::Interval(bool makeEmpty) Interval::Interval(const Unit& value) // ********************************** -: _vMin(value), - _vMax(value) +: _vMin(value), + _vMax(value) { } Interval::Interval(const Unit& v1, const Unit& v2) // *********************************************** -: _vMin(min(v1, v2)), - _vMax(max(v1, v2)) +: _vMin(min(v1, v2)), + _vMax(max(v1, v2)) { } Interval::Interval(const Interval& interval) // ***************************************** -: _vMin(interval._vMin), - _vMax(interval._vMax) +: _vMin(interval._vMin), + _vMax(interval._vMax) { } Interval& Interval::operator=(const Interval& interval) // **************************************************** { - _vMin = interval._vMin; - _vMax = interval._vMax; - return *this; + _vMin = interval._vMin; + _vMax = interval._vMax; + return *this; } bool Interval::operator==(const Interval& interval) const // ****************************************************** { - return !IsEmpty() && !interval.IsEmpty() && (_vMin == interval._vMin) && (_vMax == interval._vMax); + return !IsEmpty() && !interval.IsEmpty() && (_vMin == interval._vMin) && (_vMax == interval._vMax); } bool Interval::operator!=(const Interval& interval) const // ****************************************************** { - return IsEmpty() || interval.IsEmpty() || (_vMin != interval._vMin) || (_vMax != interval._vMax); + 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)); + 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(); - return Interval(max(_vMin, interval._vMin), min(_vMax, interval._vMax)); + if (!Intersect(interval)) return Interval(); + return Interval(max(_vMin, interval._vMin), min(_vMax, interval._vMax)); } bool Interval::IsEmpty() const // *************************** { - return (_vMax < _vMin); + return (_vMax < _vMin); } bool Interval::IsPonctual() const // ****************************** { - return (_vMax == _vMin); + return (_vMax == _vMin); } bool Interval::Contains(const Unit& v) const // ***************************************** { - return !IsEmpty() && (_vMin <= v) && (v <= _vMax); + return !IsEmpty() && (_vMin <= v) && (v <= _vMax); } bool Interval::Contains(const Interval& interval) const // **************************************************** { - return !IsEmpty() && !interval.IsEmpty() && (_vMin <= interval._vMin) && (interval._vMax <= _vMax); + return !IsEmpty() && !interval.IsEmpty() && (_vMin <= interval._vMin) && (interval._vMax <= _vMax); } bool Interval::Intersect(const Interval& interval) const // ***************************************************** { - return !IsEmpty() && !interval.IsEmpty() && !((_vMax < interval._vMin) || (interval._vMax < _vMin)); + return !IsEmpty() && !interval.IsEmpty() && !((_vMax < interval._vMin) || (interval._vMax < _vMin)); } bool Interval::Inferior(const Interval& interval, bool strict) const @@ -127,57 +127,57 @@ bool Interval::Superior(const Interval& interval, bool strict) const bool Interval::IsConstrainedBy(const Interval& interval) const // *********************************************************** { - return (!IsEmpty() && - !interval.IsEmpty() && - ((_vMin == interval.GetVMin()) || (_vMax == interval.GetVMax()))); + return (!IsEmpty() && + !interval.IsEmpty() && + ((_vMin == interval.getVMin()) || (_vMax == interval.getVMax()))); } Interval& Interval::MakeEmpty() // **************************** { - _vMin = 1; - _vMax = -1; - return *this; + _vMin = 1; + _vMax = -1; + return *this; } Interval& Interval::Inflate(const Unit& dv) // **************************************** { - return Inflate(dv, dv); + return Inflate(dv, dv); } Interval& Interval::Inflate(const Unit& dvMin, const Unit& dvMax) // ************************************************************** { - if (!IsEmpty()) { - _vMin -= dvMin; - _vMax += dvMax; - } - return *this; + if (!IsEmpty()) { + _vMin -= dvMin; + _vMax += dvMax; + } + return *this; } Interval& Interval::Merge(const Unit& v) // ************************************* { - if (IsEmpty()) { - _vMin = v; - _vMax = v; - } - else { - _vMin = min(_vMin, v); - _vMax = max(_vMax, v); - } - return *this; + if (IsEmpty()) { + _vMin = v; + _vMax = v; + } + else { + _vMin = min(_vMin, v); + _vMax = max(_vMax, v); + } + return *this; } Interval& Interval::Merge(const Interval& interval) // ************************************************ { - if (!interval.IsEmpty()) { - _vMin = min(_vMin, interval._vMin); - _vMax = max(_vMax, interval._vMax); - } - return *this; + if (!interval.IsEmpty()) { + _vMin = min(_vMin, interval._vMin); + _vMax = max(_vMax, interval._vMax); + } + return *this; } Interval& Interval::Intersection(const Unit& vMin, const Unit& vMax) @@ -201,26 +201,26 @@ Interval& Interval::Intersection(const Interval& interval) Interval& Interval::Translate(const Unit& dv) // ****************************************** { - if (!IsEmpty()) { - _vMin += dv; - _vMax += dv; - } - return *this; + if (!IsEmpty()) { + _vMin += dv; + _vMax += 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)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("VMin", &_vMin)); + record->Add(getSlot("VMin", &_vMax)); + return record; } diff --git a/hurricane/src/hurricane/Interval.h b/hurricane/src/hurricane/Interval.h index 6450da3b..64195dbc 100644 --- a/hurricane/src/hurricane/Interval.h +++ b/hurricane/src/hurricane/Interval.h @@ -23,68 +23,68 @@ class Interval { // Attributes // ********** - private: Unit _vMin; - private: Unit _vMax; + private: Unit _vMin; + private: Unit _vMax; // Constructors // ************ - public: Interval(bool makeEmpty=true); - public: Interval(const Unit& v); - public: Interval(const Unit& v1, const Unit& v2); - public: Interval(const Interval& interval); + public: Interval(bool makeEmpty=true); + public: Interval(const Unit& v); + public: Interval(const Unit& v1, const Unit& v2); + public: Interval(const Interval& interval); // Operators // ********* - public: Interval& operator=(const Interval& interval); + public: Interval& operator=(const Interval& interval); - public: bool operator==(const Interval& interval) const; - public: bool operator!=(const Interval& interval) const; + public: bool operator==(const Interval& interval) const; + public: bool operator!=(const Interval& interval) const; // 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 // ********** - public: bool IsEmpty() const; - public: bool IsPonctual() const; - public: bool Contains(const Unit& v) const; - public: bool Contains(const Interval& interval) const; - public: bool Intersect(const Interval& interval) const; - public: bool Inferior(const Interval& interval, bool strict=true) const; - public: bool Superior(const Interval& interval, bool strict=true) const; - public: bool IsConstrainedBy(const Interval& interval) const; + public: bool IsEmpty() const; + public: bool IsPonctual() const; + public: bool Contains(const Unit& v) const; + public: bool Contains(const Interval& interval) const; + public: bool Intersect(const Interval& interval) const; + public: bool Inferior(const Interval& interval, bool strict=true) const; + public: bool Superior(const Interval& interval, bool strict=true) const; + public: bool IsConstrainedBy(const Interval& interval) const; // Updators // ******** - public: Interval& MakeEmpty(); - public: Interval& Inflate(const Unit& dv); - public: Interval& Inflate(const Unit& dvMin, const Unit& dvMax); - public: Interval& Merge(const Unit& v); - public: Interval& Merge(const Interval& interval); - public: Interval& Intersection(const Unit& vMin, const Unit& vMax); - public: Interval& Intersection(const Interval& interval); - public: Interval& Translate(const Unit& dv); + public: Interval& MakeEmpty(); + public: Interval& Inflate(const Unit& dv); + public: Interval& Inflate(const Unit& dvMin, const Unit& dvMax); + public: Interval& Merge(const Unit& v); + public: Interval& Merge(const Interval& interval); + public: Interval& Intersection(const Unit& vMin, const Unit& vMax); + public: Interval& Intersection(const Interval& interval); + public: Interval& Translate(const Unit& dv); // 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; }; diff --git a/hurricane/src/hurricane/Intervals.h b/hurricane/src/hurricane/Intervals.h index 095c82dd..b4cc19cc 100644 --- a/hurricane/src/hurricane/Intervals.h +++ b/hurricane/src/hurricane/Intervals.h @@ -45,9 +45,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/IntrusiveMap.h b/hurricane/src/hurricane/IntrusiveMap.h index 534a08f6..56359128 100644 --- a/hurricane/src/hurricane/IntrusiveMap.h +++ b/hurricane/src/hurricane/IntrusiveMap.h @@ -26,415 +26,415 @@ template class IntrusiveMap { // Types // ***** - class Elements : public Collection { - // ***************************************** - - // Types - // ***** - - public: typedef Collection Inherit; - - public: class Locator : public Hurricane::Locator { - // ******************************************************** - - // Types - // ***** - - public: typedef Hurricane::Locator Inherit; - - // Attributes - // ********** - - private: const IntrusiveMap* _map; - private: unsigned _index; - private: Element* _element; - - // Constructors - // ************ - - public: Locator(const IntrusiveMap* map = NULL) - // ******************************************** - : Inherit(), - _map(map), - _index(0), - _element(NULL) - { - if (_map) { - unsigned length = _map->_GetLength(); - do { - _element = _map->_GetArray()[_index++]; - } while (!_element && (_index < length)); - } - }; + class Elements : public Collection { + // ***************************************** + + // Types + // ***** + + public: typedef Collection Inherit; + + public: class Locator : public Hurricane::Locator { + // ******************************************************** + + // Types + // ***** + + public: typedef Hurricane::Locator Inherit; + + // Attributes + // ********** + + private: const IntrusiveMap* _map; + private: unsigned _index; + private: Element* _element; + + // Constructors + // ************ + + public: Locator(const IntrusiveMap* map = NULL) + // ******************************************** + : Inherit(), + _map(map), + _index(0), + _element(NULL) + { + if (_map) { + unsigned length = _map->_getLength(); + do { + _element = _map->_getArray()[_index++]; + } while (!_element && (_index < length)); + } + }; - public: Locator(const Locator& locator) - // ************************************ - : Inherit(), - _map(locator._map), - _index(locator._index), - _element(locator._element) - { - }; - - // Operators - // ********* - - public: Locator& operator=(const Locator& locator) - // *********************************************** - { - _map = locator._map; - _index = locator._index; - _element = locator._element; - return *this; - }; - - // Accessors - // ********* - - public: virtual Element* GetElement() const - // **************************************** - { - return _element; - }; + public: Locator(const Locator& locator) + // ************************************ + : Inherit(), + _map(locator._map), + _index(locator._index), + _element(locator._element) + { + }; + + // Operators + // ********* + + public: Locator& operator=(const Locator& locator) + // *********************************************** + { + _map = locator._map; + _index = locator._index; + _element = locator._element; + return *this; + }; + + // Accessors + // ********* + + public: virtual Element* getElement() const + // **************************************** + { + return _element; + }; - public: virtual Hurricane::Locator* GetClone() const - // *********************************************************** - { - return new Locator(*this); - }; - - // Predicates - // ********** - - public: virtual bool IsValid() const - // ********************************* - { - return (_element != NULL); - }; - - // Updators - // ******** - - public: virtual void Progress() - // **************************** - { - if (_element) { - _element = _map->_GetNextElement(_element); - if (!_element) { - unsigned length = _map->_GetLength(); - if (_index < length) { - do { - _element = _map->_GetArray()[_index++]; - } while (!_element && (_index < length)); - } - } - } - }; - - // Others - // ****** - - public: virtual string _GetString() const - // ************************************** - { - string s = "<" + _TName("IntrusiveMap::Elements::Locator"); - if (_map) s += " " + GetString(_map); - s += ">"; - return s; - }; - - }; - - // Attributes - // ********** - - private: const IntrusiveMap* _map; - - // Constructors - // ************ - - public: Elements(const IntrusiveMap* map = NULL) - // ********************************************* - : Inherit(), - _map(map) - { - }; + public: virtual Hurricane::Locator* getClone() const + // *********************************************************** + { + return new Locator(*this); + }; + + // Predicates + // ********** + + public: virtual bool IsValid() const + // ********************************* + { + return (_element != NULL); + }; + + // Updators + // ******** + + public: virtual void Progress() + // **************************** + { + if (_element) { + _element = _map->_getNextElement(_element); + if (!_element) { + unsigned length = _map->_getLength(); + if (_index < length) { + do { + _element = _map->_getArray()[_index++]; + } while (!_element && (_index < length)); + } + } + } + }; + + // Others + // ****** + + public: virtual string _getString() const + // ************************************** + { + string s = "<" + _TName("IntrusiveMap::Elements::Locator"); + if (_map) s += " " + getString(_map); + s += ">"; + return s; + }; + + }; + + // Attributes + // ********** + + private: const IntrusiveMap* _map; + + // Constructors + // ************ + + public: Elements(const IntrusiveMap* map = NULL) + // ********************************************* + : Inherit(), + _map(map) + { + }; - public: Elements(const Elements& elements) - // *************************************** - : Inherit(), - _map(elements._map) - { - }; - - // Operators - // ********* - - public: Elements& operator=(const Elements& elements) - // ************************************************** - { - _map = elements._map; - return *this; - }; - - // Accessors - // ********* - - public: virtual Collection* GetClone() const - // *************************************************** - { - return new Elements(*this); - }; + public: Elements(const Elements& elements) + // *************************************** + : Inherit(), + _map(elements._map) + { + }; + + // Operators + // ********* + + public: Elements& operator=(const Elements& elements) + // ************************************************** + { + _map = elements._map; + return *this; + }; + + // Accessors + // ********* + + public: virtual Collection* getClone() const + // *************************************************** + { + return new Elements(*this); + }; - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************* - { - return new Locator(_map); - }; - - // Others - // ****** - - public: virtual string _GetString() const - // ************************************** - { - string s = "<" + _TName("IntrusiveMap::Elements"); - if (_map) s += " " + GetString(_map); - s += ">"; - return s; - }; - - }; + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************* + { + return new Locator(_map); + }; + + // Others + // ****** + + public: virtual string _getString() const + // ************************************** + { + string s = "<" + _TName("IntrusiveMap::Elements"); + if (_map) s += " " + getString(_map); + s += ">"; + return s; + }; + + }; // Attributes // ********** - private: unsigned _size; - private: unsigned _length; - private: Element** _array; + private: unsigned _size; + private: unsigned _length; + private: Element** _array; // Constructors // ************ - public: IntrusiveMap() - // ******************* - : _size(0), - _length(1), - _array(new Element*[1]) - { - _array[0] = NULL; - }; + public: IntrusiveMap() + // ******************* + : _size(0), + _length(1), + _array(new Element*[1]) + { + _array[0] = NULL; + }; - private: IntrusiveMap(const IntrusiveMap& map); // not implemented to forbid copy + private: IntrusiveMap(const IntrusiveMap& map); // not implemented to forbid copy // Destructor // ********** - public: virtual ~IntrusiveMap() - // **************************** - { - for (unsigned index = 0; index < _length; index++) { - Element* element = _array[index]; - while (element) { - _array[index] = _GetNextElement(element); - _SetNextElement(element, NULL); - element = _array[index]; - } - _array[index] = NULL; - } - delete[] _array; - }; + public: virtual ~IntrusiveMap() + // **************************** + { + for (unsigned index = 0; index < _length; index++) { + Element* element = _array[index]; + while (element) { + _array[index] = _getNextElement(element); + _SetNextElement(element, NULL); + element = _array[index]; + } + _array[index] = NULL; + } + delete[] _array; + }; // Operators // ********* - private: IntrusiveMap& operator=(const IntrusiveMap& map); // not implemented to forbid assignment + private: IntrusiveMap& operator=(const IntrusiveMap& map); // not implemented to forbid assignment // Accessors // ********* - public: Element* GetElement(Key key) const - // *************************************** - { - unsigned index = (_GetHashValue(key) / 8) % _length; - Element* element = _array[index]; - while (element && (_GetKey(element) != key)) element = _GetNextElement(element); - return element; - }; + public: Element* getElement(Key key) const + // *************************************** + { + unsigned index = (_getHashValue(key) / 8) % _length; + Element* element = _array[index]; + while (element && (_getKey(element) != key)) element = _getNextElement(element); + return element; + }; - public: Elements GetElements() const - // ********************************* - { - return Elements(this); - }; + public: Elements getElements() const + // ********************************* + { + return Elements(this); + }; // Predicates // ********** - public: bool IsEmpty() const - // ************************* - { - return (_size == 0); - }; + public: bool IsEmpty() const + // ************************* + { + return (_size == 0); + }; // 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 - // ************************************************************* - { - throw Error(_TName("IntrusiveMap") + "::_GetNextElement(...) : should be overrided"); - return NULL; - }; + // public: virtual Element* _getNextElement(Element* element) const = 0; // AD + public: virtual Element* _getNextElement(Element* element) const + // ************************************************************* + { + throw Error(_TName("IntrusiveMap") + "::_getNextElement(...) : should be overrided"); + return NULL; + }; - // public: virtual void _SetNextElement(Element* element, Element* nextElement) const = 0; // AD - public: virtual void _SetNextElement(Element* element, Element* nextElement) const - // ******************************************************************************* - { - throw Error(_TName("IntrusiveMap") + "::_SetNextElement(...) : should be overrided"); - }; + // public: virtual void _SetNextElement(Element* element, Element* nextElement) const = 0; // AD + public: virtual void _SetNextElement(Element* element, Element* nextElement) const + // ******************************************************************************* + { + throw Error(_TName("IntrusiveMap") + "::_SetNextElement(...) : should be overrided"); + }; // Others // ****** - public: string _GetTypeName() const - // ******************************** - { + public: string _getTypeName() const + // ******************************** + { return _TName("IntrusiveMap"); } - public: string _GetString() const - // ****************************** - { - if (IsEmpty()) - return "<" + _GetTypeName() + " empty>"; - else - return "<" + _GetTypeName() + " " + GetString(_size) + ">"; - }; + public: string _getString() const + // ****************************** + { + if (IsEmpty()) + return "<" + _getTypeName() + " empty>"; + else + return "<" + _getTypeName() + " " + getString(_size) + ">"; + }; - public: Record* _GetRecord() const - // ************************* - { - Record* record = NULL; - if (!IsEmpty()) { - record = new Record(GetString(this)); - unsigned n = 1; - for (unsigned index = 0; index < _length; index++) { - /**/ - n = 1; - /**/ - Element* element = _array[index]; - while (element) { - // record->Add(GetSlot(GetString(n++), element)); - record->Add(GetSlot(GetString(index) + ":" + GetString(n++), element)); - /**/ - element = _GetNextElement(element); - } - } - } - return record; - }; + public: Record* _getRecord() const + // ************************* + { + Record* record = NULL; + if (!IsEmpty()) { + record = new Record(getString(this)); + unsigned n = 1; + for (unsigned index = 0; index < _length; index++) { + /**/ + n = 1; + /**/ + Element* element = _array[index]; + while (element) { + // record->Add(getSlot(getString(n++), element)); + record->Add(getSlot(getString(index) + ":" + getString(n++), element)); + /**/ + element = _getNextElement(element); + } + } + } + return record; + }; - public: unsigned _GetSize() const - // ****************************** - { - return _size; - }; + public: unsigned _getSize() const + // ****************************** + { + return _size; + }; - public: unsigned _GetLength() const - // ******************************** - { - return _length; - }; + public: unsigned _getLength() const + // ******************************** + { + return _length; + }; - public: Element** _GetArray() const - // ******************************** - { - return _array; - }; + public: Element** _getArray() const + // ******************************** + { + return _array; + }; - public: bool _Contains(Element* element) const - // ******************************************* - { - unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length; - Element* currentElement = _array[index]; - while (currentElement && (currentElement != element)) - currentElement = _GetNextElement(currentElement); - return (currentElement != NULL); - }; + public: bool _Contains(Element* element) const + // ******************************************* + { + unsigned index = (_getHashValue(_getKey(element)) / 8) % _length; + Element* currentElement = _array[index]; + while (currentElement && (currentElement != element)) + currentElement = _getNextElement(currentElement); + return (currentElement != NULL); + }; - public: void _Insert(Element* element) - // *********************************** - { - if (!_Contains(element)) { - unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length; - _SetNextElement(element, _array[index]); - _array[index] = element; - _size++; - _Resize(); - } - }; + public: void _Insert(Element* element) + // *********************************** + { + if (!_Contains(element)) { + unsigned index = (_getHashValue(_getKey(element)) / 8) % _length; + _SetNextElement(element, _array[index]); + _array[index] = element; + _size++; + _Resize(); + } + }; - public: void _Remove(Element* element) - // *********************************** - { - if (_Contains(element)) { - unsigned index = (_GetHashValue(_GetKey(element)) / 8) % _length; - Element* currentElement = _array[index]; - if (currentElement) { - if (currentElement == 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)); - _SetNextElement(element, NULL); - _size--; - } - } - } - } - }; + public: void _Remove(Element* element) + // *********************************** + { + if (_Contains(element)) { + unsigned index = (_getHashValue(_getKey(element)) / 8) % _length; + Element* currentElement = _array[index]; + if (currentElement) { + if (currentElement == 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)); + _SetNextElement(element, NULL); + _size--; + } + } + } + } + }; - public: void _Resize() - // ******************* - { - unsigned newLength = _length; - double ratio = (double)_size / (double)_length; - if (ratio < 3) - newLength = max(_size / 8, (unsigned)1); - else if (10 < ratio) - newLength = min(_size / 5, (unsigned)512); + public: void _Resize() + // ******************* + { + unsigned newLength = _length; + double ratio = (double)_size / (double)_length; + if (ratio < 3) + newLength = max(_size / 8, (unsigned)1); + else if (10 < ratio) + newLength = min(_size / 5, (unsigned)512); - if (newLength != _length) { - // cerr << "Resizing: " << this << " " << _length << " " << newLength << endl; - unsigned oldLength = _length; - Element** oldArray = _array; - _length = newLength; - _array = new Element*[_length]; - memset(_array, 0, _length * sizeof(Element*)); - for (unsigned index = 0; index < oldLength; index++) { - Element* element = oldArray[index]; - while (element) { - Element* nextElement = _GetNextElement(element); - unsigned newIndex = (_GetHashValue(_GetKey(element)) / 8) % _length; - _SetNextElement(element, _array[newIndex]); - _array[newIndex] = element; - element = nextElement; - } - } - delete[] oldArray; - } - }; + if (newLength != _length) { + // cerr << "Resizing: " << this << " " << _length << " " << newLength << endl; + unsigned oldLength = _length; + Element** oldArray = _array; + _length = newLength; + _array = new Element*[_length]; + memset(_array, 0, _length * sizeof(Element*)); + for (unsigned index = 0; index < oldLength; index++) { + Element* element = oldArray[index]; + while (element) { + Element* nextElement = _getNextElement(element); + unsigned newIndex = (_getHashValue(_getKey(element)) / 8) % _length; + _SetNextElement(element, _array[newIndex]); + _array[newIndex] = element; + element = nextElement; + } + } + delete[] oldArray; + } + }; }; diff --git a/hurricane/src/hurricane/IntrusiveSet.h b/hurricane/src/hurricane/IntrusiveSet.h index 10193c7d..29738b28 100644 --- a/hurricane/src/hurricane/IntrusiveSet.h +++ b/hurricane/src/hurricane/IntrusiveSet.h @@ -26,436 +26,436 @@ template class IntrusiveSet : public NestedSlotAdapter { // Types // ***** - class Elements : public Collection { - // ***************************************** - - // Types - // ***** - - public: typedef Collection Inherit; - - public: class Locator : public Hurricane::Locator { - // ******************************************************** - - // Types - // ***** - - public: typedef Hurricane::Locator Inherit; - - // Attributes - // ********** - - private: const IntrusiveSet* _set; - private: unsigned _index; - private: Element* _element; - - // Constructors - // ************ - - public: Locator(const IntrusiveSet* set = NULL) - // ******************************************** - : Inherit(), - _set(set), - _index(0), - _element(NULL) - { - if (_set) { - unsigned length = _set->_GetLength(); - do { - _element = _set->_GetArray()[_index++]; - } while (!_element && (_index < length)); - } - }; + class Elements : public Collection { + // ***************************************** + + // Types + // ***** + + public: typedef Collection Inherit; + + public: class Locator : public Hurricane::Locator { + // ******************************************************** + + // Types + // ***** + + public: typedef Hurricane::Locator Inherit; + + // Attributes + // ********** + + private: const IntrusiveSet* _set; + private: unsigned _index; + private: Element* _element; + + // Constructors + // ************ + + public: Locator(const IntrusiveSet* set = NULL) + // ******************************************** + : Inherit(), + _set(set), + _index(0), + _element(NULL) + { + if (_set) { + unsigned length = _set->_getLength(); + do { + _element = _set->_getArray()[_index++]; + } while (!_element && (_index < length)); + } + }; - public: Locator(const Locator& locator) - // ************************************ - : Inherit(), - _set(locator._set), - _index(locator._index), - _element(locator._element) - { - }; - - // Operators - // ********* - - public: Locator& operator=(const Locator& locator) - // *********************************************** - { - _set = locator._set; - _index = locator._index; - _element = locator._element; - return *this; - }; - - // Accessors - // ********* - - public: virtual Element* GetElement() const - // **************************************** - { - return _element; - }; + public: Locator(const Locator& locator) + // ************************************ + : Inherit(), + _set(locator._set), + _index(locator._index), + _element(locator._element) + { + }; + + // Operators + // ********* + + public: Locator& operator=(const Locator& locator) + // *********************************************** + { + _set = locator._set; + _index = locator._index; + _element = locator._element; + return *this; + }; + + // Accessors + // ********* + + public: virtual Element* getElement() const + // **************************************** + { + return _element; + }; - public: virtual Hurricane::Locator* GetClone() const - // *********************************************************** - { - return new Locator(_set); - }; - - // Predicates - // ********** - - public: virtual bool IsValid() const - // ********************************* - { - return (_element != NULL); - }; - - // Updators - // ******** - - public: virtual void Progress() - // **************************** - { - if (_element) { - _element = _set->_GetNextElement(_element); - if (!_element) { - unsigned length = _set->_GetLength(); - if (_index < length) { - do { - _element = _set->_GetArray()[_index++]; - } while (!_element && (_index < length)); - } - } - } - }; - - // Others - // ****** - - public: virtual string _GetTypeName() const + public: virtual Hurricane::Locator* getClone() const + // *********************************************************** + { + return new Locator(_set); + }; + + // Predicates + // ********** + + public: virtual bool IsValid() const + // ********************************* + { + return (_element != NULL); + }; + + // Updators + // ******** + + public: virtual void Progress() + // **************************** + { + if (_element) { + _element = _set->_getNextElement(_element); + if (!_element) { + unsigned length = _set->_getLength(); + if (_index < length) { + do { + _element = _set->_getArray()[_index++]; + } while (!_element && (_index < length)); + } + } + } + }; + + // Others + // ****** + + public: virtual string _getTypeName() const // **************************************** { return _TName("IntrusiveSet::Elements::Locator"); }; - public: virtual string _GetString() const - // ************************************** - { - string s = "<" + _GetTypeName(); - if (_set) s += " " + GetString(_set); - s += ">"; - return s; - }; - - }; - - // Attributes - // ********** - - private: const IntrusiveSet* _set; - - // Constructors - // ************ - - public: Elements(const IntrusiveSet* set = NULL) - // ********************************************* - : Inherit(), - _set(set) - { - }; + public: virtual string _getString() const + // ************************************** + { + string s = "<" + _getTypeName(); + if (_set) s += " " + getString(_set); + s += ">"; + return s; + }; + + }; + + // Attributes + // ********** + + private: const IntrusiveSet* _set; + + // Constructors + // ************ + + public: Elements(const IntrusiveSet* set = NULL) + // ********************************************* + : Inherit(), + _set(set) + { + }; - public: Elements(const Elements& elements) - // *************************************** - : Inherit(), - _set(elements._set) - { - }; - - // Operators - // ********* - - public: Elements& operator=(const Elements& elements) - // ************************************************** - { - _set = elements._set; - return *this; - }; - - // Accessors - // ********* - - public: virtual Collection* GetClone() const - // *************************************************** - { - return new Elements(*this); - }; + public: Elements(const Elements& elements) + // *************************************** + : Inherit(), + _set(elements._set) + { + }; + + // Operators + // ********* + + public: Elements& operator=(const Elements& elements) + // ************************************************** + { + _set = elements._set; + return *this; + }; + + // Accessors + // ********* + + public: virtual Collection* getClone() const + // *************************************************** + { + return new Elements(*this); + }; - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************* - { - return new Locator(_set); - }; - - // Others - // ****** + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************* + { + return new Locator(_set); + }; + + // Others + // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("IntrusiveSet::Elements"); }; - - public: virtual string _GetString() const - // ************************************** - { - string s = "<" + _GetTypeName(); - if (_set) s += " " + GetString(_set); - s += ">"; - return s; - }; - - }; + + public: virtual string _getString() const + // ************************************** + { + string s = "<" + _getTypeName(); + if (_set) s += " " + getString(_set); + s += ">"; + return s; + }; + + }; // Attributes // ********** - private: unsigned _size; - private: unsigned _length; - private: Element** _array; + private: unsigned _size; + private: unsigned _length; + private: Element** _array; // Constructors // ************ - public: IntrusiveSet() - // ******************* - : _size(0), - _length(1), - _array(new Element*[1]) - { - _array[0] = NULL; - }; + public: IntrusiveSet() + // ******************* + : _size(0), + _length(1), + _array(new Element*[1]) + { + _array[0] = NULL; + }; - private: IntrusiveSet(const IntrusiveSet& set); // not implemented to forbid copy + private: IntrusiveSet(const IntrusiveSet& set); // not implemented to forbid copy // Destructor // ********** - public: virtual ~IntrusiveSet() - // **************************** - { - for (unsigned index = 0; index < _length; index++) { - Element* element = _array[index]; - while (element) { - _array[index] = _GetNextElement(element); - _SetNextElement(element, NULL); - element = _array[index]; - } - _array[index] = NULL; - } - delete[] _array; - }; + public: virtual ~IntrusiveSet() + // **************************** + { + for (unsigned index = 0; index < _length; index++) { + Element* element = _array[index]; + while (element) { + _array[index] = _getNextElement(element); + _SetNextElement(element, NULL); + element = _array[index]; + } + _array[index] = NULL; + } + delete[] _array; + }; // Operators // ********* - private: IntrusiveSet& operator=(const IntrusiveSet& set); // not implemented to forbid assignment + private: IntrusiveSet& operator=(const IntrusiveSet& set); // not implemented to forbid assignment // Accessors // ********* - public: Elements GetElements() const - // ********************************* - { - return Elements(this); - }; + public: Elements getElements() const + // ********************************* + { + return Elements(this); + }; // Predicates // ********** - public: bool IsEmpty() const - // ************************* - { - return (_size == 0); - }; + public: bool IsEmpty() const + // ************************* + { + return (_size == 0); + }; // 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 - // ************************************************************* - { - throw Error(_TName("IntrusiveSet") + "::_GetNextElement(...) : should be overrided"); - return NULL; - }; + // public: virtual Element* _getNextElement(Element* element) const = 0; // AD + public: virtual Element* _getNextElement(Element* element) const + // ************************************************************* + { + throw Error(_TName("IntrusiveSet") + "::_getNextElement(...) : should be overrided"); + return NULL; + }; - // public: virtual void _SetNextElement(Element* element, Element* nextElement) const = 0; // AD - public: virtual void _SetNextElement(Element* element, Element* nextElement) const - // ******************************************************************************* - { - throw Error(_TName("IntrusiveSet") + "::_SetNextElement(...) : should be overrided"); - }; + // public: virtual void _SetNextElement(Element* element, Element* nextElement) const = 0; // AD + public: virtual void _SetNextElement(Element* element, Element* nextElement) const + // ******************************************************************************* + { + throw Error(_TName("IntrusiveSet") + "::_SetNextElement(...) : should be overrided"); + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("InstrusiveSet"); }; - public: string _GetString() const - // ****************************** - { - if (IsEmpty()) - return "<" + _GetTypeName() + " empty>"; - else - return "<" + _GetTypeName() + " " + GetString(_size) + ">"; - }; + public: string _getString() const + // ****************************** + { + if (IsEmpty()) + return "<" + _getTypeName() + " empty>"; + else + return "<" + _getTypeName() + " " + getString(_size) + ">"; + }; - public: Record* _GetRecord() const - // ************************* - { - Record* record = NULL; - if (!IsEmpty()) { - record = new Record(GetString(this)); - unsigned n = 1; - for (unsigned index = 0; index < _length; index++) { - /**/ - n = 1; - /**/ - Element* element = _array[index]; - while (element) { - // record->Add(GetSlot(GetString(n++), element)); - record->Add(GetSlot(GetString(index) + ":" + GetString(n++), element)); - /**/ - element = _GetNextElement(element); - } - } - } - return record; - }; + public: Record* _getRecord() const + // ************************* + { + Record* record = NULL; + if (!IsEmpty()) { + record = new Record(getString(this)); + unsigned n = 1; + for (unsigned index = 0; index < _length; index++) { + /**/ + n = 1; + /**/ + Element* element = _array[index]; + while (element) { + // record->Add(getSlot(getString(n++), element)); + record->Add(getSlot(getString(index) + ":" + getString(n++), element)); + /**/ + element = _getNextElement(element); + } + } + } + return record; + }; - public: unsigned _GetSize() const - // ****************************** - { - return _size; - }; + public: unsigned _getSize() const + // ****************************** + { + return _size; + }; - public: unsigned _GetLength() const - // ******************************** - { - return _length; - }; + public: unsigned _getLength() const + // ******************************** + { + return _length; + }; - public: Element** _GetArray() const - // ******************************** - { - return _array; - }; + public: Element** _getArray() const + // ******************************** + { + return _array; + }; - public: bool _Contains(Element* element) const - // ******************************************* - { - unsigned index = (_GetHashValue(element) / 8) % _length; - Element* currentElement = _array[index]; - while (currentElement && (currentElement != element)) - currentElement = _GetNextElement(currentElement); - return (currentElement != NULL); - }; + public: bool _Contains(Element* element) const + // ******************************************* + { + unsigned index = (_getHashValue(element) / 8) % _length; + Element* currentElement = _array[index]; + while (currentElement && (currentElement != element)) + currentElement = _getNextElement(currentElement); + return (currentElement != NULL); + }; - public: void _Insert(Element* element) - // *********************************** - { - if (!_Contains(element)) { - unsigned index = (_GetHashValue(element) / 8) % _length; - _SetNextElement(element, _array[index]); - _array[index] = element; - _size++; - _Resize(); - } - }; + public: void _Insert(Element* element) + // *********************************** + { + if (!_Contains(element)) { + unsigned index = (_getHashValue(element) / 8) % _length; + _SetNextElement(element, _array[index]); + _array[index] = element; + _size++; + _Resize(); + } + }; - public: void _Remove(Element* element) - // *********************************** - { - if (_Contains(element)) { - unsigned index = (_GetHashValue(element) / 8) % _length; - Element* currentElement = _array[index]; - if (currentElement) { - if (currentElement == 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)); - _SetNextElement(element, NULL); - _size--; - } - } - } - } - }; + public: void _Remove(Element* element) + // *********************************** + { + if (_Contains(element)) { + unsigned index = (_getHashValue(element) / 8) % _length; + Element* currentElement = _array[index]; + if (currentElement) { + if (currentElement == 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)); + _SetNextElement(element, NULL); + _size--; + } + } + } + } + }; - public: void _Resize() - // ******************* - { - unsigned newLength = _length; - double ratio = (double)_size / (double)_length; - if (ratio < 3) - newLength = max(_size / 8, (unsigned)1); - else if (10 < ratio) - newLength = min(_size / 5, (unsigned)512); + public: void _Resize() + // ******************* + { + unsigned newLength = _length; + double ratio = (double)_size / (double)_length; + if (ratio < 3) + newLength = max(_size / 8, (unsigned)1); + else if (10 < ratio) + newLength = min(_size / 5, (unsigned)512); - if (newLength != _length) { - // cerr << "Resizing: " << this << " " << _length << " " << newLength << endl; - unsigned oldLength = _length; - Element** oldArray = _array; - _length = newLength; - _array = new Element*[_length]; - memset(_array, 0, _length * sizeof(Element*)); - for (unsigned index = 0; index < oldLength; index++) { - Element* element = oldArray[index]; - while (element) { - Element* nextElement = _GetNextElement(element); - unsigned newIndex = (_GetHashValue(element) / 8) % _length; - _SetNextElement(element, _array[newIndex]); - _array[newIndex] = element; - element = nextElement; - } - } - delete[] oldArray; - } - }; + if (newLength != _length) { + // cerr << "Resizing: " << this << " " << _length << " " << newLength << endl; + unsigned oldLength = _length; + Element** oldArray = _array; + _length = newLength; + _array = new Element*[_length]; + memset(_array, 0, _length * sizeof(Element*)); + for (unsigned index = 0; index < oldLength; index++) { + Element* element = oldArray[index]; + while (element) { + Element* nextElement = _getNextElement(element); + unsigned newIndex = (_getHashValue(element) / 8) % _length; + _SetNextElement(element, _array[newIndex]); + _array[newIndex] = element; + element = nextElement; + } + } + delete[] oldArray; + } + }; - public: void _Clear() - // ****************** - { - for (unsigned index = 0; index < _length; index++) { - Element* element = _array[index]; - while (element) { - _array[index] = _GetNextElement(element); - _SetNextElement(element, NULL); - element = _array[index]; - } - _array[index] = NULL; - } - delete[] _array; + public: void _Clear() + // ****************** + { + for (unsigned index = 0; index < _length; index++) { + Element* element = _array[index]; + while (element) { + _array[index] = _getNextElement(element); + _SetNextElement(element, NULL); + element = _array[index]; + } + _array[index] = NULL; + } + delete[] _array; - _size = 0; - _length = 1; - _array = new Element*[1]; - _array[0] = NULL; - }; + _size = 0; + _length = 1; + _array = new Element*[1]; + _array[0] = NULL; + }; }; diff --git a/hurricane/src/hurricane/Layer.cpp b/hurricane/src/hurricane/Layer.cpp index dfd972b2..b34cae7e 100644 --- a/hurricane/src/hurricane/Layer.cpp +++ b/hurricane/src/hurricane/Layer.cpp @@ -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; } diff --git a/hurricane/src/hurricane/Layer.h b/hurricane/src/hurricane/Layer.h index 370dc120..aa09974f 100644 --- a/hurricane/src/hurricane/Layer.h +++ b/hurricane/src/hurricane/Layer.h @@ -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;}; diff --git a/hurricane/src/hurricane/Layers.h b/hurricane/src/hurricane/Layers.h index c4cd4a04..62b88172 100644 --- a/hurricane/src/hurricane/Layers.h +++ b/hurricane/src/hurricane/Layers.h @@ -46,10 +46,10 @@ typedef GenericFilter LayerFilter; #define for_each_layer(layer, layers)\ /************************************/\ {\ - LayerLocator _locator = layers.GetLocator();\ - while (_locator.IsValid()) {\ - Layer* layer = _locator.GetElement();\ - _locator.Progress(); + LayerLocator _locator = layers.getLocator();\ + while (_locator.IsValid()) {\ + Layer* layer = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Libraries.h b/hurricane/src/hurricane/Libraries.h index 33e92532..6aaba5ed 100644 --- a/hurricane/src/hurricane/Libraries.h +++ b/hurricane/src/hurricane/Libraries.h @@ -46,10 +46,10 @@ typedef GenericFilter LibraryFilter; #define for_each_library(library, libraries)\ /*******************************************/\ {\ - LibraryLocator _locator = libraries.GetLocator();\ - while (_locator.IsValid()) {\ - Library* library = _locator.GetElement();\ - _locator.Progress(); + LibraryLocator _locator = libraries.getLocator();\ + while (_locator.IsValid()) {\ + Library* library = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Library.cpp b/hurricane/src/hurricane/Library.cpp index 622c65dc..4d54b179 100644 --- a/hurricane/src/hurricane/Library.cpp +++ b/hurricane/src/hurricane/Library.cpp @@ -20,115 +20,115 @@ namespace Hurricane { Library::Library(DataBase* dataBase, Library* library, const Name& name) // ********************************************************************* -: Inherit(), - _dataBase(dataBase), - _library(library), - _name(name), - _libraryMap(), - _cellMap(), - _nextOfLibraryLibraryMap(NULL) +: Inherit(), + _dataBase(dataBase), + _library(library), + _name(name), + _libraryMap(), + _cellMap(), + _nextOfLibraryLibraryMap(NULL) { - if (!_dataBase) - throw Error("Can't create " + _TName("Library") + " : null data base"); + if (!_dataBase) + throw Error("Can't create " + _TName("Library") + " : null data base"); - if (name.IsEmpty()) - throw Error("Can't create " + _TName("Library") + " : empty name"); + if (name.IsEmpty()) + throw Error("Can't create " + _TName("Library") + " : empty name"); - if (!_library) { - if (_dataBase->GetRootLibrary()) - throw Error("Can't create " + _TName("Library") + " : root library already exists"); - } - else { - if (_library->GetLibrary(_name)) - throw Error("Can't create " + _TName("Library") + " : already exists"); - } + if (!_library) { + if (_dataBase->getRootLibrary()) + throw Error("Can't create " + _TName("Library") + " : root library already exists"); + } + else { + if (_library->getLibrary(_name)) + throw Error("Can't create " + _TName("Library") + " : already exists"); + } } Library* Library::Create(DataBase* dataBase, const Name& name) // *********************************************************** { - Library* library = new Library(dataBase, NULL, name); + Library* library = new Library(dataBase, NULL, name); - library->_PostCreate(); + library->_postCreate(); - return library; + return library; } Library* Library::Create(Library* library, const Name& name) // ********************************************************* { - if (!library) - throw Error("Can't create " + _TName("Library") + " : null library"); + 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; + return library; } void Library::SetName(const Name& name) // ************************************ { - if (name != _name) { - if (name.IsEmpty()) - throw Error("Can't change library name : empty name"); + if (name != _name) { + if (name.IsEmpty()) + throw Error("Can't change library name : empty name"); - if (_library && _library->GetLibrary(name)) - throw Error("Can't change library name : already exists"); + if (_library && _library->getLibrary(name)) + throw Error("Can't change library name : already exists"); - if (_library) _library->_GetLibraryMap()._Remove(this); - _name = name; - if (_library) _library->_GetLibraryMap()._Insert(this); - } + if (_library) _library->_getLibraryMap()._Remove(this); + _name = name; + if (_library) _library->_getLibraryMap()._Insert(this); + } } -void Library::_PostCreate() +void Library::_postCreate() // ************************ { - if (!_library) - _dataBase->_SetRootLibrary(this); - else - _library->_GetLibraryMap()._Insert(this); + if (!_library) + _dataBase->_SetRootLibrary(this); + else + _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); + if (!_library) + _dataBase->_SetRootLibrary(NULL); + else + _library->_getLibraryMap()._Remove(this); } -string Library::_GetString() const +string Library::_getString() const // ******************************* { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " "); - s.insert(s.length() - 1, GetString(_name)); - return s; + string s = Inherit::_getString(); + s.insert(s.length() - 1, " "); + s.insert(s.length() - 1, getString(_name)); + return s; } -Record* Library::_GetRecord() const +Record* Library::_getRecord() const // ************************** { - 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)); - } - return record; + 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)); + } + return record; } // **************************************************************************************************** @@ -137,32 +137,32 @@ Record* Library::_GetRecord() const Library::LibraryMap::LibraryMap() // ****************************** -: Inherit() +: Inherit() { } -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 // ************************************************************************************ { - library->_SetNextOfLibraryLibraryMap(nextLibrary); + library->_SetNextOfLibraryLibraryMap(nextLibrary); }; @@ -173,32 +173,32 @@ void Library::LibraryMap::_SetNextElement(Library* library, Library* nextLibrary Library::CellMap::CellMap() // ************************ -: Inherit() +: Inherit() { } -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 // ********************************************************************* { - cell->_SetNextOfLibraryCellMap(nextCell); + cell->_SetNextOfLibraryCellMap(nextCell); }; diff --git a/hurricane/src/hurricane/Library.h b/hurricane/src/hurricane/Library.h index 5e915857..2adc1e7f 100644 --- a/hurricane/src/hurricane/Library.h +++ b/hurricane/src/hurricane/Library.h @@ -28,85 +28,85 @@ class Library : public DBo { // Types // ***** - public: typedef DBo Inherit; + public: typedef DBo Inherit; - public: class LibraryMap : public IntrusiveMap { - // ********************************************************** + public: class LibraryMap : public IntrusiveMap { + // ********************************************************** - public: typedef IntrusiveMap Inherit; - - public: LibraryMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(Library* library, Library* nextLibrary) 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; - }; + }; - public: class CellMap : public IntrusiveMap { - // **************************************************** + public: class CellMap : public IntrusiveMap { + // **************************************************** - public: typedef IntrusiveMap Inherit; - - public: CellMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(Cell* cell, Cell* nextCell) 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; - }; + }; // Attributes // ********** - private: DataBase* _dataBase; - private: Library* _library; - private: Name _name; - private: LibraryMap _libraryMap; - private: CellMap _cellMap; - private: Library* _nextOfLibraryLibraryMap; + private: DataBase* _dataBase; + private: Library* _library; + private: Name _name; + private: LibraryMap _libraryMap; + private: CellMap _cellMap; + private: Library* _nextOfLibraryLibraryMap; // Constructors // ************ - protected: Library(DataBase* dataBase, Library* library, const Name& name); + protected: Library(DataBase* dataBase, Library* library, const Name& name); - public: static Library* Create(DataBase* dataBase, const Name& name); - public: static Library* Create(Library* library, const Name& name); + public: static Library* Create(DataBase* dataBase, const Name& name); + public: static Library* Create(Library* library, const Name& name); // 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 // ******** - public: void SetName(const Name& name); + public: void SetName(const Name& name); // 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;}; + public: void _SetNextOfLibraryLibraryMap(Library* library) {_nextOfLibraryLibraryMap = library;}; }; diff --git a/hurricane/src/hurricane/ListCollection.h b/hurricane/src/hurricane/ListCollection.h index ef6f7a13..674f0b24 100644 --- a/hurricane/src/hurricane/ListCollection.h +++ b/hurricane/src/hurricane/ListCollection.h @@ -23,151 +23,151 @@ template class ListCollection : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: typedef list ElementList; + public: typedef list ElementList; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const ElementList* _elementList; - private: typename ElementList::const_iterator _iterator; // AD + private: const ElementList* _elementList; + private: typename ElementList::const_iterator _iterator; // AD - public: Locator(const ElementList* elementList) - // ******************************************** - : Inherit(), - _elementList(elementList), - _iterator() - { - if (_elementList) _iterator = _elementList->begin(); - }; + public: Locator(const ElementList* elementList) + // ******************************************** + : Inherit(), + _elementList(elementList), + _iterator() + { + if (_elementList) _iterator = _elementList->begin(); + }; - public: virtual Element GetElement() const - // *************************************** - { - return (IsValid()) ? *_iterator : Element(); - }; + public: virtual Element getElement() const + // *************************************** + { + return (IsValid()) ? *_iterator : Element(); + }; - public: virtual Hurricane::Locator* GetClone() const - // ********************************************************** - { - return new Locator(_elementList); - }; + public: virtual Hurricane::Locator* getClone() const + // ********************************************************** + { + return new Locator(_elementList); + }; - public: virtual bool IsValid() const - // ********************************* - { - return (_elementList && (_iterator != _elementList->end())); - }; + public: virtual bool IsValid() const + // ********************************* + { + return (_elementList && (_iterator != _elementList->end())); + }; - public: virtual void Progress() - // **************************** - { - ++_iterator; - }; + public: virtual void Progress() + // **************************** + { + ++_iterator; + }; - }; + }; // Attributes // ********** - private: const ElementList* _elementList; + private: const ElementList* _elementList; // Constructors // ************ - public: ListCollection(const ElementList* elementList = NULL) - // ********************************************************** - : Inherit(), - _elementList(elementList) - { - }; + public: ListCollection(const ElementList* elementList = NULL) + // ********************************************************** + : Inherit(), + _elementList(elementList) + { + }; - public: ListCollection(const ElementList& elementList) - // *************************************************** - : Inherit(), - _elementList(&elementList) - { - }; + public: ListCollection(const ElementList& elementList) + // *************************************************** + : Inherit(), + _elementList(&elementList) + { + }; - public: ListCollection(const ListCollection& listCollection) - // ********************************************************* - : Inherit(), - _elementList(listCollection._elementList) - { - }; + public: ListCollection(const ListCollection& listCollection) + // ********************************************************* + : Inherit(), + _elementList(listCollection._elementList) + { + }; // Operators // ********* - public: ListCollection& operator=(const ListCollection& listCollection) - // ******************************************************************** - { - _elementList = listCollection._elementList; - return *this; - }; + public: ListCollection& operator=(const ListCollection& listCollection) + // ******************************************************************** + { + _elementList = listCollection._elementList; + return *this; + }; // Accessors // ********* - public: virtual Collection* GetClone() const - // ************************************************** - { - return new ListCollection(*this); - } + public: virtual Collection* getClone() const + // ************************************************** + { + return new ListCollection(*this); + } - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************ - { - // return (_elementList) ? new Locator(_elementList) : NULL; - // V3 - return (_elementList) ? new Locator(_elementList) : NULL; - } + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************ + { + // return (_elementList) ? new Locator(_elementList) : NULL; + // V3 + return (_elementList) ? new Locator(_elementList) : NULL; + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_elementList) ? _elementList->size() : 0; - }; + public: virtual unsigned getSize() const + // ************************************* + { + return (_elementList) ? _elementList->size() : 0; + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("ListCollection"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!_elementList) - return "<" + _GetTypeName() + " unbound>"; - else { - if (_elementList->empty()) - return "<" + _GetTypeName() + " empty>"; - else - return "<" + _GetTypeName() + " " + GetString(_elementList->size()) + ">"; - } - }; + public: virtual string _getString() const + // ************************************** + { + if (!_elementList) + return "<" + _getTypeName() + " unbound>"; + else { + if (_elementList->empty()) + return "<" + _getTypeName() + " empty>"; + else + return "<" + _getTypeName() + " " + getString(_elementList->size()) + ">"; + } + }; - public: Record* _GetRecord() const + public: Record* _getRecord() const // ************************* { Record* record = NULL; if (!_elementList->empty()) { - record = new Record(_GetString()); - unsigned n = 1; - typename list::const_iterator iterator = _elementList->begin(); // AD - while (iterator != _elementList->end()) { - string slotName = GetString(n++); + record = new Record(_getString()); + unsigned n = 1; + typename list::const_iterator iterator = _elementList->begin(); // AD + while (iterator != _elementList->end()) { + string slotName = getString(n++); Element slotObject = *iterator; - record->Add(GetSlot(slotName, slotObject)); + record->Add(getSlot(slotName, slotObject)); ++iterator; - } + } } return record; } @@ -181,17 +181,17 @@ template class ListCollection : public Collection { // **************************************************************************************************** template - inline GenericCollection GetCollection(const list& elementList) + inline GenericCollection getCollection(const list& elementList) // ********************************************************************************* { - return ListCollection(elementList); + return ListCollection(elementList); } template - inline GenericCollection GetCollection(const list* elementList) + inline GenericCollection getCollection(const list* elementList) // ********************************************************************************* { - return ListCollection(elementList); + return ListCollection(elementList); } diff --git a/hurricane/src/hurricane/Locator.h b/hurricane/src/hurricane/Locator.h index 7dc73683..65e096bc 100644 --- a/hurricane/src/hurricane/Locator.h +++ b/hurricane/src/hurricane/Locator.h @@ -24,71 +24,71 @@ template class Locator : public NestedSlotAdapter { // Constructors // ************ - protected: Locator() - // ***************** - { - }; + protected: Locator() + // ***************** + { + }; - private: Locator(const Locator& locator); - // ******************************************* - // not implemented to forbid copy construction - // ******************************************* + private: Locator(const Locator& locator); + // ******************************************* + // not implemented to forbid copy construction + // ******************************************* // Destructor // ********** - public: virtual ~Locator() - // *********************** - { - }; + public: virtual ~Locator() + // *********************** + { + }; // Operators // ********* - private: Locator& operator=(const Locator& locator); - // ************************************************* - // not implemented to forbid assignment - // ************************************************* + private: Locator& operator=(const Locator& locator); + // ************************************************* + // not implemented to forbid assignment + // ************************************************* // Accessors // ********* - public: virtual Type GetElement() const = 0; - public: virtual Locator* GetClone() const = 0; + public: virtual Type getElement() const = 0; + public: virtual Locator* getClone() const = 0; - public: virtual Locator* GetLocator() // 21-10-2003 - // **************************************** - { - return ( this ); - } + public: virtual Locator* getLocator() // 21-10-2003 + // **************************************** + { + return ( this ); + } // Predicates // ********** - public: virtual bool IsValid() const = 0; + public: virtual bool IsValid() const = 0; // Updators // ******** - public: virtual void Progress() = 0; + public: virtual void Progress() = 0; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("Locator"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!IsValid()) - return "<" + _GetTypeName() + " invalid>"; - else - return "<" + _GetTypeName() + " " + GetString(GetElement()) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + if (!IsValid()) + return "<" + _getTypeName() + " invalid>"; + else + return "<" + _getTypeName() + " " + getString(getElement()) + ">"; + }; }; @@ -104,141 +104,141 @@ template class GenericLocator : public Locator { // Types // ***** - public: typedef Locator Inherit; + public: typedef Locator Inherit; // Attributes // ********** - private: Locator* _locator; + private: Locator* _locator; // Constructors // ************ - public: GenericLocator() - // ********************* - : Inherit(), - _locator(NULL) - { - }; + public: GenericLocator() + // ********************* + : Inherit(), + _locator(NULL) + { + }; - public: GenericLocator(const Locator& locator) - // ************************************************* - : Inherit(), - _locator(locator.GetClone()) - { - }; + public: GenericLocator(const Locator& locator) + // ************************************************* + : Inherit(), + _locator(locator.getClone()) + { + }; - public: GenericLocator(const GenericLocator& genericLocator) - // ********************************************************* - : Inherit(), - _locator(genericLocator.GetClone()) - { - }; + public: GenericLocator(const GenericLocator& genericLocator) + // ********************************************************* + : Inherit(), + _locator(genericLocator.getClone()) + { + }; - public: GenericLocator(Locator* locator) - // ******************************************************* - // CAUTION : locator will be deleted by the GenericLocator - // ******************************************************* - : Inherit(), - _locator(locator) - { - }; + public: GenericLocator(Locator* locator) + // ******************************************************* + // CAUTION : locator will be deleted by the GenericLocator + // ******************************************************* + : Inherit(), + _locator(locator) + { + }; // Destructor // ********** - public: virtual ~GenericLocator() - // ****************************** - { - if (_locator) delete _locator; - }; + public: virtual ~GenericLocator() + // ****************************** + { + if (_locator) delete _locator; + }; // Operators // ********* - public: GenericLocator& operator=(const Locator& locator) - // ************************************************************ - { - if (_locator) delete _locator; - _locator = locator.GetClone(); - return *this; - }; + public: GenericLocator& operator=(const Locator& locator) + // ************************************************************ + { + if (_locator) delete _locator; + _locator = locator.getClone(); + return *this; + }; - public: GenericLocator& operator=(const GenericLocator& genericLocator) - // ******************************************************************** - { - if (_locator) delete _locator; - _locator = genericLocator.GetClone(); - return *this; - }; + public: GenericLocator& operator=(const GenericLocator& genericLocator) + // ******************************************************************** + { + if (_locator) delete _locator; + _locator = genericLocator.getClone(); + return *this; + }; - public: GenericLocator& operator=(Locator* locator) - // ******************************************************* - // CAUTION : locator will be deleted by the GenericLocator - // ******************************************************* - { - if (_locator) delete _locator; - _locator = locator; - return *this; - }; + public: GenericLocator& operator=(Locator* locator) + // ******************************************************* + // CAUTION : locator will be deleted by the GenericLocator + // ******************************************************* + { + if (_locator) delete _locator; + _locator = locator; + return *this; + }; // Accessors // ********* - public: virtual Type GetElement() const - // ************************************ - { - return ((_locator) ? _locator->GetElement() : Type()); - }; + public: virtual Type getElement() const + // ************************************ + { + return ((_locator) ? _locator->getElement() : Type()); + }; - public: virtual Locator* GetClone() const - // ******************************************** - { - return ((_locator) ? _locator->GetClone() : NULL); - }; + public: virtual Locator* getClone() const + // ******************************************** + { + return ((_locator) ? _locator->getClone() : NULL); + }; - public: virtual Locator* GetLocator() // 21-10-2003 - // **************************************** - { - return ( _locator->GetLocator () ); - } + public: virtual Locator* getLocator() // 21-10-2003 + // **************************************** + { + return ( _locator->getLocator () ); + } // Predicates // ********** - public: virtual bool IsValid() const - // ********************************* - { - return (_locator && _locator->IsValid()); - }; + public: virtual bool IsValid() const + // ********************************* + { + return (_locator && _locator->IsValid()); + }; // Updators // ******** - public: virtual void Progress() - // **************************** - { - if (_locator) _locator->Progress(); - }; + public: virtual void Progress() + // **************************** + { + if (_locator) _locator->Progress(); + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("GenericLocator"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!_locator) - return "<" + _GetTypeName() + " unbound>"; - else - return "<" + _GetTypeName() + " " + GetString(_locator) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + if (!_locator) + return "<" + _getTypeName() + " unbound>"; + else + return "<" + _getTypeName() + " " + getString(_locator) + ">"; + }; }; diff --git a/hurricane/src/hurricane/Marker.cpp b/hurricane/src/hurricane/Marker.cpp index 6440e9ab..5f5aec79 100644 --- a/hurricane/src/hurricane/Marker.cpp +++ b/hurricane/src/hurricane/Marker.cpp @@ -20,66 +20,66 @@ namespace Hurricane { Marker::Marker(Cell* cell) // *********************** : Inherit(), - _cell(cell), - _nextOfCellMarkerSet(NULL) + _cell(cell), + _nextOfCellMarkerSet(NULL) { - if (!_cell) - throw Error("Can't create " + _TName("Marker") + " : null cell"); + if (!_cell) + throw Error("Can't create " + _TName("Marker") + " : null cell"); } void Marker::Materialize() // *********************** { - if (!IsMaterialized()) { - Cell* cell = GetCell(); - QuadTree* quadTree = cell->_GetQuadTree(); - quadTree->Insert(this); - cell->_Fit(quadTree->GetBoundingBox()); - } + if (!IsMaterialized()) { + Cell* cell = getCell(); + QuadTree* quadTree = cell->_getQuadTree(); + quadTree->Insert(this); + cell->_Fit(quadTree->getBoundingBox()); + } } void Marker::Unmaterialize() // ************************* { - if (IsMaterialized()) { - Cell* cell = GetCell(); - cell->_Unfit(GetBoundingBox()); - cell->_GetQuadTree()->Remove(this); - } + if (IsMaterialized()) { + 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())); - return s; + 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(); - if (record) { - record->Add(GetSlot("Cell", _cell)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Cell", _cell)); + } + return record; } diff --git a/hurricane/src/hurricane/Marker.h b/hurricane/src/hurricane/Marker.h index 82e753a6..0c2a7d99 100644 --- a/hurricane/src/hurricane/Marker.h +++ b/hurricane/src/hurricane/Marker.h @@ -23,44 +23,44 @@ class Marker : public Go { // Types // ***** - public: typedef Go Inherit; + public: typedef Go Inherit; // Attributes // ********** - private: Cell* _cell; - private: Marker* _nextOfCellMarkerSet; + private: Cell* _cell; + private: Marker* _nextOfCellMarkerSet; // Constructors // ************ - protected: Marker(Cell* cell); + protected: Marker(Cell* cell); // 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 // ******** - public: virtual void Materialize(); - public: virtual void Unmaterialize(); + public: virtual void Materialize(); + public: virtual void Unmaterialize(); // 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;}; + public: void _SetNextOfCellMarkerSet(Marker* marker) {_nextOfCellMarkerSet = marker;}; }; diff --git a/hurricane/src/hurricane/Markers.h b/hurricane/src/hurricane/Markers.h index 4fdd6143..0a4c216d 100644 --- a/hurricane/src/hurricane/Markers.h +++ b/hurricane/src/hurricane/Markers.h @@ -46,10 +46,10 @@ typedef GenericFilter MarkerFilter; #define for_each_marker(marker, markers)\ /***************************************/\ {\ - MarkerLocator _locator = markers.GetLocator();\ - while (_locator.IsValid()) {\ - Marker* marker = _locator.GetElement();\ - _locator.Progress(); + MarkerLocator _locator = markers.getLocator();\ + while (_locator.IsValid()) {\ + Marker* marker = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/MultisetCollection.h b/hurricane/src/hurricane/MultisetCollection.h index 78c2ebe1..dc4a61df 100644 --- a/hurricane/src/hurricane/MultisetCollection.h +++ b/hurricane/src/hurricane/MultisetCollection.h @@ -23,149 +23,149 @@ namespace Hurricane { // **************************************************************************************************** template > - class MultisetCollection : public Collection { + class MultisetCollection : public Collection { // ************************************************ // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: typedef multiset ElementMultiset; + public: typedef multiset ElementMultiset; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const ElementMultiset* _elementMultiset; - private: typename ElementMultiset::const_iterator _iterator; // AD + private: const ElementMultiset* _elementMultiset; + private: typename ElementMultiset::const_iterator _iterator; // AD - public: Locator(const ElementMultiset* elementMultiset) - // ****************************************** - : Inherit(), - _elementMultiset(elementMultiset), - _iterator() - { - if (_elementMultiset) _iterator = _elementMultiset->begin(); - }; + public: Locator(const ElementMultiset* elementMultiset) + // ****************************************** + : Inherit(), + _elementMultiset(elementMultiset), + _iterator() + { + if (_elementMultiset) _iterator = _elementMultiset->begin(); + }; - public: virtual Element GetElement() const - // *************************************** - { - return (IsValid()) ? *_iterator : Element(); - }; + public: virtual Element getElement() const + // *************************************** + { + return (IsValid()) ? *_iterator : Element(); + }; - public: virtual Hurricane::Locator* GetClone() const - // ********************************************************** - { - return new Locator(_elementMultiset); - }; + public: virtual Hurricane::Locator* getClone() const + // ********************************************************** + { + return new Locator(_elementMultiset); + }; - public: virtual bool IsValid() const - // ********************************* - { - return (_elementMultiset && (_iterator != _elementMultiset->end())); - }; + public: virtual bool IsValid() const + // ********************************* + { + return (_elementMultiset && (_iterator != _elementMultiset->end())); + }; - public: virtual void Progress() - // **************************** - { - ++_iterator; - }; + public: virtual void Progress() + // **************************** + { + ++_iterator; + }; - }; + }; // Attributes // ********** - private: const ElementMultiset* _elementMultiset; + private: const ElementMultiset* _elementMultiset; // Constructors // ************ - public: MultisetCollection(const ElementMultiset* elementMultiset = NULL) - // ******************************************************* - : Inherit(), - _elementMultiset(elementMultiset) - { - }; + public: MultisetCollection(const ElementMultiset* elementMultiset = NULL) + // ******************************************************* + : Inherit(), + _elementMultiset(elementMultiset) + { + }; - public: MultisetCollection(const ElementMultiset& elementMultiset) - // ************************************************ - : Inherit(), - _elementMultiset(&elementMultiset) - { - }; + public: MultisetCollection(const ElementMultiset& elementMultiset) + // ************************************************ + : Inherit(), + _elementMultiset(&elementMultiset) + { + }; - public: MultisetCollection(const MultisetCollection& multisetCollection) - // ****************************************************** - : Inherit(), - _elementMultiset(multisetCollection._elementMultiset) - { - }; + public: MultisetCollection(const MultisetCollection& multisetCollection) + // ****************************************************** + : Inherit(), + _elementMultiset(multisetCollection._elementMultiset) + { + }; // Operators // ********* - public: MultisetCollection& operator=(const MultisetCollection& multisetCollection) - // ***************************************************************** - { - _elementMultiset = multisetCollection._elementMultiset; - return *this; - }; + public: MultisetCollection& operator=(const MultisetCollection& multisetCollection) + // ***************************************************************** + { + _elementMultiset = multisetCollection._elementMultiset; + return *this; + }; // Accessors // ********* - public: virtual Collection* GetClone() const - // ************************************************** - { - return new MultisetCollection(*this); - } + public: virtual Collection* getClone() const + // ************************************************** + { + return new MultisetCollection(*this); + } - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************ - { - // return (_elementMultiset) ? new Locator(_elementMultiset) : NULL; - // V3 - return (_elementMultiset) ? new Locator(_elementMultiset) : NULL; - } + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************ + { + // return (_elementMultiset) ? new Locator(_elementMultiset) : NULL; + // V3 + return (_elementMultiset) ? new Locator(_elementMultiset) : NULL; + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_elementMultiset) ? _elementMultiset->size() : 0; - }; + public: virtual unsigned getSize() const + // ************************************* + { + return (_elementMultiset) ? _elementMultiset->size() : 0; + }; // Others // ****** - public: virtual string _GetString() const - // ************************************** - { - if (!_elementMultiset) - return "<" + _TName("MultisetCollection") + " unbounnd>"; - else { - if (_elementMultiset->empty()) - return "<" + _TName("MultisetCollection") + " empty>"; - else - return "<" + _TName("MultisetCollection") + " " + GetString(_elementMultiset->size()) + ">"; - } - }; + public: virtual string _getString() const + // ************************************** + { + if (!_elementMultiset) + return "<" + _TName("MultisetCollection") + " unbounnd>"; + else { + if (_elementMultiset->empty()) + return "<" + _TName("MultisetCollection") + " empty>"; + else + return "<" + _TName("MultisetCollection") + " " + getString(_elementMultiset->size()) + ">"; + } + }; - Record* _GetRecord() const + Record* _getRecord() const // ***************** { Record* record = NULL; if (!_elementMultiset->empty()) { - record = new Record(_GetString()); - unsigned n = 1; - typename multiset::const_iterator iterator = _elementMultiset->begin(); // AD - while (iterator != _elementMultiset->end()) { - record->Add(GetSlot(GetString(n++), *iterator)); + record = new Record(_getString()); + unsigned n = 1; + typename multiset::const_iterator iterator = _elementMultiset->begin(); // AD + while (iterator != _elementMultiset->end()) { + record->Add(getSlot(getString(n++), *iterator)); ++iterator; - } + } } return record; } @@ -179,17 +179,17 @@ template > // **************************************************************************************************** template - inline GenericCollection GetCollection(const multiset& elementMultiset) + inline GenericCollection getCollection(const multiset& elementMultiset) // **************************************************************************************** { - return MultisetCollection(elementMultiset); + return MultisetCollection(elementMultiset); } template - inline GenericCollection GetCollection(const multiset* elementMultiset) + inline GenericCollection getCollection(const multiset* elementMultiset) // **************************************************************************************** { - return MultisetCollection(elementMultiset); + return MultisetCollection(elementMultiset); } diff --git a/hurricane/src/hurricane/Name.cpp b/hurricane/src/hurricane/Name.cpp index b29dd7ba..315ba1f6 100644 --- a/hurricane/src/hurricane/Name.cpp +++ b/hurricane/src/hurricane/Name.cpp @@ -19,153 +19,153 @@ Name::Name() // ********* : _sharedName(NULL) { - string s = ""; - if (!SharedName::_SHARED_NAME_MAP) - _sharedName = new SharedName(s); - else { - SharedName::SharedNameMap::iterator iterator = - SharedName::_SHARED_NAME_MAP->find(&(string&)s); - if (iterator != SharedName::_SHARED_NAME_MAP->end()) - _sharedName = (*iterator).second; - else - _sharedName = new SharedName(s); - } + string s = ""; + if (!SharedName::_SHARED_NAME_MAP) + _sharedName = new SharedName(s); + else { + SharedName::SharedNameMap::iterator iterator = + SharedName::_SHARED_NAME_MAP->find(&(string&)s); + if (iterator != SharedName::_SHARED_NAME_MAP->end()) + _sharedName = (*iterator).second; + else + _sharedName = new SharedName(s); + } - assert(_sharedName); + assert(_sharedName); - _sharedName->Capture(); + _sharedName->Capture(); } Name::Name(const char* c) // ********************** : _sharedName(NULL) { - string s = c; - if (!SharedName::_SHARED_NAME_MAP) - _sharedName = new SharedName(s); - else { - SharedName::SharedNameMap::iterator iterator = - SharedName::_SHARED_NAME_MAP->find(&(string&)s); - if (iterator != SharedName::_SHARED_NAME_MAP->end()) - _sharedName = (*iterator).second; - else - _sharedName = new SharedName(s); - } + string s = c; + if (!SharedName::_SHARED_NAME_MAP) + _sharedName = new SharedName(s); + else { + SharedName::SharedNameMap::iterator iterator = + SharedName::_SHARED_NAME_MAP->find(&(string&)s); + if (iterator != SharedName::_SHARED_NAME_MAP->end()) + _sharedName = (*iterator).second; + else + _sharedName = new SharedName(s); + } - assert(_sharedName); + assert(_sharedName); - _sharedName->Capture(); + _sharedName->Capture(); } Name::Name(const string& s) // ************************ : _sharedName(NULL) { - if (!SharedName::_SHARED_NAME_MAP) - _sharedName = new SharedName(s); - else { - SharedName::SharedNameMap::iterator iterator = - SharedName::_SHARED_NAME_MAP->find(&(string&)s); - if (iterator != SharedName::_SHARED_NAME_MAP->end()) - _sharedName = (*iterator).second; - else - _sharedName = new SharedName(s); - } + if (!SharedName::_SHARED_NAME_MAP) + _sharedName = new SharedName(s); + else { + SharedName::SharedNameMap::iterator iterator = + SharedName::_SHARED_NAME_MAP->find(&(string&)s); + if (iterator != SharedName::_SHARED_NAME_MAP->end()) + _sharedName = (*iterator).second; + else + _sharedName = new SharedName(s); + } - assert(_sharedName); + assert(_sharedName); - _sharedName->Capture(); + _sharedName->Capture(); } Name::Name(const Name& name) // ************************* : _sharedName(name._sharedName) { - _sharedName->Capture(); + _sharedName->Capture(); } Name::~Name() // ********** { - _sharedName->Release(); + _sharedName->Release(); } Name& Name::operator=(const Name& name) // ************************************ { - SharedName* sharedName = name._sharedName; - if (sharedName != _sharedName) { - _sharedName->Release(); - _sharedName = sharedName; - _sharedName->Capture(); - } - return *this; + SharedName* sharedName = name._sharedName; + if (sharedName != _sharedName) { + _sharedName->Release(); + _sharedName = sharedName; + _sharedName->Capture(); + } + return *this; } bool Name::operator==(const Name& name) const // ****************************************** { - return (_sharedName == name._sharedName); + return (_sharedName == name._sharedName); } bool Name::operator!=(const Name& name) const // ****************************************** { - return (_sharedName != name._sharedName); + return (_sharedName != name._sharedName); } bool Name::operator<(const Name& name) const // ***************************************** { - return ((_sharedName != name._sharedName) && - (_sharedName->_string < name._sharedName->_string)); + return ((_sharedName != name._sharedName) && + (_sharedName->_string < name._sharedName->_string)); } bool Name::operator<=(const Name& name) const // ****************************************** { - return ((_sharedName == name._sharedName) || - (_sharedName->_string < name._sharedName->_string)); + return ((_sharedName == name._sharedName) || + (_sharedName->_string < name._sharedName->_string)); } bool Name::operator>(const Name& name) const // ***************************************** { - return ((_sharedName != name._sharedName) && - (_sharedName->_string > name._sharedName->_string)); + return ((_sharedName != name._sharedName) && + (_sharedName->_string > name._sharedName->_string)); } bool Name::operator>=(const Name& name) const // ****************************************** { - return ((_sharedName == name._sharedName) || - (_sharedName->_string >= name._sharedName->_string)); + return ((_sharedName == name._sharedName) || + (_sharedName->_string >= name._sharedName->_string)); } char Name::operator[](unsigned index) const // **************************************** { - return _sharedName->_string[index]; + return _sharedName->_string[index]; } bool Name::IsEmpty() const // *********************** { - return _sharedName->_string.empty(); + return _sharedName->_string.empty(); } -string Name::_GetString() const +string Name::_getString() const // **************************** { - return _sharedName->_string; + return _sharedName->_string; } -Record* Name::_GetRecord() const +Record* Name::_getRecord() const // *********************** { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("SharedName", _sharedName)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("SharedName", _sharedName)); + return record; } diff --git a/hurricane/src/hurricane/Name.h b/hurricane/src/hurricane/Name.h index 037a71ce..60cfa0d7 100644 --- a/hurricane/src/hurricane/Name.h +++ b/hurricane/src/hurricane/Name.h @@ -26,49 +26,49 @@ class Name { // Attributes // ********** - private: SharedName* _sharedName; + private: SharedName* _sharedName; // Constructors // ************ - public: Name(); + public: Name(); - public: Name(const char* c); - public: Name(const string& s); + public: Name(const char* c); + public: Name(const string& s); - public: Name(const Name& name); + public: Name(const Name& name); // Destructor // ********** - public: ~Name(); + public: ~Name(); // Operators // ********* - public: Name& operator=(const Name& name); + public: Name& operator=(const Name& name); - public: bool operator==(const Name& name) const; - public: bool operator!=(const Name& name) const; - public: bool operator<(const Name& name) const; - public: bool operator<=(const Name& name) const; - public: bool operator>(const Name& name) const; - public: bool operator>=(const Name& name) const; + public: bool operator==(const Name& name) const; + public: bool operator!=(const Name& name) const; + public: bool operator<(const Name& name) const; + public: bool operator<=(const Name& name) const; + public: bool operator>(const Name& name) const; + public: bool operator>=(const Name& name) const; - public: char operator[](unsigned index) const; + public: char operator[](unsigned index) const; // Predicates // ********** - public: bool IsEmpty() const; + public: bool IsEmpty() const; // 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;}; }; diff --git a/hurricane/src/hurricane/Names.h b/hurricane/src/hurricane/Names.h index 4e3725a9..b496a272 100644 --- a/hurricane/src/hurricane/Names.h +++ b/hurricane/src/hurricane/Names.h @@ -45,9 +45,9 @@ typedef GenericFilter 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. diff --git a/hurricane/src/hurricane/Net.cpp b/hurricane/src/hurricane/Net.cpp index d142c379..14b9e7a6 100644 --- a/hurricane/src/hurricane/Net.cpp +++ b/hurricane/src/hurricane/Net.cpp @@ -35,11 +35,11 @@ class Net_IsCellNetFilter : public Filter { public: Net_IsCellNetFilter& operator=(const Net_IsCellNetFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsCellNetFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsDeepNetFilter& operator=(const Net_IsDeepNetFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsDeepNetFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsGlobalFilter& operator=(const Net_IsGlobalFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsGlobalFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsExternalFilter& operator=(const Net_IsExternalFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsExternalFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsClockFilter& operator=(const Net_IsClockFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsClockFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsSupplyFilter& operator=(const Net_IsSupplyFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsSupplyFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsPowerFilter& operator=(const Net_IsPowerFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsPowerFilter(*this);}; + public: virtual Filter* 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 { public: Net_IsGroundFilter& operator=(const Net_IsGroundFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Net_IsGroundFilter(*this);}; + public: virtual Filter* 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 { public: Locator& operator=(const Locator& locator); - public: virtual Plug* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Plug* getElement() const; + public: virtual Hurricane::Locator* 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 { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* 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(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Plugs Net::GetPlugs() const +Plugs Net::getPlugs() const // ************************ { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Pins Net::GetPins() const +Pins Net::getPins() const // ********************** { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Contacts Net::GetContacts() const +Contacts Net::getContacts() const // ****************************** { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Segments Net::GetSegments() const +Segments Net::getSegments() const // ****************************** { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Verticals Net::GetVerticals() const +Verticals Net::getVerticals() const // ******************************** { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Horizontals Net::GetHorizontals() const +Horizontals Net::getHorizontals() const // ************************************ { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(getComponents()); } -Pads Net::GetPads() const +Pads Net::getPads() const // ********************** { - // return GetComponents().GetSubSet(); - return SubTypeCollection(GetComponents()); + // return getComponents().getSubSet(); + return SubTypeCollection(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(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* Net_SlavePlugs::GetClone() const +Collection* Net_SlavePlugs::getClone() const // ************************************************ { return new Net_SlavePlugs(*this); } -Locator* Net_SlavePlugs::GetLocator() const +Locator* 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* Net_SlavePlugs::Locator::GetClone() const +Locator* 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; } diff --git a/hurricane/src/hurricane/Net.h b/hurricane/src/hurricane/Net.h index 2ae75f4f..a86e291d 100644 --- a/hurricane/src/hurricane/Net.h +++ b/hurricane/src/hurricane/Net.h @@ -37,182 +37,182 @@ class Net : public Entity { // Types // ***** - public: typedef Entity Inherit; + public: typedef Entity Inherit; - public: typedef unsigned Arity; + public: typedef unsigned Arity; public: class Type { - // *************** + // *************** - public: enum Code {UNDEFINED=0, LOGICAL=1, CLOCK=2, POWER=3, GROUND=4}; + public: enum Code {UNDEFINED=0, LOGICAL=1, CLOCK=2, POWER=3, GROUND=4}; - private: Code _code; + private: Code _code; - public: Type(const Code& code = UNDEFINED); - public: Type(const Type& type); + public: Type(const Code& code = UNDEFINED); + public: Type(const Type& type); - public: Type& operator=(const Type& type); + public: Type& operator=(const Type& type); - public: operator const Code&() const {return _code;}; + 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; - }; + }; public: class Direction { - // ******************** + // ******************** - public: enum Code {UNDEFINED=0, IN=1, OUT=2, INOUT=3, TRISTATE=4}; + public: enum Code {UNDEFINED=0, IN=1, OUT=2, INOUT=3, TRISTATE=4}; - private: Code _code; + private: Code _code; - public: Direction(const Code& code = UNDEFINED); - public: Direction(const Direction& direction); + public: Direction(const Code& code = UNDEFINED); + public: Direction(const Direction& direction); - public: Direction& operator=(const Direction& direction); + public: Direction& operator=(const Direction& direction); - public: operator const Code&() const {return _code;}; + 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; - }; + }; - class ComponentSet : public IntrusiveSet { - // ************************************************ + class ComponentSet : public IntrusiveSet { + // ************************************************ - public: typedef IntrusiveSet Inherit; - - public: ComponentSet(); + public: typedef IntrusiveSet Inherit; + + public: ComponentSet(); - public: virtual unsigned _GetHashValue(Component* component) const; - public: virtual Component* _GetNextElement(Component* component) const; - public: virtual void _SetNextElement(Component* component, Component* nextComponent) const; + public: virtual unsigned _getHashValue(Component* component) const; + public: virtual Component* _getNextElement(Component* component) const; + public: virtual void _SetNextElement(Component* component, Component* nextComponent) const; - }; + }; - class RubberSet : public IntrusiveSet { - // ****************************************** + class RubberSet : public IntrusiveSet { + // ****************************************** - public: typedef IntrusiveSet Inherit; - - public: RubberSet(); + public: typedef IntrusiveSet Inherit; + + public: RubberSet(); - public: virtual unsigned _GetHashValue(Rubber* rubber) const; - public: virtual Rubber* _GetNextElement(Rubber* rubber) const; - public: virtual void _SetNextElement(Rubber* rubber, Rubber* nextRubber) const; + public: virtual unsigned _getHashValue(Rubber* rubber) const; + public: virtual Rubber* _getNextElement(Rubber* rubber) const; + public: virtual void _SetNextElement(Rubber* rubber, Rubber* nextRubber) const; - }; + }; // Attributes // ********** - private: Cell* _cell; - private: Name _name; - private: Arity _arity; - private: bool _isGlobal; - private: bool _isExternal; - private: Type _type; - private: Direction _direction; - private: Point _position; - private: ComponentSet _componentSet; - private: RubberSet _rubberSet; - private: Net* _nextOfCellNetMap; + private: Cell* _cell; + private: Name _name; + private: Arity _arity; + private: bool _isGlobal; + private: bool _isExternal; + private: Type _type; + private: Direction _direction; + private: Point _position; + private: ComponentSet _componentSet; + private: RubberSet _rubberSet; + private: Net* _nextOfCellNetMap; // Constructors // ************ - protected: Net(Cell* cell, const Name& name); + protected: Net(Cell* cell, const Name& name); - public: static Net* Create(Cell* cell, const Name& name); + public: static Net* Create(Cell* cell, const Name& name); // 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 // ********** - public: virtual bool IsDeepNet () const {return false;}; - public: bool IsGlobal () const {return _isGlobal;}; - public: bool IsExternal() const {return _isExternal;}; - public: bool IsLogical () const {return (_type == Type::LOGICAL);}; - public: bool IsClock () const {return (_type == Type::CLOCK);}; - public: bool IsPower () const {return (_type == Type::POWER);}; - public: bool IsGround () const {return (_type == Type::GROUND);}; - public: bool IsSupply () const {return (IsPower() || IsGround());}; + public: virtual bool IsDeepNet () const {return false;}; + public: bool IsGlobal () const {return _isGlobal;}; + public: bool IsExternal() const {return _isExternal;}; + public: bool IsLogical () const {return (_type == Type::LOGICAL);}; + public: bool IsClock () const {return (_type == Type::CLOCK);}; + public: bool IsPower () const {return (_type == Type::POWER);}; + public: bool IsGround () const {return (_type == Type::GROUND);}; + public: bool IsSupply () const {return (IsPower() || IsGround());}; // Updators // ******** - public: void SetName(const Name& name); - public: void SetArity(const Arity& arity); - public: void SetGlobal(bool isGlobal); - public: void SetExternal(bool isExternal); - public: void SetType(const Type& type); - public: void SetDirection(const Direction& direction); - public: void SetPosition(const Point& position); - public: void Materialize(); - public: void Unmaterialize(); - public: void Merge(Net* net); + public: void SetName(const Name& name); + public: void SetArity(const Arity& arity); + public: void SetGlobal(bool isGlobal); + public: void SetExternal(bool isExternal); + public: void SetType(const Type& type); + public: void SetDirection(const Direction& direction); + public: void SetPosition(const Point& position); + public: void Materialize(); + public: void Unmaterialize(); + public: void Merge(Net* net); // 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;}; + public: void _SetNextOfCellNetMap(Net* net) {_nextOfCellNetMap = net;}; }; @@ -245,8 +245,8 @@ template<> inline Record* ProxyRecord ( 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 ( 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; } diff --git a/hurricane/src/hurricane/NetExternalComponents.cpp b/hurricane/src/hurricane/NetExternalComponents.cpp index d2fa8878..2c70d6c3 100644 --- a/hurricane/src/hurricane/NetExternalComponents.cpp +++ b/hurricane/src/hurricane/NetExternalComponents.cpp @@ -18,43 +18,38 @@ namespace Hurricane { static Name ExternalComponentsRelationName("ExternalComponentsRelation"); -static StandardRelation* GetExternalComponentsRelation(const Net* net) -{ - Property* property = net->GetProperty(ExternalComponentsRelationName); - if (!property) - return NULL; - else - { - StandardRelation* relation = dynamic_cast(property); - if (!relation) - throw Error("Bad Property type: Must be a Standard Relation"); - return relation; - } - +static StandardRelation* getExternalComponentsRelation(const Net* net) { + Property* property = net->getProperty(ExternalComponentsRelationName); + if (!property) { + return NULL; + } else { + StandardRelation* relation = dynamic_cast(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(); + return externalComponentsRelation->getSlaveOwners().getSubSet(); } -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. diff --git a/hurricane/src/hurricane/NetExternalComponents.h b/hurricane/src/hurricane/NetExternalComponents.h index cc3e855f..6eb50121 100644 --- a/hurricane/src/hurricane/NetExternalComponents.h +++ b/hurricane/src/hurricane/NetExternalComponents.h @@ -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. diff --git a/hurricane/src/hurricane/Nets.h b/hurricane/src/hurricane/Nets.h index 99903554..eae3df3d 100644 --- a/hurricane/src/hurricane/Nets.h +++ b/hurricane/src/hurricane/Nets.h @@ -46,10 +46,10 @@ typedef GenericFilter NetFilter; #define for_each_net(net, nets)\ /******************************/\ {\ - NetLocator _locator = nets.GetLocator();\ - while (_locator.IsValid()) {\ - Net* net = _locator.GetElement();\ - _locator.Progress(); + NetLocator _locator = nets.getLocator();\ + while (_locator.IsValid()) {\ + Net* net = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Occurrence.cpp b/hurricane/src/hurricane/Occurrence.cpp index c354b21c..f303fdf6 100644 --- a/hurricane/src/hurricane/Occurrence.cpp +++ b/hurricane/src/hurricane/Occurrence.cpp @@ -22,219 +22,219 @@ namespace Hurricane { Occurrence::Occurrence(const Entity* entity) // ********************************* - : _entity(const_cast(entity)), - _sharedPath(NULL) + : _entity(const_cast(entity)), + _sharedPath(NULL) { } Occurrence::Occurrence(const Entity* entity, const Path& path) // *************************************************** - : _entity(const_cast(entity)), - _sharedPath(path._GetSharedPath()) + : _entity(const_cast(entity)), + _sharedPath(path._getSharedPath()) { - if (!_entity) { - throw Error("Can't create " + _TName("Occurrence") + " : null entity"); - } - if (_sharedPath) - if (_entity->GetCell() != _sharedPath->GetMasterCell()) - throw Error("Can't create " + _TName("Occurrence") + " : incompatible path"); + if (!_entity) { + throw Error("Can't create " + _TName("Occurrence") + " : null entity"); + } + if (_sharedPath) + if (_entity->getCell() != _sharedPath->getMasterCell()) + throw Error("Can't create " + _TName("Occurrence") + " : incompatible path"); } Occurrence::Occurrence(const Occurrence& occurrence) // ********************************************* -: _entity(occurrence._entity), - _sharedPath(occurrence._sharedPath) +: _entity(occurrence._entity), + _sharedPath(occurrence._sharedPath) { } Occurrence& Occurrence::operator=(const Occurrence& occurrence) // ******************************************************** { - _entity = occurrence._entity; - _sharedPath = occurrence._sharedPath; - return *this; + _entity = occurrence._entity; + _sharedPath = occurrence._sharedPath; + return *this; } bool Occurrence::operator==(const Occurrence& occurrence) const // ********************************************************* { - return _entity && occurrence._entity && - (_entity == occurrence._entity) && - (_sharedPath == occurrence._sharedPath); + return _entity && occurrence._entity && + (_entity == occurrence._entity) && + (_sharedPath == occurrence._sharedPath); } bool Occurrence::operator!=(const Occurrence& occurrence) const // ********************************************************* { - return !_entity || - !occurrence._entity || - (_entity != occurrence._entity) || - (_sharedPath != occurrence._sharedPath); + return !_entity || + !occurrence._entity || + (_entity != occurrence._entity) || + (_sharedPath != occurrence._sharedPath); } bool Occurrence::operator<(const Occurrence& occurrence) const // ******************************************************** { - return ((_entity < occurrence._entity) || - ((_entity == occurrence._entity) && (_sharedPath < occurrence._sharedPath))); + return ((_entity < occurrence._entity) || + ((_entity == occurrence._entity) && (_sharedPath < occurrence._sharedPath))); } -Cell* Occurrence::GetOwnerCell() const +Cell* Occurrence::getOwnerCell() const // ********************************** { - if (!_entity) return NULL; - return (_sharedPath) ? _sharedPath->GetOwnerCell() : _entity->GetCell(); + if (!_entity) return NULL; + 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); - } - return NULL; + if (_entity) { + //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(); - } - return Properties(); + if (_entity) { + 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 (!_entity) return Box(); + if (!_sharedPath) return _entity->getBoundingBox(); + return _sharedPath->getTransformation().getBox(_entity->getBoundingBox()); } bool Occurrence::HasProperty() const // ******************************** { - return (_GetQuark() != NULL); + return (_getQuark() != NULL); } void Occurrence::MakeInvalid() // ************************** { - _entity = NULL; - _sharedPath = NULL; + _entity = NULL; + _sharedPath = NULL; } void Occurrence::Put(Property* property) // ************************************ { - if (!_entity) - throw Error("Can't put property : invalid occurrence"); + if (!_entity) + throw Error("Can't put property : invalid occurrence"); - if (!property) - throw Error("Can't put property : null property"); + if (!property) + throw Error("Can't put property : null property"); - Quark* quark = _GetQuark(); - if (!quark) quark = Quark::_Create(*this); - quark->Put(property); + Quark* quark = _getQuark(); + if (!quark) quark = Quark::_Create(*this); + quark->put(property); } void Occurrence::Remove(Property* property) // *************************************** { - if (!_entity) - throw Error("Can't remove property : invalid occurrence"); + if (!_entity) + throw Error("Can't remove property : invalid occurrence"); - if (!property) - throw Error("Can't remove property : null 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) // ********************************************* { - if (!_entity) - throw Error("Can't remove property : invalid occurrence"); + 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()); + string s = "<" + _TName("Occurrence"); + if (_entity) { + s += " "; + s += getString(getOwnerCell()); s += ":"; - if (_sharedPath) s += GetString(_sharedPath->GetName()) + ":"; - s += GetString(_entity); - } - s += ">"; - return s; + 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)); - } - return record; + 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)); + } + 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(_entity)) - description += plug->GetName(); + description += plug->getName(); else if (Pin* pin= dynamic_cast(_entity)) - description += GetString(pin->GetName()); + description += getString(pin->getName()); else if (Net* net= dynamic_cast(_entity)) - description += GetString(net->GetName()); + description += getString(net->getName()); else if (Cell* cell= dynamic_cast(_entity)) - description += GetString(cell->GetName()); + description += getString(cell->getName()); else if (Instance* instance= dynamic_cast(_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; } diff --git a/hurricane/src/hurricane/Occurrence.h b/hurricane/src/hurricane/Occurrence.h index 6d6e7233..0242f3d1 100644 --- a/hurricane/src/hurricane/Occurrence.h +++ b/hurricane/src/hurricane/Occurrence.h @@ -29,61 +29,61 @@ class Occurrence { // Attributes // ********** - private: Entity* _entity; - private: SharedPath* _sharedPath; + private: Entity* _entity; + private: SharedPath* _sharedPath; // Constructors // ************ - public: Occurrence(const Entity* entity = NULL); - public: Occurrence(const Entity* entity, const Path& path); - public: Occurrence(const Occurrence& occurrence); + public: Occurrence(const Entity* entity = NULL); + public: Occurrence(const Entity* entity, const Path& path); + public: Occurrence(const Occurrence& occurrence); // Operators // ********* - public: Occurrence& operator=(const Occurrence& occurrence); + public: Occurrence& operator=(const Occurrence& occurrence); - public: bool operator==(const Occurrence& occurrence) const; - public: bool operator!=(const Occurrence& occurrence) const; + public: bool operator==(const Occurrence& occurrence) const; + public: bool operator!=(const Occurrence& occurrence) const; - public: bool operator<(const Occurrence& occurrence) const; // for stl set -> less predicate + public: bool operator<(const Occurrence& occurrence) const; // for stl set -> less predicate // 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 // ********** - public: bool IsValid() const {return (_entity != NULL);}; - public: bool HasProperty() const; + public: bool IsValid() const {return (_entity != NULL);}; + public: bool HasProperty() const; // Updators // ******** - public: void MakeInvalid(); - public: void Put(Property* property); - public: void Remove(Property* property); - public: void RemoveProperty(const Name& name); - public: void ClearProperties(); + public: void MakeInvalid(); + public: void Put(Property* property); + public: void Remove(Property* property); + public: void RemoveProperty(const Name& name); + public: void ClearProperties(); // 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; }; diff --git a/hurricane/src/hurricane/Occurrences.h b/hurricane/src/hurricane/Occurrences.h index f6659139..8e028ed0 100644 --- a/hurricane/src/hurricane/Occurrences.h +++ b/hurricane/src/hurricane/Occurrences.h @@ -45,10 +45,10 @@ typedef GenericFilter OccurrenceFilter; #define for_each_occurrence(occurrence, occurrences)\ /************************************************/\ {\ - OccurrenceLocator _locator = occurrences.GetLocator();\ - while (_locator.IsValid()) {\ - Occurrence occurrence = _locator.GetElement();\ - _locator.Progress(); + OccurrenceLocator _locator = occurrences.getLocator();\ + while (_locator.IsValid()) {\ + Occurrence occurrence = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Pad.cpp b/hurricane/src/hurricane/Pad.cpp index 4f2295a4..f8ab9a36 100644 --- a/hurricane/src/hurricane/Pad.cpp +++ b/hurricane/src/hurricane/Pad.cpp @@ -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. // **************************************************************************************************** diff --git a/hurricane/src/hurricane/Pad.h b/hurricane/src/hurricane/Pad.h index 7e9d708e..87455f96 100644 --- a/hurricane/src/hurricane/Pad.h +++ b/hurricane/src/hurricane/Pad.h @@ -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 @@ -27,45 +26,42 @@ class Pad : public Component { // Types // ***** - public: typedef Component Inherit; + public: typedef Component Inherit; // Attributes // ********** - private: Layer* _layer; - private: Box _boundingBox; + private: Layer* _layer; + private: Box _boundingBox; // Constructors // ************ - protected: Pad(Net* net, Layer* layer, const Box& boundingBox); + protected: Pad(Net* net, Layer* layer, const Box& boundingBox); - public: static Pad* Create(Net* net, Layer* layer, const Box& boundingBox); + public: static Pad* Create(Net* net, Layer* layer, const Box& boundingBox); // 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 // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetBoundingBox(const Box& boundingBox); + public: virtual void Translate(const Unit& dx, const Unit& dy); + public: void SetBoundingBox(const Box& boundingBox); // 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; }; diff --git a/hurricane/src/hurricane/Pads.h b/hurricane/src/hurricane/Pads.h index 4967a6e8..36fa75e3 100644 --- a/hurricane/src/hurricane/Pads.h +++ b/hurricane/src/hurricane/Pads.h @@ -46,9 +46,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/Path.cpp b/hurricane/src/hurricane/Path.cpp index 2b99be21..55eb1cf3 100644 --- a/hurricane/src/hurricane/Path.cpp +++ b/hurricane/src/hurricane/Path.cpp @@ -28,63 +28,63 @@ Path::Path(Instance* instance) // *************************** : _sharedPath(NULL) { - if (instance) { - _sharedPath = instance->_GetSharedPath(NULL); - if (!_sharedPath) _sharedPath = new SharedPath(instance); - } + if (instance) { + _sharedPath = instance->_getSharedPath(NULL); + if (!_sharedPath) _sharedPath = new SharedPath(instance); + } } Path::Path(Instance* headInstance, const Path& tailPath) // ***************************************************** : _sharedPath(NULL) { - if (!headInstance) - throw Error("Cant't create " + _TName("Path") + " : null head instance"); + if (!headInstance) + throw Error("Cant't create " + _TName("Path") + " : null head instance"); - if (!tailPath._GetSharedPath()) { - _sharedPath = headInstance->_GetSharedPath(NULL); - if (!_sharedPath) _sharedPath = new SharedPath(headInstance); - } - else { - SharedPath* tailSharedPath = tailPath._GetSharedPath(); - if (tailSharedPath->GetOwnerCell() != headInstance->GetMasterCell()) - throw Error("Cant't create " + _TName("Path") + " : incompatible tail path"); + if (!tailPath._getSharedPath()) { + _sharedPath = headInstance->_getSharedPath(NULL); + if (!_sharedPath) _sharedPath = new SharedPath(headInstance); + } + else { + SharedPath* tailSharedPath = tailPath._getSharedPath(); + if (tailSharedPath->getOwnerCell() != headInstance->getMasterCell()) + throw Error("Cant't create " + _TName("Path") + " : incompatible tail path"); - _sharedPath = headInstance->_GetSharedPath(tailSharedPath); - if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); - } + _sharedPath = headInstance->_getSharedPath(tailSharedPath); + if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); + } } Path::Path(const Path& headPath, Instance* tailInstance) // ***************************************************** : _sharedPath(NULL) { - if (!tailInstance) - throw Error("Cant't create " + _TName("Path") + " : null tail instance"); + if (!tailInstance) + throw Error("Cant't create " + _TName("Path") + " : null tail instance"); - 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); - if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); - } + 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); + if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); + } } Path::Path(const Path& headPath, const Path& tailPath) // ***************************************************** -: _sharedPath(tailPath._GetSharedPath()) +: _sharedPath(tailPath._getSharedPath()) { vector instances; - headPath.GetInstances().Fill(instances); + headPath.getInstances().Fill(instances); for (vector::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); } } @@ -93,29 +93,29 @@ Path::Path(Cell* cell, const string& pathName) // ******************************************* : _sharedPath(NULL) { - if (cell) { - list instanceList; - string restOfPathName = pathName; - char nameSeparator = GetNameSeparator(); - while (!restOfPathName.empty()) { - size_t pos = restOfPathName.find(nameSeparator); - Instance* instance = cell->GetInstance(restOfPathName.substr(0, pos)); - if (!instance) throw Error("Cant't create " + _TName("Path") + " : invalid path name"); - cell = instance->GetMasterCell(); - restOfPathName = (pos == string::npos) ? string("") : restOfPathName.substr(pos + 1); - instanceList.push_back(instance); - } - if (!instanceList.empty()) { - list::reverse_iterator instanceIterator = instanceList.rbegin(); - while (instanceIterator != instanceList.rend()) { - Instance* headInstance = *instanceIterator; - SharedPath* tailSharedPath = _sharedPath; - _sharedPath = headInstance->_GetSharedPath(tailSharedPath); - if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); - ++instanceIterator; - } - } - } + if (cell) { + list instanceList; + string restOfPathName = pathName; + char nameSeparator = getNameSeparator(); + while (!restOfPathName.empty()) { + size_t pos = restOfPathName.find(nameSeparator); + Instance* instance = cell->getInstance(restOfPathName.substr(0, pos)); + if (!instance) throw Error("Cant't create " + _TName("Path") + " : invalid path name"); + cell = instance->getMasterCell(); + restOfPathName = (pos == string::npos) ? string("") : restOfPathName.substr(pos + 1); + instanceList.push_back(instance); + } + if (!instanceList.empty()) { + list::reverse_iterator instanceIterator = instanceList.rbegin(); + while (instanceIterator != instanceList.rend()) { + Instance* headInstance = *instanceIterator; + SharedPath* tailSharedPath = _sharedPath; + _sharedPath = headInstance->_getSharedPath(tailSharedPath); + if (!_sharedPath) _sharedPath = new SharedPath(headInstance, tailSharedPath); + ++instanceIterator; + } + } + } } Path::Path(const Path& path) @@ -132,127 +132,127 @@ Path::~Path() Path& Path::operator=(const Path& path) // ************************************ { - _sharedPath = path._sharedPath; - return *this; + _sharedPath = path._sharedPath; + return *this; } bool Path::operator==(const Path& path) const // ****************************************** { - return (_sharedPath == path._sharedPath); + return (_sharedPath == path._sharedPath); } bool Path::operator!=(const Path& path) const // ****************************************** { - return (_sharedPath != path._sharedPath); + return (_sharedPath != path._sharedPath); } bool Path::operator<(const Path& path) const // ***************************************** { - return (_sharedPath < path._sharedPath); + 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 // *********************** { - return (_sharedPath == NULL); + return (_sharedPath == NULL); } void Path::MakeEmpty() // ******************* { - _sharedPath = NULL; + _sharedPath = NULL; } void Path::SetNameSeparator(char nameSeparator) // ******************************************** { - SharedPath::SetNameSeparator(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 += ">"; - return s; + string s = "<" + _TName("Path"); + if (!_sharedPath) + s += " empty"; + else + 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)); - } - return record; + Record* record = NULL; + if (_sharedPath) { + record = new Record(getString(this)); + record->Add(getSlot("SharedPath", _sharedPath)); + } + return record; } diff --git a/hurricane/src/hurricane/Path.h b/hurricane/src/hurricane/Path.h index 3cfa1f03..c5741f39 100644 --- a/hurricane/src/hurricane/Path.h +++ b/hurricane/src/hurricane/Path.h @@ -27,68 +27,68 @@ class Path { // Attributes // ********** - private: SharedPath* _sharedPath; + private: SharedPath* _sharedPath; // Constructors // ************ - public: Path(SharedPath* sharedPath = NULL); - public: Path(Instance* instance); - public: Path(Instance* headInstance, const Path& tailPath); - public: Path(const Path& headPath, Instance* tailInstance); - public: Path(Cell* cell, const string& pathName); + public: Path(SharedPath* sharedPath = NULL); + public: Path(Instance* instance); + public: Path(Instance* headInstance, const Path& tailPath); + public: Path(const Path& headPath, Instance* tailInstance); + public: Path(Cell* cell, const string& pathName); public: Path(const Path& headPath, const Path& tailPath); - public: Path(const Path& path); + public: Path(const Path& path); // Destructor // ********** - public: ~Path(); + public: ~Path(); // Operators // ********* - public: Path& operator=(const Path& path); + public: Path& operator=(const Path& path); - public: bool operator==(const Path& path) const; - public: bool operator!=(const Path& path) const; + public: bool operator==(const Path& path) const; + public: bool operator!=(const Path& path) const; - public: bool operator<(const Path& path) const; // for stl set -> less predicate + public: bool operator<(const Path& path) const; // for stl set -> less predicate // 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 // ********** - public: bool IsEmpty() const; + public: bool IsEmpty() const; // Updators // ******** - public: void MakeEmpty(); - public: static void SetNameSeparator(char nameSeparator); + public: void MakeEmpty(); + public: static void SetNameSeparator(char nameSeparator); // 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;}; }; diff --git a/hurricane/src/hurricane/Pathes.h b/hurricane/src/hurricane/Pathes.h index 73077202..ad472bea 100644 --- a/hurricane/src/hurricane/Pathes.h +++ b/hurricane/src/hurricane/Pathes.h @@ -45,9 +45,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/Pin.cpp b/hurricane/src/hurricane/Pin.cpp index 827dbdd3..9b602a05 100644 --- a/hurricane/src/hurricane/Pin.cpp +++ b/hurricane/src/hurricane/Pin.cpp @@ -22,132 +22,132 @@ namespace Hurricane { Pin::Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height) // **************************************************************************************************** : Inherit(net, layer, x, y, width, height), - _name(name), - _accessDirection(accessDirection), + _name(name), + _accessDirection(accessDirection), _placementStatus(placementStatus), - _nextOfCellPinMap(NULL) + _nextOfCellPinMap(NULL) { - if (GetCell()->GetPin(name)) - throw Error("Can't create " + _TName("Pin") + " : already exists"); + if (getCell()->getPin(name)) + throw Error("Can't create " + _TName("Pin") + " : already exists"); } Pin* Pin::Create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height) // **************************************************************************************************** { - if (!net) - throw Error("Can't create " + _TName("Pin") + " : NULL net"); - if (!layer) - throw Error("Can't create " + _TName("Pin") + " : NULL layer"); + if (!net) + throw Error("Can't create " + _TName("Pin") + " : NULL net"); + if (!layer) + throw Error("Can't create " + _TName("Pin") + " : NULL layer"); - Pin* pin = new Pin(net, name, accessDirection, placementStatus, layer, x, y, width, height); + Pin* pin = new Pin(net, name, accessDirection, placementStatus, layer, x, y, width, height); - pin->_PostCreate(); + pin->_postCreate(); - return pin; + return pin; } void Pin::SetPlacementStatus(const PlacementStatus& placementstatus) // ********************************************************************** { - if (placementstatus != _placementStatus) { - Invalidate(true); + if (placementstatus != _placementStatus) { + Invalidate(true); _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)); - return s; + 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(); - if (record) { - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("AccessDirection", &_accessDirection)); - record->Add(GetSlot("PlacementStatus", &_placementStatus)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Name", &_name)); + record->Add(getSlot("AccessDirection", &_accessDirection)); + record->Add(getSlot("PlacementStatus", &_placementStatus)); + } + return record; } //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))); -// end_for; -// } -// } -// } -// if (view->GetScale() <= 1) -// view->DrawPoint(transformation.GetPoint(GetPosition()), 1); -// else if (view->GetScale() <= 3) +// if (_width && _height) { +// 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) // { -// 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); -// if (_width) { -// 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()); -// } +// else { +// 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()); +// } +// if (_height) { +// 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() ); // } -// } +// } //} // @@ -157,42 +157,42 @@ Record* Pin::_GetRecord() const Pin::AccessDirection::AccessDirection(const Code& code) // ****************************************************** -: _code(code) +: _code(code) { } Pin::AccessDirection::AccessDirection(const AccessDirection& accessDirection) // **************************************************************************** -: _code(accessDirection._code) +: _code(accessDirection._code) { } Pin::AccessDirection& Pin::AccessDirection::operator=(const AccessDirection& accessDirection) // ********************************************************************************************** { - _code = accessDirection._code; - return *this; + _code = accessDirection._code; + return *this; } -string Pin::AccessDirection::_GetString() const +string Pin::AccessDirection::_getString() const // ********************************************** { - switch (_code) { - case UNDEFINED : return "UNDEFINED"; - case NORTH : return "NORTH"; - case SOUTH : return "SOUTH"; - case WEST : return "WEST"; - case EAST : return "EAST"; - } - return "ABNORMAL"; + switch (_code) { + case UNDEFINED : return "UNDEFINED"; + case NORTH : return "NORTH"; + case SOUTH : return "SOUTH"; + case WEST : return "WEST"; + case EAST : return "EAST"; + } + return "ABNORMAL"; } -Record* Pin::AccessDirection::_GetRecord() const +Record* Pin::AccessDirection::_getRecord() const // ***************************************** { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("Code", (int)_code)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("Code", (int)_code)); + return record; } @@ -203,13 +203,13 @@ Record* Pin::AccessDirection::_GetRecord() const Pin::PlacementStatus::PlacementStatus(const Code& code) // **************************************************** -: _code(code) +: _code(code) { } Pin::PlacementStatus::PlacementStatus(const PlacementStatus& placementstatus) // ************************************************************************** -: _code(placementstatus._code) +: _code(placementstatus._code) { } @@ -217,26 +217,26 @@ Pin::PlacementStatus& Pin::PlacementStatus::operator=(const PlacementStatus& pla // ****************************************************************************************** { _code = placementstatus._code; - return *this; + return *this; } -string Pin::PlacementStatus::_GetString() const +string Pin::PlacementStatus::_getString() const // ******************************************** { - switch (_code) { - case UNPLACED : return "UNPLACED"; - case PLACED : return "PLACED"; - case FIXED : return "FIXED"; - } - return "ABNORMAL"; + switch (_code) { + case UNPLACED : return "UNPLACED"; + case PLACED : return "PLACED"; + case FIXED : return "FIXED"; + } + return "ABNORMAL"; } -Record* Pin::PlacementStatus::_GetRecord() const +Record* Pin::PlacementStatus::_getRecord() const // *************************************** { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("Code", (int)_code)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("Code", (int)_code)); + return record; } diff --git a/hurricane/src/hurricane/Pin.h b/hurricane/src/hurricane/Pin.h index ecc9bfe7..a84d7fc6 100644 --- a/hurricane/src/hurricane/Pin.h +++ b/hurricane/src/hurricane/Pin.h @@ -28,103 +28,100 @@ class Pin : public Contact { // Types // ***** - public: typedef Contact Inherit; + public: typedef Contact Inherit; - public: class AccessDirection { - // ************************** + public: class AccessDirection { + // ************************** - public: enum Code {UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4}; + public: enum Code {UNDEFINED=0, NORTH=1, SOUTH=2, EAST=3, WEST=4}; - private: Code _code; + private: Code _code; - public: AccessDirection(const Code& code = UNDEFINED); - public: AccessDirection(const AccessDirection& accessDirection); + public: AccessDirection(const Code& code = UNDEFINED); + public: AccessDirection(const AccessDirection& accessDirection); - public: AccessDirection& operator=(const AccessDirection& accessDirection); + public: AccessDirection& operator=(const AccessDirection& accessDirection); - public: operator const Code&() const {return _code;}; + 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; - }; + }; - public: class PlacementStatus { - // ************************** + public: class PlacementStatus { + // ************************** - public: enum Code {UNPLACED=0, PLACED=1, FIXED=2}; + public: enum Code {UNPLACED=0, PLACED=1, FIXED=2}; - private: Code _code; + private: Code _code; - public: PlacementStatus(const Code& code = UNPLACED); - public: PlacementStatus(const PlacementStatus& placementstatus); + public: PlacementStatus(const Code& code = UNPLACED); + public: PlacementStatus(const PlacementStatus& placementstatus); - public: PlacementStatus& operator=(const PlacementStatus& placementstatus); + public: PlacementStatus& operator=(const PlacementStatus& placementstatus); - public: operator const Code&() const {return _code;}; + 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; - }; + }; // Attributes // ********** - private: Name _name; - private: AccessDirection _accessDirection; - private: PlacementStatus _placementStatus; - private: Pin* _nextOfCellPinMap; + private: Name _name; + private: AccessDirection _accessDirection; + private: PlacementStatus _placementStatus; + private: Pin* _nextOfCellPinMap; // Constructors // ************ - protected: Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); + protected: Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); - public: static Pin* Create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); + public: static Pin* Create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0); // 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 // ********** public: bool IsUnplaced() const {return _placementStatus == PlacementStatus::UNPLACED;}; public: bool IsPlaced() const {return _placementStatus == PlacementStatus::PLACED;}; - public: bool IsFixed() const {return _placementStatus == PlacementStatus::FIXED;}; + public: bool IsFixed() const {return _placementStatus == PlacementStatus::FIXED;}; // Updators // ******** - public: void SetPlacementStatus(const PlacementStatus& placementstatus); + public: void SetPlacementStatus(const PlacementStatus& placementstatus); // 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); + public: void _SetNextOfCellPinMap(Pin* pin) {_nextOfCellPinMap = pin;}; }; diff --git a/hurricane/src/hurricane/Pins.h b/hurricane/src/hurricane/Pins.h index a86d20de..2d02fa7d 100644 --- a/hurricane/src/hurricane/Pins.h +++ b/hurricane/src/hurricane/Pins.h @@ -50,9 +50,9 @@ typedef GenericFilter 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(); diff --git a/hurricane/src/hurricane/Plug.cpp b/hurricane/src/hurricane/Plug.cpp index e24641e1..c2ce81cb 100644 --- a/hurricane/src/hurricane/Plug.cpp +++ b/hurricane/src/hurricane/Plug.cpp @@ -27,11 +27,11 @@ class Plug_IsConnectedFilter : public Filter { public: Plug_IsConnectedFilter& operator=(const Plug_IsConnectedFilter& filter) {return *this;}; - public: virtual Filter* GetClone() const {return new Plug_IsConnectedFilter(*this);}; + public: virtual Filter* 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. diff --git a/hurricane/src/hurricane/Plug.h b/hurricane/src/hurricane/Plug.h index aa94355c..7a3dadb0 100644 --- a/hurricane/src/hurricane/Plug.h +++ b/hurricane/src/hurricane/Plug.h @@ -27,79 +27,76 @@ class Plug : public Component { // Types // ***** - public: typedef Component Inherit; + public: typedef Component Inherit; // Attributes // ********** - private: Instance* _instance; - private: Net* _masterNet; - private: Plug* _nextOfInstancePlugMap; + private: Instance* _instance; + private: Net* _masterNet; + private: Plug* _nextOfInstancePlugMap; // Constructors // ************ - protected: Plug(Instance* instance, Net* masterNet); + protected: Plug(Instance* instance, Net* masterNet); // 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 // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy) {}; + public: virtual void Translate(const Unit& dx, const Unit& dy) {}; - public: void SetNet(Net* net); + public: void SetNet(Net* net); - public: virtual void Materialize(); - public: virtual void Unmaterialize(); + public: virtual void Materialize(); + public: virtual void Unmaterialize(); // Others // ****** - public: static Plug* _Create(Instance* instance, Net* masterNet); - protected: virtual void _PostCreate(); + public: static Plug* _Create(Instance* instance, Net* masterNet); + 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) {}; + public: virtual void _SetMasterNet(Net* masterNet) {_masterNet = masterNet;}; + public: void _SetNextOfInstancePlugMap(Plug* plug) {_nextOfInstancePlugMap = plug;}; }; diff --git a/hurricane/src/hurricane/Plugs.h b/hurricane/src/hurricane/Plugs.h index 872b29a2..6fbfa3b3 100644 --- a/hurricane/src/hurricane/Plugs.h +++ b/hurricane/src/hurricane/Plugs.h @@ -46,10 +46,10 @@ typedef GenericFilter PlugFilter; #define for_each_plug(plug, plugs)\ /*********************************/\ {\ - PlugLocator _locator = plugs.GetLocator();\ - while (_locator.IsValid()) {\ - Plug* plug = _locator.GetElement();\ - _locator.Progress(); + PlugLocator _locator = plugs.getLocator();\ + while (_locator.IsValid()) {\ + Plug* plug = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Point.cpp b/hurricane/src/hurricane/Point.cpp index 9b21c3d4..becade6c 100644 --- a/hurricane/src/hurricane/Point.cpp +++ b/hurricane/src/hurricane/Point.cpp @@ -96,18 +96,18 @@ Point Point::getTranslated(const Unit& dx, const Unit& dy) const { return Point(*this).translate(dx, dy); } -string Point::_GetString() const +string Point::_getString() const // ***************************** { - return "<" + _TName("Point") + " " + GetValueString(_x) + " " + GetValueString(_y) + ">"; + return "<" + _TName("Point") + " " + getValueString(_x) + " " + getValueString(_y) + ">"; } -Record* Point::_GetRecord() const +Record* Point::_getRecord() const // ****************************** { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("X", &_x)); - record->Add(GetSlot("Y", &_y)); + Record* record = new Record(getString(this)); + record->Add(getSlot("X", &_x)); + record->Add(getSlot("Y", &_y)); return record; } diff --git a/hurricane/src/hurricane/Point.h b/hurricane/src/hurricane/Point.h index 028acabe..8e2937f0 100644 --- a/hurricane/src/hurricane/Point.h +++ b/hurricane/src/hurricane/Point.h @@ -3,7 +3,6 @@ // Authors: R. Escassut // Copyright (c) BULL S.A. 2000-2004, All Rights Reserved // **************************************************************************************************** -// 21-10-2003 Alignment BULL-LIP6 : added operators+ += ... (questionnable!) #ifndef HURRICANE_POINT #define HURRICANE_POINT @@ -68,9 +67,9 @@ class Point { // Others // ****** - public: string _GetTypeName() const { return _TName("Point"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Point"); }; + public: string _getString() const; + public: Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/Points.h b/hurricane/src/hurricane/Points.h index e525660a..6fba9d9a 100644 --- a/hurricane/src/hurricane/Points.h +++ b/hurricane/src/hurricane/Points.h @@ -45,9 +45,9 @@ typedef GenericFilter PointFilter; #define for_each_point(point, points)\ /************************************/\ {\ - PointLocator _locator = points.GetLocator();\ + PointLocator _locator = points.getLocator();\ while (_locator.IsValid()) {\ - Point point = _locator.GetElement();\ + Point point = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Primitives.h b/hurricane/src/hurricane/Primitives.h index 143af152..bfef7119 100644 --- a/hurricane/src/hurricane/Primitives.h +++ b/hurricane/src/hurricane/Primitives.h @@ -46,9 +46,9 @@ typedef GenericFilter PrimitiveFilter; #define for_each_primitive(primitive, primitives)\ /************************************************/\ {\ - PrimitiveLocator _locator = primitives.GetLocator();\ + PrimitiveLocator _locator = primitives.getLocator();\ while (_locator.IsValid()) {\ - Primitive* primitive = _locator.GetElement();\ + Primitive* primitive = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Properties.h b/hurricane/src/hurricane/Properties.h index cfa0deb1..eaa26221 100644 --- a/hurricane/src/hurricane/Properties.h +++ b/hurricane/src/hurricane/Properties.h @@ -46,9 +46,9 @@ typedef GenericFilter PropertyFilter; #define for_each_property(property, properties)\ /**********************************************/\ {\ - PropertyLocator _locator = properties.GetLocator();\ + PropertyLocator _locator = properties.getLocator();\ while (_locator.IsValid()) {\ - Property* property = _locator.GetElement();\ + Property* property = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Property.cpp b/hurricane/src/hurricane/Property.cpp index 60b0ea55..46b52057 100644 --- a/hurricane/src/hurricane/Property.cpp +++ b/hurricane/src/hurricane/Property.cpp @@ -26,36 +26,26 @@ Property::~Property() { } -void Property::Delete() +void Property::destroy() // ******************** { - _PreDelete(); + _preDestroy(); - delete this; + delete this; } -void Property::_PostCreate() -// ************************* -{ -} - -void Property::_PreDelete() -// ************************ -{ -} - -string Property::_GetString() const +string Property::_getString() const // ******************************** { - string s = "<" + _GetTypeName() + ">"; - s.insert(s.length() - 1, " " + GetString(GetName())); - return s; + string s = "<" + _getTypeName() + ">"; + s.insert(s.length() - 1, " " + getString(getName())); + return s; } -Record* Property::_GetRecord() const +Record* Property::_getRecord() const // *************************** { - return new Record(GetString(this)); + return new Record(getString(this)); } @@ -66,51 +56,51 @@ Record* Property::_GetRecord() const PrivateProperty::PrivateProperty() // ******************************* -: Inherit(), - _owner(NULL) +: Inherit(), + _owner(NULL) { } -void PrivateProperty::_PreDelete() +void PrivateProperty::_preDestroy() // ******************************* { - Inherit::_PreDelete(); + Inherit::_preDestroy(); - if (_owner) _owner->_OnDeleted(this); + if (_owner) _owner->_onDeleted(this); } -void PrivateProperty::OnCapturedBy(DBo* owner) +void PrivateProperty::onCapturedBy(DBo* owner) // ******************************************* { - _owner = owner; + _owner = owner; } -void PrivateProperty::OnReleasedBy(DBo* owner) +void PrivateProperty::onReleasedBy(DBo* owner) // ******************************************* { - if (_owner == owner) OnNotOwned(); + if (_owner == owner) onNotOwned(); } -void PrivateProperty::OnNotOwned() +void PrivateProperty::onNotOwned() // ******************************* { - Delete(); + destroy(); } -string PrivateProperty::_GetString() const +string PrivateProperty::_getString() const // *************************************** { - return Inherit::_GetString(); + return Inherit::_getString(); } -Record* PrivateProperty::_GetRecord() const +Record* PrivateProperty::_getRecord() const // ********************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Owner", _owner)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Owner", _owner)); + } + return record; } @@ -121,57 +111,57 @@ Record* PrivateProperty::_GetRecord() const SharedProperty::SharedProperty() // ***************************** -: Inherit(), - _ownerSet() +: Inherit(), + _ownerSet() { } -void SharedProperty::_PreDelete() +void SharedProperty::_preDestroy() // ****************************** { - Inherit::_PreDelete(); + Inherit::_preDestroy(); - while (!_ownerSet.empty()) { - DBo* owner = *_ownerSet.begin(); - _ownerSet.erase(owner); - owner->_OnDeleted(this); - } + while (!_ownerSet.empty()) { + DBo* owner = *_ownerSet.begin(); + _ownerSet.erase(owner); + owner->_onDeleted(this); + } } -void SharedProperty::OnCapturedBy(DBo* owner) +void SharedProperty::onCapturedBy(DBo* owner) // ****************************************** { - _ownerSet.insert(owner); + _ownerSet.insert(owner); } -void SharedProperty::OnReleasedBy(DBo* owner) +void SharedProperty::onReleasedBy(DBo* owner) // ****************************************** { - _ownerSet.erase(owner); + _ownerSet.erase(owner); - if (_ownerSet.empty()) OnNotOwned(); + if (_ownerSet.empty()) onNotOwned(); } -void SharedProperty::OnNotOwned() +void SharedProperty::onNotOwned() // ****************************** { - Delete(); + destroy(); } -string SharedProperty::_GetString() const +string SharedProperty::_getString() const // ************************************** { - return Inherit::_GetString(); + return Inherit::_getString(); } -Record* SharedProperty::_GetRecord() const +Record* SharedProperty::_getRecord() const // ********************************* { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Owners", &_ownerSet)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Owners", &_ownerSet)); + } + return record; } diff --git a/hurricane/src/hurricane/Property.h b/hurricane/src/hurricane/Property.h index ebe6f8c5..609a04a5 100644 --- a/hurricane/src/hurricane/Property.h +++ b/hurricane/src/hurricane/Property.h @@ -26,43 +26,43 @@ class Property : public NestedSlotAdapter { // Constructors // ************ - protected: Property(); + protected: Property(); - private: Property(const Property& property); // not implemented to forbid copy construction + private: Property(const Property& property); // not implemented to forbid copy construction // Destructors // *********** - protected: virtual ~Property(); + protected: virtual ~Property(); - public: virtual void Delete(); + public: virtual void destroy(); // Operators // ********* - private: Property& operator=(const Property& property); // not implemented to forbid assignment + private: Property& operator=(const Property& property); // not implemented to forbid assignment // Accessors // ********* - public: virtual Name GetName() const = 0; + public: virtual Name getName() const = 0; // Managers // ******** - public: virtual void OnCapturedBy(DBo* owner) = 0; - public: virtual void OnReleasedBy(DBo* owner) = 0; + public: virtual void onCapturedBy(DBo* owner) = 0; + public: virtual void onReleasedBy(DBo* owner) = 0; // 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: virtual string _getTypeName() const = 0; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; @@ -78,37 +78,37 @@ class PrivateProperty : public Property { // Types // ***** - public: typedef Property Inherit; + public: typedef Property Inherit; // Attributes // ********** - private: DBo* _owner; + private: DBo* _owner; // Constructors // ************ - protected: PrivateProperty(); + protected: PrivateProperty(); // Accessors // ********* - public: DBo* GetOwner() const {return _owner;}; + public: DBo* getOwner() const {return _owner;}; // Managers // ******** - public: virtual void OnCapturedBy(DBo* owner); - public: virtual void OnReleasedBy(DBo* owner); - public: virtual void OnNotOwned(); + public: virtual void onCapturedBy(DBo* owner); + public: virtual void onReleasedBy(DBo* owner); + public: virtual void onNotOwned(); // Others // ****** - 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; }; @@ -124,86 +124,86 @@ template class StandardPrivateProperty : public PrivateProperty { // Types // ***** - public: typedef PrivateProperty Inherit; + public: typedef PrivateProperty Inherit; // Attributes // ********** - private: Name _name; - private: Value _value; + private: Name _name; + private: Value _value; // Constructors // ************ - protected: StandardPrivateProperty(const Name& name, const Value& value) - // ********************************************************************* - : Inherit(), - _name(name), - _value(value) - { - }; + protected: StandardPrivateProperty(const Name& name, const Value& value) + // ********************************************************************* + : Inherit(), + _name(name), + _value(value) + { + }; - public: static StandardPrivateProperty* Create(const Name& name, const Value& value ) - // ********************************************************************************** - { - StandardPrivateProperty* property = new StandardPrivateProperty(name, value); + public: static StandardPrivateProperty* create(const Name& name, const Value& value ) + // ********************************************************************************** + { + StandardPrivateProperty* property = new StandardPrivateProperty(name, value); - property->_PostCreate(); + property->_postCreate(); - return property; - }; + return property; + }; // Accessors // ********* - public: virtual Name GetName() const - // ********************************* - { - return _name; - }; + public: virtual Name getName() const + // ********************************* + { + return _name; + }; - public: const Value& GetValue() const - // ********************************** - { - return _value; - }; + public: const Value& getValue() const + // ********************************** + { + return _value; + }; // Modifieurs // ********** - public: void SetValue(const Value& value) - // ************************************** - { - _value = value; - }; + public: void setValue(const Value& value) + // ************************************** + { + _value = value; + }; // Others // ****** - public: virtual string _GetTypeName() const - // **************************************** - { - return _TName("StandardPrivateProperty"); - }; + public: virtual string _getTypeName() const + // **************************************** + { + return _TName("StandardPrivateProperty"); + }; - public: virtual string _GetString() const - // ************************************** - { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_value)); - return s; - }; + public: virtual string _getString() const + // ************************************** + { + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_value)); + return s; + }; - public: virtual Record* _GetRecord() const - // ********************************* - { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("Value", _value)); - } - return record; - }; + public: virtual Record* _getRecord() const + // ********************************* + { + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Name", &_name)); + record->Add(getSlot("Value", _value)); + } + return record; + }; }; @@ -219,40 +219,40 @@ class SharedProperty : public Property { // Types // ***** - public: typedef Property Inherit; - public: typedef set DBoSet; + public: typedef Property Inherit; + public: typedef set DBoSet; // Attributes // ********** - private: DBoSet _ownerSet; + private: DBoSet _ownerSet; // Constructors // ************ - protected: SharedProperty(); + protected: SharedProperty(); // Accessors // ********* - public: DBos GetOwners() const {return GetCollection(_ownerSet);}; + public: DBos getOwners() const {return getCollection(_ownerSet);}; // Managers // ******** - public: virtual void OnCapturedBy(DBo* owner); - public: virtual void OnReleasedBy(DBo* owner); - public: virtual void OnNotOwned(); + public: virtual void onCapturedBy(DBo* owner); + public: virtual void onReleasedBy(DBo* owner); + public: virtual void onNotOwned(); // Accessors // ********* - 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: DBoSet& _GetOwnerSet() {return _ownerSet;}; + public: DBoSet& _getOwnerSet() {return _ownerSet;}; }; @@ -268,86 +268,86 @@ template class StandardSharedProperty : public SharedProperty { // Types // ***** - public: typedef SharedProperty Inherit; + public: typedef SharedProperty Inherit; // Attributes // ********** - private: Name _name; - private: Value _value; + private: Name _name; + private: Value _value; // Constructors // ************ - protected: StandardSharedProperty(const Name& name, const Value& value) - // ******************************************************************** - : Inherit(), - _name(name), - _value(value) - { - }; + protected: StandardSharedProperty(const Name& name, const Value& value) + // ******************************************************************** + : Inherit(), + _name(name), + _value(value) + { + }; - public: static StandardSharedProperty* Create(const Name& name, const Value& value ) - // ********************************************************************************* - { - StandardSharedProperty* property = new StandardSharedProperty(name, value); + public: static StandardSharedProperty* Create(const Name& name, const Value& value ) + // ********************************************************************************* + { + StandardSharedProperty* property = new StandardSharedProperty(name, value); - property->_PostCreate(); + property->_postCreate(); - return property; - }; + return property; + }; // Accessors // ********* - public: virtual Name GetName() const - // ********************************* - { - return _name; - }; + public: virtual Name getName() const + // ********************************* + { + return _name; + }; - public: const Value& GetValue() const - // ********************************** - { - return _value; - }; + public: const Value& getValue() const + // ********************************** + { + return _value; + }; // Modifieurs // ********** - public: void SetValue(const Value& value) - // ************************************** - { - _value = value; - }; + public: void setValue(const Value& value) + // ************************************** + { + _value = value; + }; // Others // ****** - public: virtual string _GetTypeName() const - // **************************************** - { - return _TName("StandardSharedProperty"); - }; + public: virtual string _getTypeName() const + // **************************************** + { + return _TName("StandardSharedProperty"); + }; - public: virtual string _GetString() const - // ************************************** - { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_value)); - return s; - }; + public: virtual string _getString() const + // ************************************** + { + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_value)); + return s; + }; - public: virtual Record* _GetRecord() const - // ********************************* - { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("Value", &_value)); - } - return record; - }; + public: virtual Record* _getRecord() const + // ********************************* + { + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Name", &_name)); + record->Add(getSlot("Value", &_value)); + } + return record; + }; }; diff --git a/hurricane/src/hurricane/QuadTree.cpp b/hurricane/src/hurricane/QuadTree.cpp index a65fc2a5..e6bd5dc1 100644 --- a/hurricane/src/hurricane/QuadTree.cpp +++ b/hurricane/src/hurricane/QuadTree.cpp @@ -47,14 +47,14 @@ class QuadTree_Gos : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Go* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Go* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -77,13 +77,13 @@ class QuadTree_Gos : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -117,14 +117,14 @@ class QuadTree_GosUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Go* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Go* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -149,13 +149,13 @@ class QuadTree_GosUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -204,30 +204,30 @@ QuadTree::~QuadTree() if (_lrChild) delete _lrChild; } -const Box& QuadTree::GetBoundingBox() const +const Box& QuadTree::getBoundingBox() const // **************************************** { if (_boundingBox.isEmpty()) { Box& boundingBox = ((QuadTree*)this)->_boundingBox; - if (_ulChild) boundingBox.merge(_ulChild->GetBoundingBox()); - if (_urChild) boundingBox.merge(_urChild->GetBoundingBox()); - if (_llChild) boundingBox.merge(_llChild->GetBoundingBox()); - if (_lrChild) boundingBox.merge(_lrChild->GetBoundingBox()); - for_each_go(go, _goSet.GetElements()) { - boundingBox.merge(go->GetBoundingBox()); + if (_ulChild) boundingBox.merge(_ulChild->getBoundingBox()); + if (_urChild) boundingBox.merge(_urChild->getBoundingBox()); + if (_llChild) boundingBox.merge(_llChild->getBoundingBox()); + if (_lrChild) boundingBox.merge(_lrChild->getBoundingBox()); + for_each_go(go, _goSet.getElements()) { + boundingBox.merge(go->getBoundingBox()); end_for; } } return _boundingBox; } -Gos QuadTree::GetGos() const +Gos QuadTree::getGos() const // ************************* { return QuadTree_Gos(this); } -Gos QuadTree::GetGosUnder(const Box& area) const +Gos QuadTree::getGosUnder(const Box& area) const // ********************************************* { return QuadTree_GosUnder(this, area); @@ -240,8 +240,8 @@ void QuadTree::Insert(Go* go) throw Error("Can't insert go : null go"); if (!go->IsMaterialized()) { - Box boundingBox = go->GetBoundingBox(); - QuadTree* child = _GetDeepestChild(boundingBox); + Box boundingBox = go->getBoundingBox(); + QuadTree* child = _getDeepestChild(boundingBox); child->_goSet._Insert(go); go->_quadTree = child; QuadTree* parent = child; @@ -263,7 +263,7 @@ void QuadTree::Remove(Go* go) throw Error("Can't remove go : null go"); if (go->IsMaterialized()) { - Box boundingBox = go->GetBoundingBox(); + Box boundingBox = go->getBoundingBox(); QuadTree* child = go->_quadTree; child->_goSet._Remove(go); go->_quadTree = NULL; @@ -284,145 +284,145 @@ void QuadTree::Remove(Go* go) } } -string QuadTree::_GetString() const +string QuadTree::_getString() const // ******************************** { string s = "<" + _TName("QuadTree"); if (!_size) s += " empty"; else - s += " " + GetString(_size); + s += " " + getString(_size); s += ">"; return s; } -Record* QuadTree::_GetRecord() const +Record* QuadTree::_getRecord() const // *************************** { Record* record = NULL; if (_size) { - record = new Record(GetString(this)); - record->Add(GetSlot("Parent", _parent)); - record->Add(GetSlot("X", &_x)); - record->Add(GetSlot("Y", &_y)); - record->Add(GetSlot("BoundingBox", &_boundingBox)); - record->Add(GetSlot("Size", &_size)); - record->Add(GetSlot("Gos", &_goSet)); - record->Add(GetSlot("ULChild", _ulChild)); - record->Add(GetSlot("URChild", _urChild)); - record->Add(GetSlot("LLChild", _llChild)); - record->Add(GetSlot("LRChild", _lrChild)); + record = new Record(getString(this)); + record->Add(getSlot("Parent", _parent)); + record->Add(getSlot("X", &_x)); + record->Add(getSlot("Y", &_y)); + record->Add(getSlot("BoundingBox", &_boundingBox)); + record->Add(getSlot("Size", &_size)); + record->Add(getSlot("Gos", &_goSet)); + record->Add(getSlot("ULChild", _ulChild)); + record->Add(getSlot("URChild", _urChild)); + record->Add(getSlot("LLChild", _llChild)); + record->Add(getSlot("LRChild", _lrChild)); } return record; } -QuadTree* QuadTree::_GetDeepestChild(const Box& box) +QuadTree* QuadTree::_getDeepestChild(const Box& box) // ************************************************ { if (_HasBeenExploded()) { if (box.getXMax() < _x) { if (box.getYMax() < _y) - return _llChild->_GetDeepestChild(box); + return _llChild->_getDeepestChild(box); if (_y < box.getYMin()) - return _ulChild->_GetDeepestChild(box); + return _ulChild->_getDeepestChild(box); } if (_x < box.getXMin()) { if (box.getYMax() < _y) - return _lrChild->_GetDeepestChild(box); + return _lrChild->_getDeepestChild(box); if (_y < box.getYMin()) - return _urChild->_GetDeepestChild(box); + return _urChild->_getDeepestChild(box); } } return this; } -QuadTree* QuadTree::_GetFirstQuadTree() const +QuadTree* QuadTree::_getFirstQuadTree() const // ****************************************** { if (!_goSet.IsEmpty()) return (QuadTree*)this; QuadTree* quadTree = NULL; if (_HasBeenExploded()) { - if (!quadTree) quadTree = _ulChild->_GetFirstQuadTree(); - if (!quadTree) quadTree = _urChild->_GetFirstQuadTree(); - if (!quadTree) quadTree = _llChild->_GetFirstQuadTree(); - if (!quadTree) quadTree = _lrChild->_GetFirstQuadTree(); + if (!quadTree) quadTree = _ulChild->_getFirstQuadTree(); + if (!quadTree) quadTree = _urChild->_getFirstQuadTree(); + if (!quadTree) quadTree = _llChild->_getFirstQuadTree(); + if (!quadTree) quadTree = _lrChild->_getFirstQuadTree(); } return quadTree; } -QuadTree* QuadTree::_GetFirstQuadTree(const Box& area) const +QuadTree* QuadTree::_getFirstQuadTree(const Box& area) const // ********************************************************* { - if (GetBoundingBox().intersect(area)) { + if (getBoundingBox().intersect(area)) { if (!_goSet.IsEmpty()) return (QuadTree*)this; QuadTree* quadTree = NULL; if (_HasBeenExploded()) { - if (!quadTree) quadTree = _ulChild->_GetFirstQuadTree(area); - if (!quadTree) quadTree = _urChild->_GetFirstQuadTree(area); - if (!quadTree) quadTree = _llChild->_GetFirstQuadTree(area); - if (!quadTree) quadTree = _lrChild->_GetFirstQuadTree(area); + if (!quadTree) quadTree = _ulChild->_getFirstQuadTree(area); + if (!quadTree) quadTree = _urChild->_getFirstQuadTree(area); + if (!quadTree) quadTree = _llChild->_getFirstQuadTree(area); + if (!quadTree) quadTree = _lrChild->_getFirstQuadTree(area); } return quadTree; } return NULL; } -QuadTree* QuadTree::_GetNextQuadTree() +QuadTree* QuadTree::_getNextQuadTree() // *********************************** { QuadTree* nextQuadTree = NULL; if (_HasBeenExploded()) { - if (!nextQuadTree) nextQuadTree = _ulChild->_GetFirstQuadTree(); - if (!nextQuadTree) nextQuadTree = _urChild->_GetFirstQuadTree(); - if (!nextQuadTree) nextQuadTree = _llChild->_GetFirstQuadTree(); - if (!nextQuadTree) nextQuadTree = _lrChild->_GetFirstQuadTree(); + if (!nextQuadTree) nextQuadTree = _ulChild->_getFirstQuadTree(); + if (!nextQuadTree) nextQuadTree = _urChild->_getFirstQuadTree(); + if (!nextQuadTree) nextQuadTree = _llChild->_getFirstQuadTree(); + if (!nextQuadTree) nextQuadTree = _lrChild->_getFirstQuadTree(); } QuadTree* quadTree = this; while (!nextQuadTree && quadTree->_parent) { if (quadTree->_parent->_llChild == quadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(); else if (quadTree->_parent->_urChild == quadTree) { - nextQuadTree = quadTree->_parent->_llChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_llChild->_getFirstQuadTree(); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(); } else if (quadTree->_parent->_ulChild == quadTree) { - nextQuadTree = quadTree->_parent->_urChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_urChild->_getFirstQuadTree(); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_llChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_llChild->_getFirstQuadTree(); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(); } quadTree = quadTree->_parent; } return nextQuadTree; } -QuadTree* QuadTree::_GetNextQuadTree(const Box& area) +QuadTree* QuadTree::_getNextQuadTree(const Box& area) // ************************************************** { QuadTree* nextQuadTree = NULL; if (_HasBeenExploded()) { - if (!nextQuadTree) nextQuadTree = _ulChild->_GetFirstQuadTree(area); - if (!nextQuadTree) nextQuadTree = _urChild->_GetFirstQuadTree(area); - if (!nextQuadTree) nextQuadTree = _llChild->_GetFirstQuadTree(area); - if (!nextQuadTree) nextQuadTree = _lrChild->_GetFirstQuadTree(area); + if (!nextQuadTree) nextQuadTree = _ulChild->_getFirstQuadTree(area); + if (!nextQuadTree) nextQuadTree = _urChild->_getFirstQuadTree(area); + if (!nextQuadTree) nextQuadTree = _llChild->_getFirstQuadTree(area); + if (!nextQuadTree) nextQuadTree = _lrChild->_getFirstQuadTree(area); } QuadTree* quadTree = this; while (!nextQuadTree && quadTree->_parent) { if (quadTree->_parent->_llChild == quadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(area); else if (quadTree->_parent->_urChild == quadTree) { - nextQuadTree = quadTree->_parent->_llChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_llChild->_getFirstQuadTree(area); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(area); } else if (quadTree->_parent->_ulChild == quadTree) { - nextQuadTree = quadTree->_parent->_urChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_urChild->_getFirstQuadTree(area); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_llChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_llChild->_getFirstQuadTree(area); if (!nextQuadTree) - nextQuadTree = quadTree->_parent->_lrChild->_GetFirstQuadTree(area); + nextQuadTree = quadTree->_parent->_lrChild->_getFirstQuadTree(area); } quadTree = quadTree->_parent; } @@ -433,21 +433,21 @@ void QuadTree::_Explode() // ********************** { if (!_HasBeenExploded()) { - _x = GetBoundingBox().getXCenter(); - _y = GetBoundingBox().getYCenter(); + _x = getBoundingBox().getXCenter(); + _y = getBoundingBox().getYCenter(); _ulChild = new QuadTree(this); _urChild = new QuadTree(this); _llChild = new QuadTree(this); _lrChild = new QuadTree(this); set goSet; - for_each_go(go, _goSet.GetElements()) { + for_each_go(go, _goSet.getElements()) { _goSet._Remove(go); go->_quadTree = NULL; goSet.insert(go); end_for; } - for_each_go(go, GetCollection(goSet)) { - QuadTree* child = _GetDeepestChild(go->GetBoundingBox()); + for_each_go(go, getCollection(goSet)) { + QuadTree* child = _getDeepestChild(go->getBoundingBox()); child->_goSet._Insert(go); go->_quadTree = child; if (child != this) child->_size++; @@ -461,7 +461,7 @@ void QuadTree::_Implode() { if (_HasBeenExploded()) { if (_ulChild->_HasBeenExploded()) _ulChild->_Implode(); - for_each_go(go, _ulChild->_goSet.GetElements()) { + for_each_go(go, _ulChild->_goSet.getElements()) { _ulChild->_goSet._Remove(go); _goSet._Insert(go); go->_quadTree = this; @@ -470,7 +470,7 @@ void QuadTree::_Implode() delete _ulChild; _ulChild = NULL; if (_urChild->_HasBeenExploded()) _urChild->_Implode(); - for_each_go(go, _urChild->_goSet.GetElements()) { + for_each_go(go, _urChild->_goSet.getElements()) { _urChild->_goSet._Remove(go); _goSet._Insert(go); go->_quadTree = this; @@ -479,7 +479,7 @@ void QuadTree::_Implode() delete _urChild; _urChild = NULL; if (_llChild->_HasBeenExploded()) _llChild->_Implode(); - for_each_go(go, _llChild->_goSet.GetElements()) { + for_each_go(go, _llChild->_goSet.getElements()) { _llChild->_goSet._Remove(go); _goSet._Insert(go); go->_quadTree = this; @@ -488,7 +488,7 @@ void QuadTree::_Implode() delete _llChild; _llChild = NULL; if (_lrChild->_HasBeenExploded()) _lrChild->_Implode(); - for_each_go(go, _lrChild->_goSet.GetElements()) { + for_each_go(go, _lrChild->_goSet.getElements()) { _lrChild->_goSet._Remove(go); _goSet._Insert(go); go->_quadTree = this; @@ -511,16 +511,16 @@ QuadTree::GoSet::GoSet() { } -unsigned QuadTree::GoSet::_GetHashValue(Go* go) const +unsigned QuadTree::GoSet::_getHashValue(Go* go) const // ************************************************** { return ( (unsigned int)( (unsigned long)go ) ) / 8; } -Go* QuadTree::GoSet::_GetNextElement(Go* go) const +Go* QuadTree::GoSet::_getNextElement(Go* go) const // *********************************************** { - return go->_GetNextOfQuadTreeGoSet(); + return go->_getNextOfQuadTreeGoSet(); } void QuadTree::GoSet::_SetNextElement(Go* go, Go* nextGo) const @@ -556,23 +556,23 @@ QuadTree_Gos& QuadTree_Gos::operator=(const QuadTree_Gos& gos) return *this; } -Collection* QuadTree_Gos::GetClone() const +Collection* QuadTree_Gos::getClone() const // ******************************************** { return new QuadTree_Gos(*this); } -Locator* QuadTree_Gos::GetLocator() const +Locator* QuadTree_Gos::getLocator() const // ******************************************* { return new Locator(_quadTree); } -string QuadTree_Gos::_GetString() const +string QuadTree_Gos::_getString() const // ************************************ { string s = "<" + _TName("QuadTree::Gos"); - if (_quadTree) s += " " + GetString(_quadTree); + if (_quadTree) s += " " + getString(_quadTree); s += ">"; return s; } @@ -591,9 +591,9 @@ QuadTree_Gos::Locator::Locator(const QuadTree* quadTree) _goLocator() { if (_quadTree) { - _currentQuadTree = _quadTree->_GetFirstQuadTree(); + _currentQuadTree = _quadTree->_getFirstQuadTree(); if (_currentQuadTree) - _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); + _goLocator = _currentQuadTree->_getGoSet().getElements().getLocator(); } } @@ -615,13 +615,13 @@ QuadTree_Gos::Locator& QuadTree_Gos::Locator::operator=(const Locator& locator) return *this; } -Go* QuadTree_Gos::Locator::GetElement() const +Go* QuadTree_Gos::Locator::getElement() const // ****************************************** { - return _goLocator.GetElement(); + return _goLocator.getElement(); } -Locator* QuadTree_Gos::Locator::GetClone() const +Locator* QuadTree_Gos::Locator::getClone() const // ************************************************** { return new Locator(*this); @@ -639,18 +639,18 @@ void QuadTree_Gos::Locator::Progress() if (IsValid()) { _goLocator.Progress(); if (!_goLocator.IsValid()) { - _currentQuadTree = _currentQuadTree->_GetNextQuadTree(); + _currentQuadTree = _currentQuadTree->_getNextQuadTree(); if (_currentQuadTree) - _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); + _goLocator = _currentQuadTree->_getGoSet().getElements().getLocator(); } } } -string QuadTree_Gos::Locator::_GetString() const +string QuadTree_Gos::Locator::_getString() const // ********************************************* { string s = "<" + _TName("QuadTree::Gos::Locator"); - if (_quadTree) s += " " + GetString(_quadTree); + if (_quadTree) s += " " + getString(_quadTree); s += ">"; return s; } @@ -693,25 +693,25 @@ QuadTree_GosUnder& QuadTree_GosUnder::operator=(const QuadTree_GosUnder& gos) return *this; } -Collection* QuadTree_GosUnder::GetClone() const +Collection* QuadTree_GosUnder::getClone() const // ************************************************* { return new QuadTree_GosUnder(*this); } -Locator* QuadTree_GosUnder::GetLocator() const +Locator* QuadTree_GosUnder::getLocator() const // ************************************************ { return new Locator(_quadTree, _area); } -string QuadTree_GosUnder::_GetString() const +string QuadTree_GosUnder::_getString() const // ***************************************** { string s = "<" + _TName("QuadTree::GosUnder"); if (_quadTree) { - s += " " + GetString(_quadTree); - s += " " + GetString(_area); + s += " " + getString(_quadTree); + s += " " + getString(_area); } s += ">"; return s; @@ -742,10 +742,10 @@ QuadTree_GosUnder::Locator::Locator(const QuadTree* quadTree, const Box& area) _goLocator() { if (_quadTree && !_area.isEmpty()) { - _currentQuadTree = _quadTree->_GetFirstQuadTree(_area); + _currentQuadTree = _quadTree->_getFirstQuadTree(_area); if (_currentQuadTree) { - _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); - if (!GetElement()->GetBoundingBox().intersect(_area)) Progress(); + _goLocator = _currentQuadTree->_getGoSet().getElements().getLocator(); + if (!getElement()->getBoundingBox().intersect(_area)) Progress(); } } } @@ -770,13 +770,13 @@ QuadTree_GosUnder::Locator& QuadTree_GosUnder::Locator::operator=(const Locator& return *this; } -Go* QuadTree_GosUnder::Locator::GetElement() const +Go* QuadTree_GosUnder::Locator::getElement() const // *********************************************** { - return _goLocator.GetElement(); + return _goLocator.getElement(); } -Locator* QuadTree_GosUnder::Locator::GetClone() const +Locator* QuadTree_GosUnder::Locator::getClone() const // ******************************************************* { return new Locator(*this); @@ -795,21 +795,21 @@ void QuadTree_GosUnder::Locator::Progress() do { _goLocator.Progress(); if (!_goLocator.IsValid()) { - _currentQuadTree = _currentQuadTree->_GetNextQuadTree(_area); + _currentQuadTree = _currentQuadTree->_getNextQuadTree(_area); if (_currentQuadTree) - _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); + _goLocator = _currentQuadTree->_getGoSet().getElements().getLocator(); } - } while (IsValid() && !GetElement()->GetBoundingBox().intersect(_area)); + } while (IsValid() && !getElement()->getBoundingBox().intersect(_area)); } } -string QuadTree_GosUnder::Locator::_GetString() const +string QuadTree_GosUnder::Locator::_getString() const // ************************************************** { string s = "<" + _TName("QuadTree::GosUnder::Locator"); if (_quadTree) { - s += " " + GetString(_quadTree); - s += " " + GetString(_area); + s += " " + getString(_quadTree); + s += " " + getString(_area); } s += ">"; return s; diff --git a/hurricane/src/hurricane/QuadTree.h b/hurricane/src/hurricane/QuadTree.h index 5cbe4d61..2962dc5e 100644 --- a/hurricane/src/hurricane/QuadTree.h +++ b/hurricane/src/hurricane/QuadTree.h @@ -23,88 +23,88 @@ class QuadTree { // Types // ***** - public: class GoSet : public IntrusiveSet { - // ******************************************* + public: class GoSet : public IntrusiveSet { + // ******************************************* - public: typedef IntrusiveSet Inherit; - - public: GoSet(); + public: typedef IntrusiveSet Inherit; + + public: GoSet(); - public: virtual unsigned _GetHashValue(Go* go) const; - public: virtual Go* _GetNextElement(Go* go) const; - public: virtual void _SetNextElement(Go* go, Go* nextGo) const; + public: virtual unsigned _getHashValue(Go* go) const; + public: virtual Go* _getNextElement(Go* go) const; + public: virtual void _SetNextElement(Go* go, Go* nextGo) const; - }; + }; // Attributes // ********** - private: QuadTree* _parent; - private: Unit _x; - private: Unit _y; - private: Box _boundingBox; - private: unsigned _size; - private: GoSet _goSet; - private: QuadTree* _ulChild; // Upper Left Child - private: QuadTree* _urChild; // Upper Right Child - private: QuadTree* _llChild; // Lower Left Child - private: QuadTree* _lrChild; // Lower Right Child + private: QuadTree* _parent; + private: Unit _x; + private: Unit _y; + private: Box _boundingBox; + private: unsigned _size; + private: GoSet _goSet; + private: QuadTree* _ulChild; // Upper Left Child + private: QuadTree* _urChild; // Upper Right Child + private: QuadTree* _llChild; // Lower Left Child + private: QuadTree* _lrChild; // Lower Right Child // Constructors // ************ - public: QuadTree(); + public: QuadTree(); - private: QuadTree(QuadTree* parent); + private: QuadTree(QuadTree* parent); - private: QuadTree(const QuadTree& quadTree); // not implemented to forbid copy construction + private: QuadTree(const QuadTree& quadTree); // not implemented to forbid copy construction // Destructor // ********** - public: ~QuadTree(); + public: ~QuadTree(); // Operators // ********* - private: QuadTree& operator=(const QuadTree& quadTree); // not implemented to forbid assignment + private: QuadTree& operator=(const QuadTree& quadTree); // not implemented to forbid assignment // Accessors // ********* - public: const Box& GetBoundingBox() const; - public: Gos GetGos() const; - public: Gos GetGosUnder(const Box& area) const; + public: const Box& getBoundingBox() const; + public: Gos getGos() const; + public: Gos getGosUnder(const Box& area) const; // Predicates // ********** - public: bool IsEmpty() const {return (_size == 0);}; + public: bool IsEmpty() const {return (_size == 0);}; // Updators // ******** - public: void Insert(Go* go); - public: void Remove(Go* go); + public: void Insert(Go* go); + public: void Remove(Go* go); // Others // ****** - public: string _GetTypeName() const { return _TName("QuadTree"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("QuadTree"); }; + public: string _getString() const; + public: Record* _getRecord() const; - public: GoSet& _GetGoSet() {return _goSet;}; - public: QuadTree* _GetDeepestChild(const Box& box); - public: QuadTree* _GetFirstQuadTree() const; - public: QuadTree* _GetFirstQuadTree(const Box& area) const; - public: QuadTree* _GetNextQuadTree(); - public: QuadTree* _GetNextQuadTree(const Box& area); + public: GoSet& _getGoSet() {return _goSet;}; + public: QuadTree* _getDeepestChild(const Box& box); + public: QuadTree* _getFirstQuadTree() const; + public: QuadTree* _getFirstQuadTree(const Box& area) const; + public: QuadTree* _getNextQuadTree(); + public: QuadTree* _getNextQuadTree(const Box& area); - public: bool _HasBeenExploded() const {return (_ulChild != NULL);}; + public: bool _HasBeenExploded() const {return (_ulChild != NULL);}; - public: void _Explode(); - public: void _Implode(); + public: void _Explode(); + public: void _Implode(); }; diff --git a/hurricane/src/hurricane/Quark.cpp b/hurricane/src/hurricane/Quark.cpp index 79c2e9d5..37bd6ebe 100644 --- a/hurricane/src/hurricane/Quark.cpp +++ b/hurricane/src/hurricane/Quark.cpp @@ -29,77 +29,77 @@ static Quark_QuarkMap* NULL_SHARED_PATH_QUARK_MAP = NULL; Quark::Quark(const Occurrence& occurrence) // ************************************* -: Inherit(), - _occurrence(occurrence), - _nextOfSharedPathQuarkMap(NULL) +: Inherit(), + _occurrence(occurrence), + _nextOfSharedPathQuarkMap(NULL) { - if (!_occurrence.IsValid()) - throw Error("Can't create " + _TName("Quark") + " : invalid occurrence"); + if (!_occurrence.IsValid()) + throw Error("Can't create " + _TName("Quark") + " : invalid occurrence"); - if (_occurrence._GetQuark()) - throw Error("Can't create " + _TName("Quark") + " : already exists"); + if (_occurrence._getQuark()) + throw Error("Can't create " + _TName("Quark") + " : already exists"); } Quark* Quark::_Create(const Occurrence& occurrence) // ********************************************** { - Quark* quark = new Quark(occurrence); + Quark* quark = new Quark(occurrence); - quark->_PostCreate(); + quark->_postCreate(); - return quark; + return quark; } -void Quark::_PostCreate() +void Quark::_postCreate() // ********************** { - SharedPath* sharedPath = _occurrence._GetSharedPath(); + SharedPath* sharedPath = _occurrence._getSharedPath(); - if (sharedPath) - sharedPath->_GetQuarkMap()._Insert(this); - else { - if (!NULL_SHARED_PATH_QUARK_MAP) NULL_SHARED_PATH_QUARK_MAP = new Quark_QuarkMap(); - NULL_SHARED_PATH_QUARK_MAP->_Insert(this); - } + if (sharedPath) + sharedPath->_getQuarkMap()._Insert(this); + else { + if (!NULL_SHARED_PATH_QUARK_MAP) NULL_SHARED_PATH_QUARK_MAP = new Quark_QuarkMap(); + NULL_SHARED_PATH_QUARK_MAP->_Insert(this); + } - Inherit::_PostCreate(); + Inherit::_postCreate(); } -void Quark::_PreDelete() +void Quark::_preDestroy() // ********************* { -// trace << "entering Quark::_PreDelete: " << this << endl; +// trace << "entering Quark::_preDestroy: " << this << endl; // trace_in(); - Inherit::_PreDelete(); + Inherit::_preDestroy(); - SharedPath* sharedPath = _occurrence._GetSharedPath(); + SharedPath* sharedPath = _occurrence._getSharedPath(); - if (sharedPath) - sharedPath->_GetQuarkMap()._Remove(this); - else - if (NULL_SHARED_PATH_QUARK_MAP) NULL_SHARED_PATH_QUARK_MAP->_Remove(this); + if (sharedPath) + sharedPath->_getQuarkMap()._Remove(this); + else + if (NULL_SHARED_PATH_QUARK_MAP) NULL_SHARED_PATH_QUARK_MAP->_Remove(this); -// trace << "exiting Quark::_PreDelete:" << endl; +// trace << "exiting Quark::_preDestroy:" << endl; // trace_out(); } -string Quark::_GetString() const +string Quark::_getString() const // ***************************** { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_occurrence)); - return s; + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_occurrence)); + return s; } -Record* Quark::_GetRecord() const +Record* Quark::_getRecord() const // ************************ { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Occurrence", &_occurrence)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Occurrence", &_occurrence)); + } + return record; } @@ -108,15 +108,15 @@ Record* Quark::_GetRecord() const // Entity implementation (located here to access the local variables) // **************************************************************************************************** -Quark* Entity::_GetQuark(SharedPath* sharedPath) const +Quark* Entity::_getQuark(SharedPath* sharedPath) const // *************************************************** { - if (sharedPath) - return sharedPath->_GetQuark(this); - else { - if (!NULL_SHARED_PATH_QUARK_MAP) return NULL; - return NULL_SHARED_PATH_QUARK_MAP->GetElement(this); - } + if (sharedPath) + return sharedPath->_getQuark(this); + else { + if (!NULL_SHARED_PATH_QUARK_MAP) return NULL; + return NULL_SHARED_PATH_QUARK_MAP->getElement(this); + } } diff --git a/hurricane/src/hurricane/Quark.h b/hurricane/src/hurricane/Quark.h index df8bdede..ca1b5400 100644 --- a/hurricane/src/hurricane/Quark.h +++ b/hurricane/src/hurricane/Quark.h @@ -25,38 +25,38 @@ class Quark : public DBo { // Types // ***** - public: typedef DBo Inherit; + public: typedef DBo Inherit; // Attributes // ********** - private: Occurrence _occurrence; - private: Quark* _nextOfSharedPathQuarkMap; + private: Occurrence _occurrence; + private: Quark* _nextOfSharedPathQuarkMap; // Constructors // ************ - protected: Quark(const Occurrence& occurrence); + protected: Quark(const Occurrence& occurrence); // Accessors // ********* - public: const Occurrence& GetOccurrence() const {return _occurrence;}; + public: const Occurrence& getOccurrence() const {return _occurrence;}; // Others // ****** - public: static Quark* _Create(const Occurrence& occurrence); - protected: virtual void _PostCreate(); + public: static Quark* _Create(const Occurrence& occurrence); + protected: virtual void _postCreate(); - protected: virtual void _PreDelete(); + protected: virtual void _preDestroy(); - public: virtual string _GetTypeName() const {return _TName("Quark");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; - public: Quark* _GetNextOfSharedPathQuarkMap() const {return _nextOfSharedPathQuarkMap;}; + public: virtual string _getTypeName() const {return _TName("Quark");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; + public: Quark* _getNextOfSharedPathQuarkMap() const {return _nextOfSharedPathQuarkMap;}; - public: void _SetNextOfSharedPathQuarkMap(Quark* quark) {_nextOfSharedPathQuarkMap = quark;}; + public: void _SetNextOfSharedPathQuarkMap(Quark* quark) {_nextOfSharedPathQuarkMap = quark;}; }; diff --git a/hurricane/src/hurricane/Quarks.h b/hurricane/src/hurricane/Quarks.h index 179439e4..423d7308 100644 --- a/hurricane/src/hurricane/Quarks.h +++ b/hurricane/src/hurricane/Quarks.h @@ -46,10 +46,10 @@ typedef GenericFilter QuarkFilter; #define for_each_quark(quark, quarks)\ /************************************/\ {\ - QuarkLocator _locator = quarks.GetLocator();\ - while (_locator.IsValid()) {\ - Quark* quark = _locator.GetElement();\ - _locator.Progress(); + QuarkLocator _locator = quarks.getLocator();\ + while (_locator.IsValid()) {\ + Quark* quark = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Reference.cpp b/hurricane/src/hurricane/Reference.cpp index bd1a4d98..086a2ddd 100644 --- a/hurricane/src/hurricane/Reference.cpp +++ b/hurricane/src/hurricane/Reference.cpp @@ -30,7 +30,7 @@ Reference::Reference(Cell* cell, const Name& name, Unit x, Unit y) _name(name), _point(x,y) { - if ( !_extend ) _extend = GetUnit(0.5); + if ( !_extend ) _extend = getUnit(0.5); if (_name.IsEmpty()) throw Error("Can't create " + _TName("Reference") + " : empty name"); @@ -41,7 +41,7 @@ Reference* Reference::Create(Cell* cell, const Name& name, Unit x, Unit y) { Reference* reference = new Reference(cell, name, x, y); - reference->_PostCreate(); + reference->_postCreate(); return reference; } @@ -52,7 +52,7 @@ Reference* Reference::Create(Cell* cell, const Name& name, const Point& point) return Create(cell,name,point.getX(),point.getY()); } -Box Reference::GetBoundingBox() const +Box Reference::getBoundingBox() const // *********************************** { return Box(_point).inflate(_extend); @@ -67,66 +67,26 @@ void Reference::Translate(const Unit& dx, const Unit& dy) } } -string Reference::_GetString() const +string Reference::_getString() const // ******************************** { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_name)); - s.insert(s.length() - 1, " " + GetString(_point)); + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_name)); + s.insert(s.length() - 1, " " + getString(_point)); return s; } -Record* Reference::_GetRecord() const +Record* Reference::_getRecord() const // *************************** { - Record* record = Inherit::_GetRecord(); + Record* record = Inherit::_getRecord(); if (record) { - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("point", &_point)); + record->Add(getSlot("Name", &_name)); + record->Add(getSlot("point", &_point)); } return record; } -//bool Reference::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const -//// **************************************************************************************** -//{ -// return GetBoundingBox().Intersect(Box(point).Inflate(aperture)); -//} -// -//void Reference::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) -//// **************************************************************************************************** -//{ -// assert(!basicLayer); -// -// Point center = transformation.GetPoint(_point); -// -// view->DrawLine( center.GetX() - _extend -// , center.GetY() -// , center.GetX() + _extend -// , center.GetY() -// ); -// view->DrawLine( center.GetX() -// , center.GetY() - _extend -// , center.GetX() -// , center.GetY() + _extend -// ); -// view->FillCircle(center, _extend>>1); -// if ( view->IsTextVisible() ) { -// view->DrawString( GetString(_name) -// , center.GetX() + _extend -// , center.GetY() + _extend -// ); -// } -//} -// -//void Reference::_Highlight(View* view, const Box& updateArea, const Transformation& transformation) -//// ********************************************************************************************** -//{ -// _Draw(view,NULL,updateArea,transformation); -//} -// -// - } // End of Hurricane namespace. // **************************************************************************************************** diff --git a/hurricane/src/hurricane/Reference.h b/hurricane/src/hurricane/Reference.h index 6cff7bf3..9865053a 100644 --- a/hurricane/src/hurricane/Reference.h +++ b/hurricane/src/hurricane/Reference.h @@ -24,45 +24,41 @@ class Reference : public Marker { // Types // ***** - public: typedef Marker Inherit; + public: typedef Marker Inherit; // Attributes // ********** - public: Name _name; - public: Point _point; + public: Name _name; + public: Point _point; public: static Unit _extend; // Constructors // ************ - protected: Reference(Cell* cell, const Name& name, Unit x, Unit y); + protected: Reference(Cell* cell, const Name& name, Unit x, Unit y); - public: static Reference* Create(Cell* cell, const Name& name, Unit x, Unit y ); - public: static Reference* Create(Cell* cell, const Name& name, const Point& point ); + public: static Reference* Create(Cell* cell, const Name& name, Unit x, Unit y ); + public: static Reference* Create(Cell* cell, const Name& name, const Point& point ); // Accessors // ********* - public: virtual Box GetBoundingBox() const; - public: const Name& GetName() const {return _name;}; - public: const Point& GetPoint() const {return _point;}; + public: virtual Box getBoundingBox() const; + public: const Name& getName() const {return _name;}; + public: const Point& getPoint() const {return _point;}; // Updators // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); // Others // ****** - public: virtual string _GetTypeName() const {return _TName("Reference");}; - 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); + public: virtual string _getTypeName() const {return _TName("Reference");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/References.h b/hurricane/src/hurricane/References.h index 091fc212..81dc01b0 100644 --- a/hurricane/src/hurricane/References.h +++ b/hurricane/src/hurricane/References.h @@ -46,9 +46,9 @@ typedef GenericFilter ReferenceFilter; #define for_each_reference(reference, references)\ /***************************************/\ {\ - ReferenceLocator _locator = references.GetLocator();\ + ReferenceLocator _locator = references.getLocator();\ while (_locator.IsValid()) {\ - Reference* reference = _locator.GetElement();\ + Reference* reference = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Region.cpp b/hurricane/src/hurricane/Region.cpp index a0053df9..be19b0be 100644 --- a/hurricane/src/hurricane/Region.cpp +++ b/hurricane/src/hurricane/Region.cpp @@ -20,7 +20,7 @@ void DblSupply_Stop(const Region& region, const string msg, const Box selBox, co #endif #if DEBUG_REGION // Calling sequence - string msg = "Region::GetIntersection avant Groove"; + string msg = "Region::getIntersection avant Groove"; DblSupply_Stop(region, msg, box, -10); #endif @@ -44,11 +44,11 @@ class Region_Tile { public: IsVoidFilter& operator=(const IsVoidFilter& filter); - public: virtual Filter* GetClone() const; + public: virtual Filter* getClone() const; public: virtual bool Accept(Region_Tile* tile) const; - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -82,25 +82,25 @@ class Region_Tile { // Accessors // ********* - public: const Box& GetBoundingBox() const {return _boundingBox;}; + public: const Box& getBoundingBox() const {return _boundingBox;}; - public: const Unit& GetXMin() const {return _boundingBox.getXMin();}; - public: const Unit& GetYMin() const {return _boundingBox.getYMin();}; - public: const Unit& GetXMax() const {return _boundingBox.getXMax();}; - public: const Unit& GetYMax() const {return _boundingBox.getYMax();}; + public: const Unit& getXMin() const {return _boundingBox.getXMin();}; + public: const Unit& getYMin() const {return _boundingBox.getYMin();}; + public: const Unit& getXMax() const {return _boundingBox.getXMax();}; + public: const Unit& getYMax() const {return _boundingBox.getYMax();}; - public: Region_Tile* GetTileAt(const Point& point) const; - public: Region_Tile* GetNonVoidTileAt(const Point& point) const; + public: Region_Tile* getTileAt(const Point& point) const; + public: Region_Tile* getNonVoidTileAt(const Point& point) const; - public: Region_Tile* GetLeftTile(const Unit& y) const; - public: Region_Tile* GetBottomTile(const Unit& x) const; - public: Region_Tile* GetTopTile(const Unit& x) const; - public: Region_Tile* GetRightTile(const Unit& y) const; + public: Region_Tile* getLeftTile(const Unit& y) const; + public: Region_Tile* getBottomTile(const Unit& x) const; + public: Region_Tile* getTopTile(const Unit& x) const; + public: Region_Tile* getRightTile(const Unit& y) const; // Filters // ******* - public: static GenericFilter GetIsVoidFilter(); + public: static GenericFilter getIsVoidFilter(); // Predicates // ********** @@ -125,9 +125,9 @@ class Region_Tile { // Others // ****** - public: string _GetTypeName() const { return _TName("Region_Tile"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Region_Tile"); }; + public: string _getString() const; + public: Record* _getRecord() const; private: bool _IsTopFull() const; private: bool _IsBottomFull() const; @@ -142,10 +142,10 @@ class Region_Tile { private: bool _LeftSplitAtVerticalSize (Region* region, const Unit width); private: bool _RightSplitAtVerticalSize (Region* region, const Unit width); - public: Interval _GetTopNeighbour () const; - public: Interval _GetBottomNeighbour () const; - public: Interval _GetLeftNeighbour () const; - public: Interval _GetRightNeighbour () const; + public: Interval _getTopNeighbour () const; + public: Interval _getBottomNeighbour () const; + public: Interval _getLeftNeighbour () const; + public: Interval _getRightNeighbour () const; }; // class Region_Tile @@ -175,72 +175,72 @@ Region_Tile::~Region_Tile() bool Region_Tile::contains(const Point& point) const // ************************************************* { - return ((GetXMin() <= point.getX()) && - (GetYMin() <= point.getY()) && - ((point.getX() < GetXMax()) || (!_rightTile && (point.getX() == GetXMax()))) && - ((point.getY() < GetYMax()) || (!_topTile && (point.getY() == GetYMax())))); + return ((getXMin() <= point.getX()) && + (getYMin() <= point.getY()) && + ((point.getX() < getXMax()) || (!_rightTile && (point.getX() == getXMax()))) && + ((point.getY() < getYMax()) || (!_topTile && (point.getY() == getYMax())))); } -Region_Tile* Region_Tile::GetTileAt(const Point& point) const +Region_Tile* Region_Tile::getTileAt(const Point& point) const // ********************************************************** { if (contains(point)) return (Region_Tile*)this; - if (_topTile && (GetYMax() <= point.getY())) return _topTile->GetTileAt(point); + if (_topTile && (getYMax() <= point.getY())) return _topTile->getTileAt(point); - if (_leftTile && (point.getX() < GetXMin())) return _leftTile->GetTileAt(point); + if (_leftTile && (point.getX() < getXMin())) return _leftTile->getTileAt(point); return NULL; } -Region_Tile* Region_Tile::GetNonVoidTileAt(const Point& point) const +Region_Tile* Region_Tile::getNonVoidTileAt(const Point& point) const // ***************************************************************** { if (contains(point)) { if (!_isVoid) return (Region_Tile*)this; - if ((GetXMin() < point.getX()) && (GetYMin() < point.getY())) return NULL; + if ((getXMin() < point.getX()) && (getYMin() < point.getY())) return NULL; } - if (_topTile && (GetYMax() <= point.getY())) return _topTile->GetNonVoidTileAt(point); + if (_topTile && (getYMax() <= point.getY())) return _topTile->getNonVoidTileAt(point); - if (_leftTile && (point.getX() <= GetXMin())) return _leftTile->GetNonVoidTileAt(point); + if (_leftTile && (point.getX() <= getXMin())) return _leftTile->getNonVoidTileAt(point); return NULL; } -Region_Tile* Region_Tile::GetLeftTile(const Unit& y) const +Region_Tile* Region_Tile::getLeftTile(const Unit& y) const // ******************************************************* { Region_Tile* tile = _leftTile; - while (tile && (tile->GetYMax() <= y)) tile = tile->_topTile; + while (tile && (tile->getYMax() <= y)) tile = tile->_topTile; return tile; } -Region_Tile* Region_Tile::GetBottomTile(const Unit& x) const +Region_Tile* Region_Tile::getBottomTile(const Unit& x) const // ********************************************************* { Region_Tile* tile = _bottomTile; - while (tile && (tile->GetXMax() <= x)) tile = tile->_rightTile; + while (tile && (tile->getXMax() <= x)) tile = tile->_rightTile; return tile; } -Region_Tile* Region_Tile::GetTopTile(const Unit& x) const +Region_Tile* Region_Tile::getTopTile(const Unit& x) const // ****************************************************** { Region_Tile* tile = _topTile; - while (tile && (x < tile->GetXMin())) tile = tile->_leftTile; + while (tile && (x < tile->getXMin())) tile = tile->_leftTile; return tile; } -Region_Tile* Region_Tile::GetRightTile(const Unit& y) const +Region_Tile* Region_Tile::getRightTile(const Unit& y) const // ******************************************************** { Region_Tile* tile = _rightTile; - while (tile && (y < tile->GetYMin())) tile = tile->_bottomTile; + while (tile && (y < tile->getYMin())) tile = tile->_bottomTile; return tile; } -GenericFilter Region_Tile::GetIsVoidFilter() +GenericFilter Region_Tile::getIsVoidFilter() // ******************************************************* { return Region_Tile::IsVoidFilter(); @@ -249,8 +249,8 @@ GenericFilter Region_Tile::GetIsVoidFilter() void Region_Tile::SplitVertical(Region* region, const Unit& x) // *********************************************************** { - if ((GetXMin() < x) && (x < GetXMax())) { - Region_Tile* newTile = new Region_Tile(Box(x, GetYMin(), GetXMax(), GetYMax()), IsVoid()); + if ((getXMin() < x) && (x < getXMax())) { + Region_Tile* newTile = new Region_Tile(Box(x, getYMin(), getXMax(), getYMax()), IsVoid()); newTile->_leftTile = this; newTile->_rightTile = _rightTile; @@ -265,33 +265,33 @@ void Region_Tile::SplitVertical(Region* region, const Unit& x) Region_Tile* tile = _bottomTile; while (tile && (tile->_topTile == this)) { - if (x < tile->GetXMax()) tile->_topTile = newTile; + if (x < tile->getXMax()) tile->_topTile = newTile; tile = tile->_rightTile; } if (_bottomTile) { newTile->_bottomTile = _bottomTile; - while (newTile->_bottomTile->GetXMax() <= newTile->GetXMin()) + while (newTile->_bottomTile->getXMax() <= newTile->getXMin()) newTile->_bottomTile = newTile->_bottomTile->_rightTile; } newTile->_topTile = _topTile; while (_topTile && (_topTile->_bottomTile == this)) { - if (_topTile->GetXMin() < x) break; + if (_topTile->getXMin() < x) break; _topTile->_bottomTile = newTile; _topTile = _topTile->_leftTile; } - _boundingBox = Box(GetXMin(), GetYMin(), x, GetYMax()); + _boundingBox = Box(getXMin(), getYMin(), x, getYMax()); - if (region->_GetBottomRightTile() == this) region->_SetBottomRightTile(newTile); + if (region->_getBottomRightTile() == this) region->_SetBottomRightTile(newTile); } } void Region_Tile::SplitHorizontal(Region* region, const Unit& y) // ************************************************************* { - if ((GetYMin() < y) && (y < GetYMax())) { - Region_Tile* newTile = new Region_Tile(Box(GetXMin(), y, GetXMax(), GetYMax()), IsVoid()); + if ((getYMin() < y) && (y < getYMax())) { + Region_Tile* newTile = new Region_Tile(Box(getXMin(), y, getXMax(), getYMax()), IsVoid()); newTile->_bottomTile = this; newTile->_topTile = _topTile; @@ -306,25 +306,25 @@ void Region_Tile::SplitHorizontal(Region* region, const Unit& y) Region_Tile* tile = _leftTile; while (tile && (tile->_rightTile == this)) { - if (y < tile->GetYMax()) tile->_rightTile = newTile; + if (y < tile->getYMax()) tile->_rightTile = newTile; tile = tile->_topTile; } if (_leftTile) { newTile->_leftTile = _leftTile; - while (newTile->_leftTile->GetYMax() <= newTile->GetYMin()) + while (newTile->_leftTile->getYMax() <= newTile->getYMin()) newTile->_leftTile = newTile->_leftTile->_topTile; } newTile->_rightTile = _rightTile; while (_rightTile && (_rightTile->_leftTile == this)) { - if (_rightTile->GetYMin() < y) break; + if (_rightTile->getYMin() < y) break; _rightTile->_leftTile = newTile; _rightTile = _rightTile->_bottomTile; } - _boundingBox = Box(GetXMin(), GetYMin(), GetXMax(), y); + _boundingBox = Box(getXMin(), getYMin(), getXMax(), y); - if (region->_GetTopLeftTile() == this) region->_SetTopLeftTile(newTile); + if (region->_getTopLeftTile() == this) region->_SetTopLeftTile(newTile); } } @@ -336,9 +336,9 @@ bool Region_Tile::MergeLeftTile(Region* region) if (!uselessTile) return false; if (uselessTile->_rightTile != this) return false; if (uselessTile->_isVoid != _isVoid) return false; - if (uselessTile->GetXMax() != GetXMin()) return false; - if (uselessTile->GetYMin() != GetYMin()) return false; - if (uselessTile->GetYMax() != GetYMax()) return false; + if (uselessTile->getXMax() != getXMin()) return false; + if (uselessTile->getYMin() != getYMin()) return false; + if (uselessTile->getYMax() != getYMax()) return false; Region_Tile* tile = uselessTile->_topTile; while (tile && (tile->_bottomTile == uselessTile)) { @@ -363,7 +363,7 @@ bool Region_Tile::MergeLeftTile(Region* region) _boundingBox.merge(uselessTile->_boundingBox); - if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); + if (region->_getTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); delete uselessTile; @@ -378,9 +378,9 @@ bool Region_Tile::MergeBottomTile(Region* region) if (!uselessTile) return false; if (uselessTile->_topTile != this) return false; if (uselessTile->_isVoid != _isVoid) return false; - if (uselessTile->GetYMax() != GetYMin()) return false; - if (uselessTile->GetXMin() != GetXMin()) return false; - if (uselessTile->GetXMax() != GetXMax()) return false; + if (uselessTile->getYMax() != getYMin()) return false; + if (uselessTile->getXMin() != getXMin()) return false; + if (uselessTile->getXMax() != getXMax()) return false; Region_Tile* tile = uselessTile->_rightTile; while (tile && (tile->_leftTile == uselessTile)) { @@ -405,7 +405,7 @@ bool Region_Tile::MergeBottomTile(Region* region) _boundingBox.merge(uselessTile->_boundingBox); - if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); + if (region->_getBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); delete uselessTile; @@ -420,9 +420,9 @@ bool Region_Tile::MergeTopTile(Region* region) if (!uselessTile) return false; if (uselessTile->_bottomTile != this) return false; if (uselessTile->_isVoid != _isVoid) return false; - if (uselessTile->GetYMin() != GetYMax()) return false; - if (uselessTile->GetXMin() != GetXMin()) return false; - if (uselessTile->GetXMax() != GetXMax()) return false; + if (uselessTile->getYMin() != getYMax()) return false; + if (uselessTile->getXMin() != getXMin()) return false; + if (uselessTile->getXMax() != getXMax()) return false; Region_Tile* tile = uselessTile->_rightTile; while (tile && (tile->_leftTile == uselessTile)) { @@ -447,7 +447,7 @@ bool Region_Tile::MergeTopTile(Region* region) _boundingBox.merge(uselessTile->_boundingBox); - if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); + if (region->_getTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); delete uselessTile; @@ -462,9 +462,9 @@ bool Region_Tile::MergeRightTile(Region* region) if (!uselessTile) return false; if (uselessTile->_leftTile != this) return false; if (uselessTile->_isVoid != _isVoid) return false; - if (uselessTile->GetXMin() != GetXMax()) return false; - if (uselessTile->GetYMin() != GetYMin()) return false; - if (uselessTile->GetYMax() != GetYMax()) return false; + if (uselessTile->getXMin() != getXMax()) return false; + if (uselessTile->getYMin() != getYMin()) return false; + if (uselessTile->getYMax() != getYMax()) return false; Region_Tile* tile = uselessTile->_topTile; while (tile && (tile->_bottomTile == uselessTile)) { @@ -489,7 +489,7 @@ bool Region_Tile::MergeRightTile(Region* region) _boundingBox.merge(uselessTile->_boundingBox); - if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); + if (region->_getBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); delete uselessTile; @@ -512,25 +512,25 @@ void Region_Tile::CleanNeighbours(Region* region) set tileSet; tile = _leftTile; - while (tile && (tile->GetYMin() <= GetYMax())) { + while (tile && (tile->getYMin() <= getYMax())) { tileSet.insert(tile); tile = tile->_topTile; } tile = _topTile; - while (tile && (GetXMin() <= tile->GetXMax())) { + while (tile && (getXMin() <= tile->getXMax())) { tileSet.insert(tile); tile = tile->_leftTile; } tile = _bottomTile; - while (tile && (tile->GetXMin() <= GetXMax())) { + while (tile && (tile->getXMin() <= getXMax())) { tileSet.insert(tile); tile = tile->_rightTile; } tile = _rightTile; - while (tile && (GetYMin() <= tile->GetYMax())) { + while (tile && (getYMin() <= tile->getYMax())) { tileSet.insert(tile); tile = tile->_bottomTile; } @@ -569,11 +569,11 @@ Region_Tile::_IsTopFull() const { Region_Tile* upTile = _topTile; while (upTile && upTile->_isVoid == _isVoid && - upTile->GetXMin() > GetXMin()) { + upTile->getXMin() > getXMin()) { upTile = upTile->_leftTile; } return (upTile && upTile->_isVoid == _isVoid && - upTile->GetXMin() <= GetXMin()); + upTile->getXMin() <= getXMin()); }; // Region_Tile::_IsTopFull bool @@ -583,11 +583,11 @@ Region_Tile::_IsBottomFull() const { Region_Tile* downTile = _bottomTile; while (downTile && downTile->_isVoid == _isVoid && - downTile->GetXMax() < GetXMax()) { + downTile->getXMax() < getXMax()) { downTile = downTile->_rightTile; } return (downTile && downTile->_isVoid == _isVoid && - downTile->GetXMax() >= GetXMax()); + downTile->getXMax() >= getXMax()); }; // Region_Tile::_IsBottomFull bool @@ -597,11 +597,11 @@ Region_Tile::_IsLeftFull() const { Region_Tile* leftTile = _leftTile; while (leftTile && leftTile->_isVoid == _isVoid && - leftTile->GetYMax() < GetYMax()) { + leftTile->getYMax() < getYMax()) { leftTile = leftTile->_topTile; } return (leftTile && leftTile->_isVoid == _isVoid && - leftTile->GetYMax() >= GetYMax()); + leftTile->getYMax() >= getYMax()); }; // Region_Tile::_IsLeftFull bool @@ -611,11 +611,11 @@ Region_Tile::_IsRightFull() const { Region_Tile* rightTile = _rightTile; while (rightTile && rightTile->_isVoid == _isVoid && - rightTile->GetYMin() > GetYMin()) { + rightTile->getYMin() > getYMin()) { rightTile = rightTile->_bottomTile; } return (rightTile && rightTile->_isVoid == _isVoid && - rightTile->GetYMin() <= GetYMin()); + rightTile->getYMin() <= getYMin()); }; // Region_Tile::_IsRightFull Unit @@ -626,21 +626,21 @@ Region_Tile::_TopSplitAtVerticalSize (Region* region) // Doit etre appele apres verif _IsTopFull() { Region_Tile* upTile = _topTile; - Unit height = upTile->GetYMax() - GetYMax(); - if (upTile && upTile->GetXMax() != GetXMax()) { - upTile->SplitVertical (region, GetXMax()); + Unit height = upTile->getYMax() - getYMax(); + if (upTile && upTile->getXMax() != getXMax()) { + upTile->SplitVertical (region, getXMax()); upTile = _topTile; } Unit ht; - while (upTile && upTile->GetXMin() > GetXMin()) { - ht = upTile->GetYMax() - GetYMax(); + while (upTile && upTile->getXMin() > getXMin()) { + ht = upTile->getYMax() - getYMax(); if (height > ht) height = ht; upTile = upTile->_leftTile; } - ht = upTile->GetYMax() - GetYMax(); + ht = upTile->getYMax() - getYMax(); if (height > ht) height = ht; - if (upTile && upTile->GetXMin() != GetXMin()) { - upTile->SplitVertical (region, GetXMin()); + if (upTile && upTile->getXMin() != getXMin()) { + upTile->SplitVertical (region, getXMin()); } return height; }; // Region_Tile::_TopSplitAtVerticalSize @@ -653,21 +653,21 @@ Region_Tile::_BottomSplitAtVerticalSize (Region* region) // Doit etre appele apres verif _IsBottomFull() { Region_Tile* downTile = _bottomTile; - Unit height = GetYMin() - downTile->GetYMin(); - if (downTile && downTile->GetXMin() != GetXMin()) { - downTile->SplitVertical (region, GetXMin()); + Unit height = getYMin() - downTile->getYMin(); + if (downTile && downTile->getXMin() != getXMin()) { + downTile->SplitVertical (region, getXMin()); downTile = _bottomTile; } Unit ht; - while (downTile && downTile->GetXMax() < GetXMax()) { - ht = GetYMin() - downTile->GetYMin(); + while (downTile && downTile->getXMax() < getXMax()) { + ht = getYMin() - downTile->getYMin(); if (height > ht) height = ht; downTile = downTile->_rightTile; } - ht = GetYMin() - downTile->GetYMin(); + ht = getYMin() - downTile->getYMin(); if (height > ht) height = ht; - if (downTile && downTile->GetXMax() != GetXMax()) { - downTile->SplitVertical (region, GetXMax()); + if (downTile && downTile->getXMax() != getXMax()) { + downTile->SplitVertical (region, getXMax()); } return height; }; // Region_Tile::_BottomSplitAtVerticalSize @@ -681,21 +681,21 @@ Region_Tile::_LeftSplitAtHorizontalSize (Region* region) // Doit etre appele apres verif _IsLeftFull() { Region_Tile* leftTile = _leftTile; - Unit width = GetXMin() - leftTile->GetXMin(); - if (leftTile && leftTile->GetYMin() != GetYMin()) { - leftTile->SplitHorizontal (region, GetYMin()); + Unit width = getXMin() - leftTile->getXMin(); + if (leftTile && leftTile->getYMin() != getYMin()) { + leftTile->SplitHorizontal (region, getYMin()); leftTile = _leftTile; } Unit wt; - while (leftTile && leftTile->GetYMax() < GetYMax()) { - wt = GetXMin() - leftTile->GetXMin(); + while (leftTile && leftTile->getYMax() < getYMax()) { + wt = getXMin() - leftTile->getXMin(); if (width > wt) width = wt; leftTile = leftTile->_topTile; } - wt = GetXMin() - leftTile->GetXMin(); + wt = getXMin() - leftTile->getXMin(); if (width > wt) width = wt; - if (leftTile && leftTile->GetYMax() != GetYMax()) { - leftTile->SplitHorizontal (region, GetYMax()); + if (leftTile && leftTile->getYMax() != getYMax()) { + leftTile->SplitHorizontal (region, getYMax()); } return width; }; // Region_Tile::_LeftSplitAtHorizontalSize @@ -709,21 +709,21 @@ Region_Tile::_RightSplitAtHorizontalSize (Region* region) // Doit etre appele apres verif _IsRightFull() { Region_Tile* rightTile = _rightTile; - Unit width = rightTile->GetXMax() - GetXMax(); - if (rightTile && rightTile->GetYMax() != GetYMax()) { - rightTile->SplitHorizontal (region, GetYMax()); + Unit width = rightTile->getXMax() - getXMax(); + if (rightTile && rightTile->getYMax() != getYMax()) { + rightTile->SplitHorizontal (region, getYMax()); rightTile = _rightTile; } Unit wt; - while (rightTile && rightTile->GetYMin() > GetYMin()) { - wt = rightTile->GetXMax() - GetXMax(); + while (rightTile && rightTile->getYMin() > getYMin()) { + wt = rightTile->getXMax() - getXMax(); if (width > wt) width = wt; rightTile = rightTile->_bottomTile; } - wt = rightTile->GetXMax() - GetXMax(); + wt = rightTile->getXMax() - getXMax(); if (width > wt) width = wt; - if (rightTile && rightTile->GetYMin() != GetYMin()) { - rightTile->SplitHorizontal (region, GetYMin()); + if (rightTile && rightTile->getYMin() != getYMin()) { + rightTile->SplitHorizontal (region, getYMin()); } return width; }; // Region_Tile::_RightSplitAtHorizontalSize @@ -738,13 +738,13 @@ Region_Tile::_TopSplitAtHorizontalSize (Region* region, const Unit height) bool modif = false; Region_Tile* upTile = _topTile; - while (upTile && upTile->GetXMin() >= GetXMin()) { - if (upTile->GetYMax() - GetYMax() > height) { - upTile->SplitHorizontal (region, GetYMax() + height); + while (upTile && upTile->getXMin() >= getXMin()) { + if (upTile->getYMax() - getYMax() > height) { + upTile->SplitHorizontal (region, getYMax() + height); if (upTile->_bottomTile != this) upTile = upTile->_bottomTile; modif = true; } - if (upTile->_rightTile && upTile->_rightTile->GetXMax() == GetXMax()) { + if (upTile->_rightTile && upTile->_rightTile->getXMax() == getXMax()) { // Merge upTile et upTile->_rightTile modif = upTile->MergeRightTile (region) || modif; } @@ -763,13 +763,13 @@ Region_Tile::_BottomSplitAtHorizontalSize (Region* region, const Unit height) bool modif = false; Region_Tile* downTile = _bottomTile; - while (downTile && downTile->GetXMax() <= GetXMax()) { - if (GetYMin() - downTile->GetYMin() > height) { - downTile->SplitHorizontal (region, GetYMin() - height); + while (downTile && downTile->getXMax() <= getXMax()) { + if (getYMin() - downTile->getYMin() > height) { + downTile->SplitHorizontal (region, getYMin() - height); modif = true; if (downTile->_topTile != this) downTile = downTile->_topTile; } - if (downTile->_leftTile && downTile->_leftTile->GetXMin() == GetXMin()) { + if (downTile->_leftTile && downTile->_leftTile->getXMin() == getXMin()) { // Merge downTile et downTile->_leftTile modif = downTile->MergeLeftTile (region) || modif; } @@ -787,13 +787,13 @@ Region_Tile::_LeftSplitAtVerticalSize (Region* region, const Unit width) bool modif = false; Region_Tile* leftTile = _leftTile; - while (leftTile && leftTile->GetYMax() <= GetYMax()) { - if (GetXMin() - leftTile->GetXMin() > width) { - leftTile->SplitVertical (region, GetXMin() - width); + while (leftTile && leftTile->getYMax() <= getYMax()) { + if (getXMin() - leftTile->getXMin() > width) { + leftTile->SplitVertical (region, getXMin() - width); modif = true; if (leftTile->_rightTile != this) leftTile = leftTile->_rightTile; } - if (leftTile->_bottomTile && leftTile->_bottomTile->GetYMin() == GetYMin()) { + if (leftTile->_bottomTile && leftTile->_bottomTile->getYMin() == getYMin()) { // Merge leftTile et leftTile->_bottomTile modif = leftTile->MergeBottomTile (region) || modif; } @@ -812,13 +812,13 @@ Region_Tile::_RightSplitAtVerticalSize (Region* region, const Unit width) bool modif = false; Region_Tile* rightTile = _rightTile; - while (rightTile && rightTile->GetYMin() >= GetYMin()) { - if (rightTile->GetXMax() - GetXMax() > width) { - rightTile->SplitVertical (region, GetXMax() + width); + while (rightTile && rightTile->getYMin() >= getYMin()) { + if (rightTile->getXMax() - getXMax() > width) { + rightTile->SplitVertical (region, getXMax() + width); modif = true; if (rightTile->_leftTile != this) rightTile = rightTile->_leftTile; } - if (rightTile->_topTile && rightTile->_topTile->GetYMax() == GetYMax()) { + if (rightTile->_topTile && rightTile->_topTile->getYMax() == getYMax()) { // Merge rightTile et rightTile->_leftTile modif = rightTile->MergeTopTile (region) || modif; } @@ -829,68 +829,68 @@ Region_Tile::_RightSplitAtVerticalSize (Region* region, const Unit width) Interval -Region_Tile::_GetTopNeighbour () const +Region_Tile::_getTopNeighbour () const // *********************************** // Retourne le merge des intervals de voisins sur this { Interval result = Interval(); Region_Tile* topTile = _topTile; - while (topTile && topTile->GetXMax() > GetXMin()) { + while (topTile && topTile->getXMax() > getXMin()) { if (topTile->_isVoid == _isVoid) { - result.Merge (Interval (topTile->GetXMin(), topTile->GetXMax())); + result.Merge (Interval (topTile->getXMin(), topTile->getXMax())); } topTile = topTile->_leftTile; } - return result.GetIntersection (Interval (GetXMin(), GetXMax())); -}; // Region_Tile::_GetTopNeighbour + return result.getIntersection (Interval (getXMin(), getXMax())); +}; // Region_Tile::_getTopNeighbour Interval -Region_Tile::_GetBottomNeighbour () const +Region_Tile::_getBottomNeighbour () const // *********************************** // Retourne le merge des intervals de voisins sur this { Interval result = Interval(); Region_Tile* bottomTile = _bottomTile; - while (bottomTile && bottomTile->GetXMin() < GetXMax()) { + while (bottomTile && bottomTile->getXMin() < getXMax()) { if (bottomTile->_isVoid == _isVoid) { - result.Merge (Interval (bottomTile->GetXMin(), bottomTile->GetXMax())); + result.Merge (Interval (bottomTile->getXMin(), bottomTile->getXMax())); } bottomTile = bottomTile->_rightTile; } - return result.GetIntersection (Interval (GetXMin(), GetXMax())); -}; // Region_Tile::_GetBottomNeighbour + return result.getIntersection (Interval (getXMin(), getXMax())); +}; // Region_Tile::_getBottomNeighbour Interval -Region_Tile::_GetLeftNeighbour () const +Region_Tile::_getLeftNeighbour () const // ************************************ // Retourne le merge des intervals de voisins de gauche de this { Interval result = Interval(); Region_Tile* leftTile = _leftTile; - while (leftTile && leftTile->GetYMin() < GetYMax()) { + while (leftTile && leftTile->getYMin() < getYMax()) { if (leftTile->_isVoid == _isVoid) { - result.Merge (Interval (leftTile->GetYMin(), leftTile->GetYMax())); + result.Merge (Interval (leftTile->getYMin(), leftTile->getYMax())); } leftTile = leftTile->_topTile; } - return result.GetIntersection (Interval (GetYMin(), GetYMax())); -}; // Region_Tile::_GetLeftNeighbour + return result.getIntersection (Interval (getYMin(), getYMax())); +}; // Region_Tile::_getLeftNeighbour Interval -Region_Tile::_GetRightNeighbour () const +Region_Tile::_getRightNeighbour () const // ************************************* // Retourne le merge des intervals de voisins de droite de this { Interval result = Interval(); Region_Tile* rightTile = _rightTile; - while (rightTile && rightTile->GetYMax() > GetYMin()) { + while (rightTile && rightTile->getYMax() > getYMin()) { if (rightTile->_isVoid == _isVoid) { - result.Merge (Interval (rightTile->GetYMin(), rightTile->GetYMax())); + result.Merge (Interval (rightTile->getYMin(), rightTile->getYMax())); } rightTile = rightTile->_bottomTile; } - return result.GetIntersection (Interval (GetYMin(), GetYMax())); -}; // Region_Tile::_GetRightNeighbour + return result.getIntersection (Interval (getYMin(), getYMax())); +}; // Region_Tile::_getRightNeighbour bool Region_Tile::VerticalEnhancement(Region* region) @@ -931,26 +931,26 @@ Region_Tile::HorizontalEnhancement(Region* region) }; // Region_Tile::HorizontalEnhancement -string Region_Tile::_GetString() const +string Region_Tile::_getString() const // *********************************** { string s = "<" + _TName("Region::Tile") + ">"; - s.insert(s.length() - 1, " " + GetString(_boundingBox)); + s.insert(s.length() - 1, " " + getString(_boundingBox)); if (_isVoid) s.insert(s.length() - 1, " VOID"); return s; -}; // ion_Tile::_Get +}; // ion_Tile::_get -Record* Region_Tile::_GetRecord() const +Record* Region_Tile::_getRecord() const // ****************************** { - Record* record = new Record(GetString(this)); + Record* record = new Record(getString(this)); if (record) { - record->Add(GetSlot("BoundingBox", &_boundingBox)); - record->Add(GetSlot("IsVoid", &_isVoid)); - record->Add(GetSlot("LeftTile", _leftTile)); - record->Add(GetSlot("BottomTile", _bottomTile)); - record->Add(GetSlot("TopTile", _topTile)); - record->Add(GetSlot("RightTile", _rightTile)); + record->Add(getSlot("BoundingBox", &_boundingBox)); + record->Add(getSlot("IsVoid", &_isVoid)); + record->Add(getSlot("LeftTile", _leftTile)); + record->Add(getSlot("BottomTile", _bottomTile)); + record->Add(getSlot("TopTile", _topTile)); + record->Add(getSlot("RightTile", _rightTile)); } return record; } @@ -977,7 +977,7 @@ Region_Tile::IsVoidFilter& Region_Tile::IsVoidFilter::operator=(const IsVoidFilt return *this; } -Filter* Region_Tile::IsVoidFilter::GetClone() const +Filter* Region_Tile::IsVoidFilter::getClone() const // ************************************************************** { return new Region_Tile::IsVoidFilter(*this); @@ -989,7 +989,7 @@ bool Region_Tile::IsVoidFilter::Accept(Region_Tile* tile) const return tile->IsVoid(); } -string Region_Tile::IsVoidFilter::_GetString() const +string Region_Tile::IsVoidFilter::_getString() const // ************************************************* { return "<" + _TName("RegionTile::IsVoidFilter") + ">"; @@ -1022,14 +1022,14 @@ class Region_Tiles : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Region_Tile* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Region_Tile* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1052,13 +1052,13 @@ class Region_Tiles : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1089,23 +1089,23 @@ Region_Tiles& Region_Tiles::operator=(const Region_Tiles& tiles) return *this; } -Collection* Region_Tiles::GetClone() const +Collection* Region_Tiles::getClone() const // ***************************************************** { return new Region_Tiles(*this); } -Locator* Region_Tiles::GetLocator() const +Locator* Region_Tiles::getLocator() const // **************************************************** { return new Locator(_region); } -string Region_Tiles::_GetString() const +string Region_Tiles::_getString() const // ************************************ { string s = "<" + _TName("Region::Tiles"); - if (_region) s += " " + GetString(_region); + if (_region) s += " " + getString(_region); s += ">"; return s; } @@ -1123,7 +1123,7 @@ Region_Tiles::Locator::Locator(const Region* region) _tileStack() { if (_region) { - Region_Tile* tile = _region->_GetBottomRightTile(); + Region_Tile* tile = _region->_getBottomRightTile(); while (tile) { _tileStack.push(tile); tile = tile->_leftTile; @@ -1147,13 +1147,13 @@ Region_Tiles::Locator& Region_Tiles::Locator::operator=(const Locator& locator) return *this; } -Region_Tile* Region_Tiles::Locator::GetElement() const +Region_Tile* Region_Tiles::Locator::getElement() const // *************************************************** { return (!_tileStack.empty()) ? _tileStack.top() : NULL; } -Locator* Region_Tiles::Locator::GetClone() const +Locator* Region_Tiles::Locator::getClone() const // *********************************************************** { return new Locator(*this); @@ -1171,21 +1171,21 @@ void Region_Tiles::Locator::Progress() if (!_tileStack.empty()) { Region_Tile* tile = _tileStack.top(); _tileStack.pop(); - Unit xMin = tile->GetXMin(); - Unit xMax = tile->GetXMax(); + Unit xMin = tile->getXMin(); + Unit xMax = tile->getXMax(); Region_Tile* topTile = tile->_topTile; - while (topTile && (xMin < topTile->GetXMax())) { - if (topTile->GetXMax() <= xMax) _tileStack.push(topTile); + while (topTile && (xMin < topTile->getXMax())) { + if (topTile->getXMax() <= xMax) _tileStack.push(topTile); topTile = topTile->_leftTile; } } } -string Region_Tiles::Locator::_GetString() const +string Region_Tiles::Locator::_getString() const // ********************************************* { string s = "<" + _TName("Region::Tiles::Locator"); - if (_region) s += " " + GetString(_region); + if (_region) s += " " + getString(_region); s += ">"; return s; } @@ -1221,14 +1221,14 @@ class Region_TilesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Region_Tile* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Region_Tile* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1254,13 +1254,13 @@ class Region_TilesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1285,7 +1285,7 @@ Region_TilesUnder::Region_TilesUnder(const Region* region, const Box& area, Regi _region(region), _startTile(startTile) { - _area = area.getIntersection(region->GetBoundingBox()); + _area = area.getIntersection(region->getBoundingBox()); } Region_TilesUnder::Region_TilesUnder(const Region_TilesUnder& tiles) @@ -1306,26 +1306,26 @@ Region_TilesUnder& Region_TilesUnder::operator=(const Region_TilesUnder& tiles) return *this; } -Collection* Region_TilesUnder::GetClone() const +Collection* Region_TilesUnder::getClone() const // ********************************************************** { return new Region_TilesUnder(*this); } -Locator* Region_TilesUnder::GetLocator() const +Locator* Region_TilesUnder::getLocator() const // ********************************************************* { return new Locator(_region, _area, _startTile); } -string Region_TilesUnder::_GetString() const +string Region_TilesUnder::_getString() const // ***************************************** { string s = "<" + _TName("Region::TilesUnder"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); - s += " " + GetString(_startTile); + s += " " + getString(_region); + s += " " + getString(_area); + s += " " + getString(_startTile); } s += ">"; return s; @@ -1356,9 +1356,9 @@ Region_TilesUnder::Locator::Locator(const Region* region, const Box& area, Regio _tileStack() { if (_region && !_area.isEmpty()) { - Region_Tile* tile = _region->_GetTileAt(Point(_area.getXMax(), _area.getYMin()), _startTile); - while (tile && (_area.getXMin() < tile->GetXMax())) { - while (tile && (tile->GetYMax() <= _area.getYMin())) tile = tile->_topTile; + Region_Tile* tile = _region->_getTileAt(Point(_area.getXMax(), _area.getYMin()), _startTile); + while (tile && (_area.getXMin() < tile->getXMax())) { + while (tile && (tile->getYMax() <= _area.getYMin())) tile = tile->_topTile; if (tile) { if (_tileSet.find(tile) == _tileSet.end()) { _tileSet.insert(tile); @@ -1390,13 +1390,13 @@ Region_TilesUnder::Locator& Region_TilesUnder::Locator::operator=(const Locator& return *this; } -Region_Tile* Region_TilesUnder::Locator::GetElement() const +Region_Tile* Region_TilesUnder::Locator::getElement() const // ******************************************************** { return (!_tileStack.empty()) ? _tileStack.top() : NULL; } -Locator* Region_TilesUnder::Locator::GetClone() const +Locator* Region_TilesUnder::Locator::getClone() const // **************************************************************** { return new Locator(*this); @@ -1414,13 +1414,13 @@ void Region_TilesUnder::Locator::Progress() if (!_tileStack.empty()) { Region_Tile* tile = _tileStack.top(); _tileStack.pop(); - Unit xMin = max(tile->GetXMin(), _area.getXMin()); - Unit xMax = tile->GetXMax(); + Unit xMin = max(tile->getXMin(), _area.getXMin()); + Unit xMax = tile->getXMax(); Region_Tile* topTile = tile->_topTile; - while (topTile && (xMin < topTile->GetXMax())) { - if ((topTile->GetXMin() <= _area.getXMax()) && - (topTile->GetYMin() <= _area.getYMax()) && - (min(topTile->GetXMax(), _area.getXMax()) <= xMax)) { + while (topTile && (xMin < topTile->getXMax())) { + if ((topTile->getXMin() <= _area.getXMax()) && + (topTile->getYMin() <= _area.getYMax()) && + (min(topTile->getXMax(), _area.getXMax()) <= xMax)) { if (_tileSet.find(topTile) == _tileSet.end()) { _tileSet.insert(topTile); _tileStack.push(topTile); @@ -1431,14 +1431,14 @@ void Region_TilesUnder::Locator::Progress() } } -string Region_TilesUnder::Locator::_GetString() const +string Region_TilesUnder::Locator::_getString() const // ************************************************** { string s = "<" + _TName("Region::TilesUnder::Locator"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); - s += " " + GetString(_startTile); + s += " " + getString(_region); + s += " " + getString(_area); + s += " " + getString(_startTile); } s += ">"; return s; @@ -1473,14 +1473,14 @@ class Region_BoxesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Box GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Box getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1505,13 +1505,13 @@ class Region_BoxesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1553,25 +1553,25 @@ Region_BoxesUnder& Region_BoxesUnder::operator=(const Region_BoxesUnder& boxes) return *this; } -Collection* Region_BoxesUnder::GetClone() const +Collection* Region_BoxesUnder::getClone() const // ************************************************* { return new Region_BoxesUnder(*this); } -Locator* Region_BoxesUnder::GetLocator() const +Locator* Region_BoxesUnder::getLocator() const // ************************************************ { return new Locator(_region, _area); } -string Region_BoxesUnder::_GetString() const +string Region_BoxesUnder::_getString() const // ***************************************** { string s = "<" + _TName("Region::BoxesUnder"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); + s += " " + getString(_region); + s += " " + getString(_area); } s += ">"; return s; @@ -1602,8 +1602,8 @@ Region_BoxesUnder::Locator::Locator(const Region* region, const Box& area) if (_region) { _tileLocator = (_area.isEmpty()) ? - _region->_GetTiles().GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator() : - _region->_GetTilesUnder(_area).GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator(); + _region->_getTiles().getSubSet(!Region_Tile::getIsVoidFilter()).getLocator() : + _region->_getTilesUnder(_area).getSubSet(!Region_Tile::getIsVoidFilter()).getLocator(); } } @@ -1625,13 +1625,13 @@ Region_BoxesUnder::Locator& Region_BoxesUnder::Locator::operator=(const Locator& return *this; } -Box Region_BoxesUnder::Locator::GetElement() const +Box Region_BoxesUnder::Locator::getElement() const // *********************************************** { - return (_tileLocator.IsValid()) ? _tileLocator.GetElement()->GetBoundingBox() : Box(); + return (_tileLocator.IsValid()) ? _tileLocator.getElement()->getBoundingBox() : Box(); } -Locator* Region_BoxesUnder::Locator::GetClone() const +Locator* Region_BoxesUnder::Locator::getClone() const // ******************************************************* { return new Locator(*this); @@ -1649,13 +1649,13 @@ void Region_BoxesUnder::Locator::Progress() _tileLocator.Progress(); } -string Region_BoxesUnder::Locator::_GetString() const +string Region_BoxesUnder::Locator::_getString() const // ************************************************** { string s = "<" + _TName("Region::BoxesUnder::Locator"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); + s += " " + getString(_region); + s += " " + getString(_area); } s += ">"; return s; @@ -1690,14 +1690,14 @@ class Region_VoidBoxesUnder : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Box GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Box getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1722,13 +1722,13 @@ class Region_VoidBoxesUnder : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1770,25 +1770,25 @@ Region_VoidBoxesUnder& Region_VoidBoxesUnder::operator=(const Region_VoidBoxesUn return *this; } -Collection* Region_VoidBoxesUnder::GetClone() const +Collection* Region_VoidBoxesUnder::getClone() const // ***************************************************** { return new Region_VoidBoxesUnder(*this); } -Locator* Region_VoidBoxesUnder::GetLocator() const +Locator* Region_VoidBoxesUnder::getLocator() const // **************************************************** { return new Locator(_region, _area); } -string Region_VoidBoxesUnder::_GetString() const +string Region_VoidBoxesUnder::_getString() const // ********************************************* { string s = "<" + _TName("Region::VoidBoxesUnder"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); + s += " " + getString(_region); + s += " " + getString(_area); } s += ">"; return s; @@ -1819,8 +1819,8 @@ Region_VoidBoxesUnder::Locator::Locator(const Region* region, const Box& area) if (_region) { _tileLocator = (_area.isEmpty()) ? - _region->_GetTiles().GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator() : - _region->_GetTilesUnder(_area).GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator(); + _region->_getTiles().getSubSet(Region_Tile::getIsVoidFilter()).getLocator() : + _region->_getTilesUnder(_area).getSubSet(Region_Tile::getIsVoidFilter()).getLocator(); } } @@ -1842,13 +1842,13 @@ Region_VoidBoxesUnder::Locator& Region_VoidBoxesUnder::Locator::operator=(const return *this; } -Box Region_VoidBoxesUnder::Locator::GetElement() const +Box Region_VoidBoxesUnder::Locator::getElement() const // *************************************************** { - return (_tileLocator.IsValid()) ? _tileLocator.GetElement()->GetBoundingBox() : Box(); + return (_tileLocator.IsValid()) ? _tileLocator.getElement()->getBoundingBox() : Box(); } -Locator* Region_VoidBoxesUnder::Locator::GetClone() const +Locator* Region_VoidBoxesUnder::Locator::getClone() const // *********************************************************** { return new Locator(*this); @@ -1866,13 +1866,13 @@ void Region_VoidBoxesUnder::Locator::Progress() _tileLocator.Progress(); } -string Region_VoidBoxesUnder::Locator::_GetString() const +string Region_VoidBoxesUnder::Locator::_getString() const // ****************************************************** { string s = "<" + _TName("Region::VoidBoxesUnder::Locator"); if (_region) { - s += " " + GetString(_region); - s += " " + GetString(_area); + s += " " + getString(_region); + s += " " + getString(_area); } s += ">"; return s; @@ -1906,14 +1906,14 @@ class Region_Intervals : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Interval GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Interval getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1936,13 +1936,13 @@ class Region_Intervals : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -1973,23 +1973,23 @@ Region_Intervals& Region_Intervals::operator=(const Region_Intervals& intervals) return *this; } -Collection* Region_Intervals::GetClone() const +Collection* Region_Intervals::getClone() const // ***************************************************** { return new Region_Intervals(*this); } -Locator* Region_Intervals::GetLocator() const +Locator* Region_Intervals::getLocator() const // **************************************************** { return new Locator(_swapLine); } -string Region_Intervals::_GetString() const +string Region_Intervals::_getString() const // **************************************** { string s = "<" + _TName("Region::SwapLine::Intervals"); - if (_swapLine) s += " " + GetString(_swapLine); + if (_swapLine) s += " " + getString(_swapLine); s += ">"; return s; } @@ -2008,37 +2008,37 @@ Region_Intervals::Locator::Locator(const Region::SwapLine* swapLine) _upperTile(NULL) { if (_swapLine) { - switch (_swapLine->GetType()) { + switch (_swapLine->getType()) { case Region::SwapLine::Type::VERTICAL : { - Unit x = _swapLine->GetPosition(); - Unit yMax = _swapLine->GetExtention().GetVMax(); - _lowerTile = _swapLine->_GetBaseTile(); + Unit x = _swapLine->getPosition(); + Unit yMax = _swapLine->getExtention().getVMax(); + _lowerTile = _swapLine->_getBaseTile(); while (_lowerTile && _lowerTile->IsVoid()) - _lowerTile = _lowerTile->GetTopTile(x); - if (_lowerTile && (yMax < _lowerTile->GetYMin())) _lowerTile = NULL; + _lowerTile = _lowerTile->getTopTile(x); + if (_lowerTile && (yMax < _lowerTile->getYMin())) _lowerTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; while (tile && !tile->IsVoid()) { _upperTile = tile; - tile = tile->GetTopTile(x); - if (tile && (yMax < tile->GetYMin())) tile = NULL; + tile = tile->getTopTile(x); + if (tile && (yMax < tile->getYMin())) tile = NULL; } } break; } case Region::SwapLine::Type::HORIZONTAL : { - Unit y = _swapLine->GetPosition(); - Unit xMax = _swapLine->GetExtention().GetVMax(); - _lowerTile = _swapLine->_GetBaseTile(); + Unit y = _swapLine->getPosition(); + Unit xMax = _swapLine->getExtention().getVMax(); + _lowerTile = _swapLine->_getBaseTile(); while (_lowerTile && _lowerTile->IsVoid()) - _lowerTile = _lowerTile->GetRightTile(y); - if (_lowerTile && (xMax < _lowerTile->GetXMin())) _lowerTile = NULL; + _lowerTile = _lowerTile->getRightTile(y); + if (_lowerTile && (xMax < _lowerTile->getXMin())) _lowerTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; while (tile && !tile->IsVoid()) { _upperTile = tile; - tile = tile->GetRightTile(y); - if (tile && (xMax < tile->GetXMin())) tile = NULL; + tile = tile->getRightTile(y); + if (tile && (xMax < tile->getXMin())) tile = NULL; } } break; @@ -2065,27 +2065,27 @@ Region_Intervals::Locator& Region_Intervals::Locator::operator=(const Locator& l return *this; } -Interval Region_Intervals::Locator::GetElement() const +Interval Region_Intervals::Locator::getElement() const // *************************************************** { if (!IsValid()) return Interval(); Interval interval; - switch (_swapLine->GetType()) { + switch (_swapLine->getType()) { case Region::SwapLine::Type::VERTICAL : { - interval = Interval(_lowerTile->GetYMin(), _upperTile->GetYMax()); + interval = Interval(_lowerTile->getYMin(), _upperTile->getYMax()); break; } case Region::SwapLine::Type::HORIZONTAL : { - interval = Interval(_lowerTile->GetXMin(), _upperTile->GetXMax()); + interval = Interval(_lowerTile->getXMin(), _upperTile->getXMax()); break; } } - return interval.GetIntersection(_swapLine->GetExtention()); + return interval.getIntersection(_swapLine->getExtention()); } -Locator* Region_Intervals::Locator::GetClone() const +Locator* Region_Intervals::Locator::getClone() const // *********************************************************** { return new Locator(*this); @@ -2101,39 +2101,39 @@ void Region_Intervals::Locator::Progress() // *************************************** { if (IsValid()) { - switch (_swapLine->GetType()) { + switch (_swapLine->getType()) { case Region::SwapLine::Type::VERTICAL : { - Unit x = _swapLine->GetPosition(); - Unit yMax = _swapLine->GetExtention().GetVMax(); - _lowerTile = _upperTile->GetTopTile(x); + Unit x = _swapLine->getPosition(); + Unit yMax = _swapLine->getExtention().getVMax(); + _lowerTile = _upperTile->getTopTile(x); while (_lowerTile && _lowerTile->IsVoid()) - _lowerTile = _lowerTile->GetTopTile(x); - if (_lowerTile && (yMax < _lowerTile->GetYMin())) _lowerTile = NULL; + _lowerTile = _lowerTile->getTopTile(x); + if (_lowerTile && (yMax < _lowerTile->getYMin())) _lowerTile = NULL; _upperTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; while (tile && !tile->IsVoid()) { _upperTile = tile; - tile = tile->GetTopTile(x); - if (tile && (yMax < tile->GetYMin())) tile = NULL; + tile = tile->getTopTile(x); + if (tile && (yMax < tile->getYMin())) tile = NULL; } } break; } case Region::SwapLine::Type::HORIZONTAL : { - Unit y = _swapLine->GetPosition(); - Unit xMax = _swapLine->GetExtention().GetVMax(); - _lowerTile = _upperTile->GetRightTile(y); + Unit y = _swapLine->getPosition(); + Unit xMax = _swapLine->getExtention().getVMax(); + _lowerTile = _upperTile->getRightTile(y); while (_lowerTile && _lowerTile->IsVoid()) - _lowerTile = _lowerTile->GetRightTile(y); - if (_lowerTile && (xMax < _lowerTile->GetXMin())) _lowerTile = NULL; + _lowerTile = _lowerTile->getRightTile(y); + if (_lowerTile && (xMax < _lowerTile->getXMin())) _lowerTile = NULL; _upperTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; while (tile && !tile->IsVoid()) { _upperTile = tile; - tile = tile->GetRightTile(y); - if (tile && (xMax < tile->GetXMin())) tile = NULL; + tile = tile->getRightTile(y); + if (tile && (xMax < tile->getXMin())) tile = NULL; } } break; @@ -2142,11 +2142,11 @@ void Region_Intervals::Locator::Progress() } } -string Region_Intervals::Locator::_GetString() const +string Region_Intervals::Locator::_getString() const // ************************************************* { string s = "<" + _TName("Region::SwapLine::Intervals::Locator"); - if (_swapLine) s += " " + GetString(_swapLine); + if (_swapLine) s += " " + getString(_swapLine); s += ">"; return s; } @@ -2176,7 +2176,7 @@ Region::SwapLine::Type& Region::SwapLine::Type::operator=(const Type& type) return *this; } -string Region::SwapLine::Type::_GetString() const +string Region::SwapLine::Type::_getString() const // ********************************************** { switch (_code) { @@ -2186,11 +2186,11 @@ string Region::SwapLine::Type::_GetString() const return "ABNORMAL"; } -Record* Region::SwapLine::Type::_GetRecord() const +Record* Region::SwapLine::Type::_getRecord() const // ***************************************** { - Record* record = new Record(GetString(this)); - record->Add ( GetSlot ( "Code", ((unsigned int*)((void*)&_code)) ) ); + Record* record = new Record(getString(this)); + record->Add ( getSlot ( "Code", ((unsigned int*)((void*)&_code)) ) ); return record; } @@ -2224,15 +2224,15 @@ Region::SwapLine::SwapLine(Region* region, const Type& type, const Interval& ext if (!_region->IsEmpty()) { switch (_type) { case Type::VERTICAL : { - _position = _region->GetXMin(); - if (_extention.IsEmpty()) _extention = Interval(_region->GetYMin(), _region->GetYMax()); - _baseTile = _region->_GetTileAt(Point(_position, _extention.GetVMin())); + _position = _region->getXMin(); + if (_extention.IsEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); + _baseTile = _region->_getTileAt(Point(_position, _extention.getVMin())); break; } case Type::HORIZONTAL : { - _position = _region->GetYMin(); - if (_extention.IsEmpty()) _extention = Interval(_region->GetXMin(), _region->GetXMax()); - _baseTile = _region->_GetTileAt(Point(_extention.GetVMin(), _position)); + _position = _region->getYMin(); + if (_extention.IsEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); + _baseTile = _region->_getTileAt(Point(_extention.getVMin(), _position)); break; } } @@ -2253,13 +2253,13 @@ Region::SwapLine::SwapLine(Region* region, const Type& type, const Unit& positio if (!_region->IsEmpty()) { switch (_type) { case Type::VERTICAL : { - if (_extention.IsEmpty()) _extention = Interval(_region->GetYMin(), _region->GetYMax()); - _baseTile = _region->_GetTileAt(Point(_position, _extention.GetVMin())); + if (_extention.IsEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); + _baseTile = _region->_getTileAt(Point(_position, _extention.getVMin())); break; } case Type::HORIZONTAL : { - if (_extention.IsEmpty()) _extention = Interval(_region->GetXMin(), _region->GetXMax()); - _baseTile = _region->_GetTileAt(Point(_extention.GetVMin(), _position)); + if (_extention.IsEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); + _baseTile = _region->_getTileAt(Point(_extention.getVMin(), _position)); break; } } @@ -2292,7 +2292,7 @@ Region::SwapLine& Region::SwapLine::operator=(const SwapLine& swapLine) return *this; } -Intervals Region::SwapLine::GetIntervals() const +Intervals Region::SwapLine::getIntervals() const // ********************************************* { return Region_Intervals(this); @@ -2306,57 +2306,57 @@ void Region::SwapLine::Progress(int n) switch (_type) { case Type::VERTICAL : { while (n--) { - Unit yMin = GetExtention().GetVMin(); - Unit yMax = GetExtention().GetVMax(); - Unit x = _region->GetXMax() + 1; + Unit yMin = getExtention().getVMin(); + Unit yMax = getExtention().getVMax(); + Unit x = _region->getXMax() + 1; Region::Tile* tile = _baseTile; while (tile) { - if (_position < tile->GetXMax()) - x = min(tile->GetXMax(), x); + if (_position < tile->getXMax()) + x = min(tile->getXMax(), x); else { - assert(tile->GetXMax() == _position); + assert(tile->getXMax() == _position); Region::Tile* rightTile = tile->_rightTile; - while (rightTile && (yMax < rightTile->GetYMin())) + while (rightTile && (yMax < rightTile->getYMin())) rightTile = rightTile->_bottomTile; - while (rightTile && (yMin < rightTile->GetYMax())) { - x = min(rightTile->GetXMax(), x); + while (rightTile && (yMin < rightTile->getYMax())) { + x = min(rightTile->getXMax(), x); rightTile = rightTile->_bottomTile; } } - tile = tile->GetTopTile(_position); - if (tile && (yMax < tile->GetYMin())) tile = NULL; + tile = tile->getTopTile(_position); + if (tile && (yMax < tile->getYMin())) tile = NULL; } _position = x; - while (_baseTile && (_baseTile->GetXMax() <= x)) - _baseTile = _baseTile->GetRightTile(yMin); + while (_baseTile && (_baseTile->getXMax() <= x)) + _baseTile = _baseTile->getRightTile(yMin); } break; } case Type::HORIZONTAL : { while (n--) { - Unit xMin = GetExtention().GetVMin(); - Unit xMax = GetExtention().GetVMax(); - Unit y = _region->GetYMax() + 1; + Unit xMin = getExtention().getVMin(); + Unit xMax = getExtention().getVMax(); + Unit y = _region->getYMax() + 1; Region::Tile* tile = _baseTile; while (tile) { - if (_position < tile->GetYMax()) - y = min(tile->GetYMax(), y); + if (_position < tile->getYMax()) + y = min(tile->getYMax(), y); else { - assert(tile->GetYMax() == _position); + assert(tile->getYMax() == _position); Region::Tile* topTile = tile->_topTile; - while (topTile && (xMax < topTile->GetXMin())) + while (topTile && (xMax < topTile->getXMin())) topTile = topTile->_leftTile; - while (topTile && (xMin < topTile->GetXMax())) { - y = min(topTile->GetYMax(), y); + while (topTile && (xMin < topTile->getXMax())) { + y = min(topTile->getYMax(), y); topTile = topTile->_leftTile; } } - tile = tile->GetRightTile(_position); - if (tile && (xMax < tile->GetXMin())) tile = NULL; + tile = tile->getRightTile(_position); + if (tile && (xMax < tile->getXMin())) tile = NULL; } _position = y; - while (_baseTile && (_baseTile->GetYMax() <= y)) - _baseTile = _baseTile->GetTopTile(xMin); + while (_baseTile && (_baseTile->getYMax() <= y)) + _baseTile = _baseTile->getTopTile(xMin); } break; } @@ -2371,7 +2371,7 @@ void Region::SwapLine::Progress(int n) void Region::SwapLine::Translate(const Unit& quantity) // *************************************************** { - if (quantity) SetPosition(GetPosition() + quantity); + if (quantity) SetPosition(getPosition() + quantity); } void Region::SwapLine::SetPosition(const Unit& position) @@ -2381,39 +2381,39 @@ void Region::SwapLine::SetPosition(const Unit& position) _position = position; switch (_type) { case Type::VERTICAL : { - _baseTile = _region->_GetTileAt(Point(_position, _extention.GetVMin())); + _baseTile = _region->_getTileAt(Point(_position, _extention.getVMin())); break; } case Type::HORIZONTAL : { - _baseTile = _region->_GetTileAt(Point(_extention.GetVMin(), _position)); + _baseTile = _region->_getTileAt(Point(_extention.getVMin(), _position)); break; } } } } -string Region::SwapLine::_GetString() const +string Region::SwapLine::_getString() const // **************************************** { - string s = "<" + _GetTypeName() + ">"; + string s = "<" + _getTypeName() + ">"; if (IsValid()) { - s.insert(s.length() - 1, " " + GetString(_type)); - s.insert(s.length() - 1, " " + GetString(_position)); - s.insert(s.length() - 1, " " + GetString(_extention)); + s.insert(s.length() - 1, " " + getString(_type)); + s.insert(s.length() - 1, " " + getString(_position)); + s.insert(s.length() - 1, " " + getString(_extention)); } return s; } -Record* Region::SwapLine::_GetRecord() const +Record* Region::SwapLine::_getRecord() const // *********************************** { - Record* record = new Record(GetString(this)); + Record* record = new Record(getString(this)); if (record) { - record->Add(GetSlot("Region", _region)); - record->Add(GetSlot("Type", &_type)); - record->Add(GetSlot("Position", &_position)); - record->Add(GetSlot("Extention", &_extention)); - record->Add(GetSlot("BaseTile", _baseTile)); + record->Add(getSlot("Region", _region)); + record->Add(getSlot("Type", &_type)); + record->Add(getSlot("Position", &_position)); + record->Add(getSlot("Extention", &_extention)); + record->Add(getSlot("BaseTile", _baseTile)); } return record; } @@ -2442,11 +2442,11 @@ Region::Region(const Region& region) // ********************************* { // keep trace (as void tile) of the initial bounding box - Box initialBoundingBox = region.GetBoundingBox(); + Box initialBoundingBox = region.getBoundingBox(); if (! initialBoundingBox.isEmpty()) { - _bottomRightTile = new Tile(region.GetBoundingBox(), true); + _bottomRightTile = new Tile(region.getBoundingBox(), true); _topLeftTile = _bottomRightTile; - for_each_box(box, region.GetBoxes()) { + for_each_box(box, region.getBoxes()) { Fill(box); end_for; } @@ -2464,11 +2464,11 @@ Region& Region::operator=(const Region& region) { Clear(); // keep trace (as void tile) of the initial bounding box - Box initialBoundingBox = region.GetBoundingBox(); + Box initialBoundingBox = region.getBoundingBox(); if (! initialBoundingBox.isEmpty()) { _bottomRightTile = new Tile (initialBoundingBox, true); _topLeftTile = _bottomRightTile; - for_each_box(box, region.GetBoxes()) { + for_each_box(box, region.getBoxes()) { Fill(box); end_for; } @@ -2476,82 +2476,82 @@ Region& Region::operator=(const Region& region) return *this; } -Box Region::GetBoundingBox() const +Box Region::getBoundingBox() const // ******************************* { Box boundingBox; - if (_bottomRightTile) boundingBox = _bottomRightTile->GetBoundingBox(); - if (_topLeftTile) boundingBox.merge(_topLeftTile->GetBoundingBox()); + if (_bottomRightTile) boundingBox = _bottomRightTile->getBoundingBox(); + if (_topLeftTile) boundingBox.merge(_topLeftTile->getBoundingBox()); return boundingBox; } -Unit Region::GetXMin() const +Unit Region::getXMin() const // ************************* { - return (_topLeftTile) ? _topLeftTile->GetXMin() : Unit(); + return (_topLeftTile) ? _topLeftTile->getXMin() : Unit(); } -Unit Region::GetYMin() const +Unit Region::getYMin() const // ************************* { - return (_bottomRightTile) ? _bottomRightTile->GetYMin() : Unit(); + return (_bottomRightTile) ? _bottomRightTile->getYMin() : Unit(); } -Unit Region::GetXMax() const +Unit Region::getXMax() const // ************************* { - return (_bottomRightTile) ? _bottomRightTile->GetXMax() : Unit(); + return (_bottomRightTile) ? _bottomRightTile->getXMax() : Unit(); } -Unit Region::GetYMax() const +Unit Region::getYMax() const // ************************* { - return (_topLeftTile) ? _topLeftTile->GetYMax() : Unit(); + return (_topLeftTile) ? _topLeftTile->getYMax() : Unit(); } -Boxes Region::GetBoxes() const +Boxes Region::getBoxes() const // *************************** { return Region_BoxesUnder(this); } -Boxes Region::GetBoxesUnder(const Box& area) const +Boxes Region::getBoxesUnder(const Box& area) const // *********************************************** { return Region_BoxesUnder(this, area); } -Boxes Region::GetVoidBoxes() const +Boxes Region::getVoidBoxes() const // ******************************* { return Region_VoidBoxesUnder(this); } -Boxes Region::GetVoidBoxesUnder(const Box& area) const +Boxes Region::getVoidBoxesUnder(const Box& area) const // *************************************************** { return Region_VoidBoxesUnder(this, area); } -Region::SwapLine Region::GetVerticalSwapLine(const Interval& extention) const +Region::SwapLine Region::getVerticalSwapLine(const Interval& extention) const // ************************************************************************** { return SwapLine((Region*)this, Region::SwapLine::Type::VERTICAL, extention); } -Region::SwapLine Region::GetVerticalSwapLine(const Unit& x, const Interval& extention) const +Region::SwapLine Region::getVerticalSwapLine(const Unit& x, const Interval& extention) const // ***************************************************************************************** { return SwapLine((Region*)this, Region::SwapLine::Type::VERTICAL, x, extention); } -Region::SwapLine Region::GetHorizontalSwapLine(const Interval& extention) const +Region::SwapLine Region::getHorizontalSwapLine(const Interval& extention) const // **************************************************************************** { return SwapLine((Region*)this, Region::SwapLine::Type::HORIZONTAL, extention); } -Region::SwapLine Region::GetHorizontalSwapLine(const Unit& y, const Interval& extention) const +Region::SwapLine Region::getHorizontalSwapLine(const Unit& y, const Interval& extention) const // ******************************************************************************************* { return SwapLine((Region*)this, Region::SwapLine::Type::HORIZONTAL, y, extention); @@ -2560,28 +2560,28 @@ Region::SwapLine Region::GetHorizontalSwapLine(const Unit& y, const Interval& ex bool Region::IsEmpty() const // ************************* { - return Region_Tiles(this).GetSubSet(!Tile::GetIsVoidFilter()).IsEmpty(); + return Region_Tiles(this).getSubSet(!Tile::getIsVoidFilter()).IsEmpty(); } bool Region::Contains(const Point& point) const // ******************************************** { - return GetBoundingBox().contains(point) && _GetNonVoidTileAt(point); + return getBoundingBox().contains(point) && _getNonVoidTileAt(point); } bool Region::Contains(const Box& box) const // **************************************** { if (box.isPonctual()) return Contains(box.getCenter()); - return GetBoundingBox().contains(box) && + return getBoundingBox().contains(box) && Region_TilesUnder (this, Box(box).inflate(-1)) - .GetSubSet(Tile::GetIsVoidFilter()).IsEmpty(); + .getSubSet(Tile::getIsVoidFilter()).IsEmpty(); } bool Region::Contains(const Region& region) const // ********************************************** { - for_each_box(box, region.GetBoxesUnder(GetBoundingBox())) { + for_each_box(box, region.getBoxesUnder(getBoundingBox())) { if (!Contains(box)) return false; end_for; } @@ -2593,16 +2593,16 @@ bool Region::Intersect(const Box& box) const // ***************************************** { if (box.isPonctual()) return contains(box.getCenter()); - if (! GetBoundingBox().Intersect(box)) return false; + if (! getBoundingBox().Intersect(box)) return false; if (! Region_TilesUnder (this, Box(box).inflate(1)) - .GetSubSet(! Tile::GetIsVoidFilter()).IsEmpty()) return true; + .getSubSet(! Tile::getIsVoidFilter()).IsEmpty()) return true; return false; } bool Region::Intersect(const Region& region) const // *********************************************** { - for_each_box(box, region.GetBoxesUnder(GetBoundingBox())) { + for_each_box(box, region.getBoxesUnder(getBoundingBox())) { if (Intersect(box)) return true; end_for; } @@ -2627,18 +2627,18 @@ Region& Region::Clear() while (!tileStack.empty()) { tile = tileStack.top(); tileStack.pop(); - Unit xMin = tile->GetXMin(); - Unit xMax = tile->GetXMax(); + Unit xMin = tile->getXMin(); + Unit xMax = tile->getXMax(); Tile* topTile = tile->_topTile; - while (topTile && (xMin < topTile->GetXMax())) { - if (topTile->GetXMax() <= xMax) tileStack.push(topTile); + while (topTile && (xMin < topTile->getXMax())) { + if (topTile->getXMax() <= xMax) tileStack.push(topTile); topTile = topTile->_leftTile; } accumulate.push_back (tile); //delete tile; } - for_each_object (Tile*, t, GetCollection (accumulate)) { + for_each_object (Tile*, t, getCollection (accumulate)) { delete t; end_for; } @@ -2659,12 +2659,12 @@ Region& Region::Fill(const Box& box) return *this; } - if (!GetBoundingBox().contains(box)) + if (!getBoundingBox().contains(box)) _Update(box, false); else { - Tile* startTile = _GetStartTile(_GetTileAt(Point(box.getXMax(), box.getYMin()))); - GenericCollection tiles = _GetTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile); - if (!tiles.GetSubSet(Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, false, startTile); + Tile* startTile = _getStartTile(_getTileAt(Point(box.getXMax(), box.getYMin()))); + GenericCollection tiles = _getTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile); + if (!tiles.getSubSet(Tile::getIsVoidFilter()).IsEmpty()) _Update(box, false, startTile); } return *this; @@ -2673,14 +2673,14 @@ Region& Region::Fill(const Box& box) Region& Region::Fill(const Region& region) // *************************************** { - for_each_box(box, region.GetBoxes()) { + for_each_box(box, region.getBoxes()) { Fill(box); end_for; } return *this; } -Region& Region::GetUnion (const Region& region) +Region& Region::getUnion (const Region& region) // ******************************************** { return Fill(region); @@ -2691,13 +2691,13 @@ Region& Region::Groove(const Box& box) { if (!_bottomRightTile) return *this; - Box correctedBox = GetBoundingBox().getIntersection(box); + Box correctedBox = getBoundingBox().getIntersection(box); if (correctedBox.isEmpty() || !correctedBox.getWidth() || !correctedBox.getHeight()) return *this; - Tile* startTile = _GetStartTile(_GetTileAt(Point(correctedBox.getXMax(), correctedBox.getYMin()))); - GenericCollection tiles = _GetTilesUnder(Box(correctedBox).inflate(0, 0, -1, -1), startTile); - if (!tiles.GetSubSet(!Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, true, startTile); + Tile* startTile = _getStartTile(_getTileAt(Point(correctedBox.getXMax(), correctedBox.getYMin()))); + GenericCollection tiles = _getTilesUnder(Box(correctedBox).inflate(0, 0, -1, -1), startTile); + if (!tiles.getSubSet(!Tile::getIsVoidFilter()).IsEmpty()) _Update(box, true, startTile); return *this; } @@ -2705,20 +2705,20 @@ Region& Region::Groove(const Box& box) Region& Region::Groove(const Region& region) // ***************************************** { - Box boundingBox = GetBoundingBox(); - for_each_box(box, region.GetBoxesUnder(boundingBox)) { + Box boundingBox = getBoundingBox(); + for_each_box(box, region.getBoxesUnder(boundingBox)) { Groove(box); end_for; } return *this; } -Region& Region::GetIntersection (const Region& region) +Region& Region::getIntersection (const Region& region) // *************************************************** { - Box boundingBox = GetBoundingBox(); - for_each_box (box, region.GetVoidBoxesUnder (boundingBox)) { - //for_each_box (box, region.GetVoidBoxes ()) { + Box boundingBox = getBoundingBox(); + for_each_box (box, region.getVoidBoxesUnder (boundingBox)) { + //for_each_box (box, region.getVoidBoxes ()) { //if (! boundingBox.Intersect (box)) continue; Groove (box); end_for; @@ -2732,23 +2732,23 @@ Region& Region::Inflate(const Unit& quantity) if (!IsEmpty()) { if (0 < quantity) { list boxList; - for_each_object(Tile*, tile, Region_Tiles(this).GetSubSet(!Tile::GetIsVoidFilter())) { - boxList.push_back(tile->GetBoundingBox()); + for_each_object(Tile*, tile, Region_Tiles(this).getSubSet(!Tile::getIsVoidFilter())) { + boxList.push_back(tile->getBoundingBox()); end_for; } - for_each_box(box, GetCollection(boxList)) { + for_each_box(box, getCollection(boxList)) { Fill(box.inflate(quantity)); end_for; } } else if (quantity < 0) { - _GrowthToFit(GetBoundingBox().inflate(GetUnit(1))); + _GrowthToFit(getBoundingBox().inflate(getUnit(1))); list boxList; - for_each_object(Tile*, tile, Region_Tiles(this).GetSubSet(Tile::GetIsVoidFilter())) { - boxList.push_back(tile->GetBoundingBox()); + for_each_object(Tile*, tile, Region_Tiles(this).getSubSet(Tile::getIsVoidFilter())) { + boxList.push_back(tile->getBoundingBox()); end_for; } - for_each_box(box, GetCollection(boxList)) { + for_each_box(box, getCollection(boxList)) { Groove(box.inflate(-quantity)); end_for; } @@ -2763,8 +2763,8 @@ Region& Region::Translate(const Unit& dx, const Unit& dy) { if ((dx != 0) || (dy != 0)) { set tileSet; - _GetTiles().Fill(tileSet); - for_each_object(Tile*, tile, GetCollection(tileSet)) { + _getTiles().Fill(tileSet); + for_each_object(Tile*, tile, getCollection(tileSet)) { tile->_boundingBox.translate(dx, dy); end_for; } @@ -2772,68 +2772,68 @@ Region& Region::Translate(const Unit& dx, const Unit& dy) return *this; } -string Region::_GetString() const +string Region::_getString() const // ****************************** { - string s = "<" + _GetTypeName() + ">"; + string s = "<" + _getTypeName() + ">"; return s; } -Record* Region::_GetRecord() const +Record* Region::_getRecord() const // ************************* { - Record* record = new Record(GetString(this)); + Record* record = new Record(getString(this)); if (record) { - record->Add(GetSlot("BottomRightTile", _bottomRightTile)); - record->Add(GetSlot("TopLeftTile", _topLeftTile)); + record->Add(getSlot("BottomRightTile", _bottomRightTile)); + record->Add(getSlot("TopLeftTile", _topLeftTile)); } return record; } -Region_Tile* Region::_GetTileAt(const Point& point, Tile* startTile) const +Region_Tile* Region::_getTileAt(const Point& point, Tile* startTile) const // *********************************************************************** { - if (!GetBoundingBox().contains(point)) return NULL; + if (!getBoundingBox().contains(point)) return NULL; - return (startTile) ? startTile->GetTileAt(point) : _bottomRightTile->GetTileAt(point); + return (startTile) ? startTile->getTileAt(point) : _bottomRightTile->getTileAt(point); } -Region_Tile* Region::_GetNonVoidTileAt(const Point& point, Tile* startTile) const +Region_Tile* Region::_getNonVoidTileAt(const Point& point, Tile* startTile) const // ****************************************************************************** { - if (!GetBoundingBox().contains(point)) return NULL; + if (!getBoundingBox().contains(point)) return NULL; - return (startTile) ? startTile->GetNonVoidTileAt(point) : _bottomRightTile->GetNonVoidTileAt(point); + return (startTile) ? startTile->getNonVoidTileAt(point) : _bottomRightTile->getNonVoidTileAt(point); } -Region_Tile* Region::_GetStartTile(Tile* tile) const +Region_Tile* Region::_getStartTile(Tile* tile) const // ************************************************* { Tile* startTile = NULL; if (tile) { if (!startTile && tile->_rightTile) { - Unit y = tile->GetYMin(); + Unit y = tile->getYMin(); startTile = tile->_rightTile; - while (startTile && (y <= startTile->GetYMax())) startTile = startTile->_bottomTile; + while (startTile && (y <= startTile->getYMax())) startTile = startTile->_bottomTile; } if (!startTile && tile->_bottomTile) { - Unit x = tile->GetXMax(); + Unit x = tile->getXMax(); startTile = tile->_bottomTile; - while (startTile && (startTile->GetXMin() <= x)) startTile = startTile->_rightTile; + while (startTile && (startTile->getXMin() <= x)) startTile = startTile->_rightTile; } } return startTile; } -GenericCollection Region::_GetTiles() const +GenericCollection Region::_getTiles() const // ****************************************************** { return Region_Tiles(this); } -GenericCollection Region::_GetTilesUnder(const Box& area, Tile* startTile) const +GenericCollection Region::_getTilesUnder(const Box& area, Tile* startTile) const // ******************************************************************************************* { return Region_TilesUnder(this, area, startTile); @@ -2842,38 +2842,38 @@ GenericCollection Region::_GetTilesUnder(const Box& area, Tile* st void Region::_Split(const Box& box) // ******************************** { - if (GetBoundingBox().intersect(box)) { + if (getBoundingBox().intersect(box)) { - Tile* startTile = _GetStartTile(_GetTileAt(Point(box.getXMax(), box.getYMin()))); + Tile* startTile = _getStartTile(_getTileAt(Point(box.getXMax(), box.getYMin()))); list tileList; Box line = Box(box.getXMin(), box.getYMin(), box.getXMax() - 1, box.getYMin()); - _GetTilesUnder(line, startTile).Fill(tileList); - for_each_object(Tile*, tile, GetCollection(tileList)) { + _getTilesUnder(line, startTile).Fill(tileList); + for_each_object(Tile*, tile, getCollection(tileList)) { tile->SplitHorizontal(this, box.getYMin()); end_for; } tileList.clear(); line = Box(box.getXMin(), box.getYMax(), box.getXMax() - 1, box.getYMax()); - _GetTilesUnder(line, startTile).Fill(tileList); - for_each_object(Tile*, tile, GetCollection(tileList)) { + _getTilesUnder(line, startTile).Fill(tileList); + for_each_object(Tile*, tile, getCollection(tileList)) { tile->SplitHorizontal(this, box.getYMax()); end_for; } tileList.clear(); line = Box(box.getXMin(), box.getYMin(), box.getXMin(), box.getYMax() - 1); - _GetTilesUnder(line, startTile).Fill(tileList); - for_each_object(Tile*, tile, GetCollection(tileList)) { + _getTilesUnder(line, startTile).Fill(tileList); + for_each_object(Tile*, tile, getCollection(tileList)) { tile->SplitVertical(this, box.getXMin()); end_for; } tileList.clear(); line = Box(box.getXMax(), box.getYMin(), box.getXMax(), box.getYMax() - 1); - _GetTilesUnder(line, startTile).Fill(tileList); - for_each_object(Tile*, tile, GetCollection(tileList)) { + _getTilesUnder(line, startTile).Fill(tileList); + for_each_object(Tile*, tile, getCollection(tileList)) { tile->SplitVertical(this, box.getXMax()); end_for; } @@ -2891,10 +2891,10 @@ void Region::_GrowthToFit(const Box& box) return; } - if (GetBoundingBox().contains(box)) return; + if (getBoundingBox().contains(box)) return; - if (box.getYMin() < GetYMin()) { - Tile* newTile = new Tile(Box(GetXMin(), box.getYMin(), GetXMax(), GetYMin()), true); + if (box.getYMin() < getYMin()) { + Tile* newTile = new Tile(Box(getXMin(), box.getYMin(), getXMax(), getYMin()), true); Tile* tile = _bottomRightTile; while (tile) { tile->_bottomTile = newTile; @@ -2904,8 +2904,8 @@ void Region::_GrowthToFit(const Box& box) _bottomRightTile = newTile; } - if (GetYMax() < box.getYMax()) { - Tile* newTile = new Tile(Box(GetXMin(), GetYMax(), GetXMax(), box.getYMax()), true); + if (getYMax() < box.getYMax()) { + Tile* newTile = new Tile(Box(getXMin(), getYMax(), getXMax(), box.getYMax()), true); Tile* tile = _topLeftTile; while (tile) { tile->_topTile = newTile; @@ -2915,8 +2915,8 @@ void Region::_GrowthToFit(const Box& box) _topLeftTile = newTile; } - if (box.getXMin() < GetXMin()) { - Tile* newTile = new Tile(Box(box.getXMin(), GetYMin(), GetXMin(), GetYMax()), true); + if (box.getXMin() < getXMin()) { + Tile* newTile = new Tile(Box(box.getXMin(), getYMin(), getXMin(), getYMax()), true); Tile* tile = _topLeftTile; while (tile) { tile->_leftTile = newTile; @@ -2926,8 +2926,8 @@ void Region::_GrowthToFit(const Box& box) _topLeftTile = newTile; } - if (GetXMax() < box.getXMax()) { - Tile* newTile = new Tile(Box(GetXMax(), GetYMin(), box.getXMax(), GetYMax()), true); + if (getXMax() < box.getXMax()) { + Tile* newTile = new Tile(Box(getXMax(), getYMin(), box.getXMax(), getYMax()), true); Tile* tile = _bottomRightTile; while (tile) { tile->_rightTile = newTile; @@ -2943,19 +2943,19 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile) { if (box.isEmpty() || !_bottomRightTile || !box.getWidth() || !box.getHeight()) return; - if (!GetBoundingBox().contains(box)) _GrowthToFit(box); + if (!getBoundingBox().contains(box)) _GrowthToFit(box); _Split(box); Tile* newTile = new Tile(box, isVoid); list tileList; - _GetTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile).Fill(tileList); - for_each_object(Tile*, tile, GetCollection(tileList)) { + _getTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile).Fill(tileList); + for_each_object(Tile*, tile, getCollection(tileList)) { if (_topLeftTile == tile) _topLeftTile = newTile; if (_bottomRightTile == tile) _bottomRightTile = newTile; - if (tile->GetXMin() == box.getXMin()) { - if (tile->GetYMin() == box.getYMin()) { + if (tile->getXMin() == box.getXMin()) { + if (tile->getYMin() == box.getYMin()) { newTile->_leftTile = tile->_leftTile; newTile->_bottomTile = tile->_bottomTile; } @@ -2965,15 +2965,15 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile) leftTile = leftTile->_topTile; } } - if (tile->GetYMin() == box.getYMin()) { + if (tile->getYMin() == box.getYMin()) { Tile* bottomTile = tile->_bottomTile; while (bottomTile && (bottomTile->_topTile == tile)) { bottomTile->_topTile = newTile; bottomTile = bottomTile->_rightTile; } } - if (tile->GetYMax() == box.getYMax()) { - if (tile->GetXMax() == box.getXMax()) { + if (tile->getYMax() == box.getYMax()) { + if (tile->getXMax() == box.getXMax()) { newTile->_topTile = tile->_topTile; newTile->_rightTile = tile->_rightTile; } @@ -2983,7 +2983,7 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile) topTile = topTile->_leftTile; } } - if (tile->GetXMax() == box.getXMax()) { + if (tile->getXMax() == box.getXMax()) { Tile* rightTile = tile->_rightTile; while (rightTile && (rightTile->_leftTile == tile)) { rightTile->_leftTile = newTile; @@ -2992,7 +2992,7 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile) } end_for; } - for_each_object(Tile*, tile, GetCollection(tileList)) { + for_each_object(Tile*, tile, getCollection(tileList)) { delete tile; end_for; } @@ -3007,12 +3007,12 @@ Region::VerticalEnhancement() { bool modif = false; Region result; - double minArea = 1.*GetUnit(5)*GetUnit(5); + double minArea = 1.*getUnit(5)*getUnit(5); do { // Rechercher la box de plus grande surface Box maxBox = Box(); double area = minArea; - for_each_box (box, GetBoxes()) { + for_each_box (box, getBoxes()) { if (! box.isEmpty()) { double a = 1. * box.getWidth() * box.getHeight(); if (area < a) { @@ -3023,12 +3023,12 @@ Region::VerticalEnhancement() end_for; } if (maxBox.isEmpty()) break; - Tile* tile = _GetTileAt (maxBox.getCenter()); - if (maxBox.getWidth() >= GetUnit(2)) { + Tile* tile = _getTileAt (maxBox.getCenter()); + if (maxBox.getWidth() >= getUnit(2)) { modif = tile->VerticalEnhancement (this); } - result.Fill (tile->GetBoundingBox()); - Groove (tile->GetBoundingBox()); + result.Fill (tile->getBoundingBox()); + Groove (tile->getBoundingBox()); } while (! IsEmpty()); Fill (result); return modif; @@ -3041,7 +3041,7 @@ Region::VerticalEnhancement(Point point) // Amelioration de la tuile contenant point { bool modif = false; - Tile* tile = _GetTileAt (point); + Tile* tile = _getTileAt (point); if (tile) modif = tile->VerticalEnhancement (this); return modif; }; // Region::VerticalEnhancement @@ -3053,12 +3053,12 @@ Region::HorizontalEnhancement() { bool modif = false; Region result; - double minArea = 1.*GetUnit(5)*GetUnit(5); + double minArea = 1.*getUnit(5)*getUnit(5); do { // Rechercher la box de plus grande surface Box maxBox = Box(); double area = minArea; - for_each_box (box, GetBoxes()) { + for_each_box (box, getBoxes()) { if (! box.isEmpty()) { double a = 1. * box.getWidth() * box.getHeight(); if (area < a) { @@ -3069,12 +3069,12 @@ Region::HorizontalEnhancement() end_for; } if (maxBox.isEmpty()) break; - Tile* tile = _GetTileAt (maxBox.getCenter()); - if (maxBox.getWidth() >= GetUnit(2)) { + Tile* tile = _getTileAt (maxBox.getCenter()); + if (maxBox.getWidth() >= getUnit(2)) { modif = tile->HorizontalEnhancement (this); } - result.Fill (tile->GetBoundingBox()); - Groove (tile->GetBoundingBox()); + result.Fill (tile->getBoundingBox()); + Groove (tile->getBoundingBox()); } while (! IsEmpty()); Fill (result); return modif; @@ -3086,7 +3086,7 @@ Region::HorizontalEnhancement(Point point) // Amelioration de la tuile contenant point { bool modif = false; - Tile* tile = _GetTileAt (point); + Tile* tile = _getTileAt (point); if (tile) modif = tile->HorizontalEnhancement (this); return modif; }; // Region::HorizontalEnhancement @@ -3100,10 +3100,10 @@ Region::TopBottomFacing (const Box box) const { Interval result = Interval(); if (box.isEmpty()) return result; - Tile* tile = _GetTileAt (box.getCenter()); - Interval it1 = tile->_GetTopNeighbour (); - Interval it2 = tile->_GetBottomNeighbour (); - return it1.GetIntersection (it2); + Tile* tile = _getTileAt (box.getCenter()); + Interval it1 = tile->_getTopNeighbour (); + Interval it2 = tile->_getBottomNeighbour (); + return it1.getIntersection (it2); }; // Region::TopBottomFacing Interval @@ -3114,10 +3114,10 @@ Region::LeftRightFacing (const Box box) const { Interval result = Interval(); if (box.isEmpty()) return result; - Tile* tile = _GetTileAt (box.getCenter()); - Interval it1 = tile->_GetLeftNeighbour (); - Interval it2 = tile->_GetRightNeighbour (); - return it1.GetIntersection (it2); + Tile* tile = _getTileAt (box.getCenter()); + Interval it1 = tile->_getLeftNeighbour (); + Interval it2 = tile->_getRightNeighbour (); + return it1.getIntersection (it2); }; // Region::LeftRightFacing diff --git a/hurricane/src/hurricane/Region.h b/hurricane/src/hurricane/Region.h index c678ac3e..5819c708 100644 --- a/hurricane/src/hurricane/Region.h +++ b/hurricane/src/hurricane/Region.h @@ -26,193 +26,193 @@ class Region { // Types // ***** - public: typedef Region_Tile Tile; + public: typedef Region_Tile Tile; public: class SwapLine { - // ******************* - + // ******************* + public: class Type { - // *************** + // *************** - public: enum Code {VERTICAL=0, HORIZONTAL=1}; + public: enum Code {VERTICAL=0, HORIZONTAL=1}; - private: Code _code; + private: Code _code; - public: Type(const Code& code = VERTICAL); - public: Type(const Type& type); + public: Type(const Code& code = VERTICAL); + public: Type(const Type& type); - public: Type& operator=(const Type& type); + public: Type& operator=(const Type& type); - public: operator const Code&() const {return _code;}; + 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("Region::SwapLine::Type"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Region::SwapLine::Type"); }; + public: string _getString() const; + public: Record* _getRecord() const; - }; + }; - // Attributes - // ********** - - private: Region* _region; - private: Type _type; - private: Unit _position; - private: Interval _extention; - private: Tile* _baseTile; + // Attributes + // ********** + + private: Region* _region; + private: Type _type; + private: Unit _position; + private: Interval _extention; + private: Tile* _baseTile; - // Constructors - // ************ + // Constructors + // ************ - public: SwapLine(); - public: SwapLine(Region* region, const Type& type, const Interval& extention = Interval()); - public: SwapLine(Region* region, const Type& type, const Unit& position, const Interval& extention = Interval()); - public: SwapLine(const SwapLine& swapLine); + public: SwapLine(); + public: SwapLine(Region* region, const Type& type, const Interval& extention = Interval()); + public: SwapLine(Region* region, const Type& type, const Unit& position, const Interval& extention = Interval()); + public: SwapLine(const SwapLine& swapLine); - // Destructor - // ********** + // Destructor + // ********** - public: ~SwapLine(); + public: ~SwapLine(); - // Operators - // ********* + // Operators + // ********* - public: SwapLine& operator=(const SwapLine& swapLine); + public: SwapLine& operator=(const SwapLine& swapLine); - // Accessors - // ********* + // Accessors + // ********* - public: Region* GetRegion() const {return _region;}; - public: Type GetType() const {return _type;}; - public: const Unit& GetPosition() const {return _position;}; - public: const Interval& GetExtention() const {return _extention;}; + public: Region* getRegion() const {return _region;}; + public: Type getType() const {return _type;}; + public: const Unit& getPosition() const {return _position;}; + public: const Interval& getExtention() const {return _extention;}; - public: Intervals GetIntervals() const; + public: Intervals getIntervals() const; - // Predicates - // ********** + // Predicates + // ********** - public: bool IsValid() const {return _baseTile;}; + public: bool IsValid() const {return _baseTile;}; - // Updators - // ******** + // Updators + // ******** - public: void Progress(int n = 1); - public: void Translate(const Unit& quantity); - public: void SetPosition(const Unit& position); + public: void Progress(int n = 1); + public: void Translate(const Unit& quantity); + public: void SetPosition(const Unit& position); - // Others - // ****** + // Others + // ****** - public: string _GetTypeName() const { return _TName("Region::SwapLine"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; - public: Tile* _GetBaseTile() const {return _baseTile;}; + public: string _getTypeName() const { return _TName("Region::SwapLine"); }; + public: string _getString() const; + public: Record* _getRecord() const; + public: Tile* _getBaseTile() const {return _baseTile;}; - }; + }; // Attributes // ********** - private: Tile* _bottomRightTile; - private: Tile* _topLeftTile; + private: Tile* _bottomRightTile; + private: Tile* _topLeftTile; // Constructors // ************ - public: Region(); - public: Region(const Box& box, bool isVoid = false); - public: Region(const Region& region); + public: Region(); + public: Region(const Box& box, bool isVoid = false); + public: Region(const Region& region); // Destructor // ********** - public: ~Region(); + public: ~Region(); // Operators // ********* - public: Region& operator=(const Region& region); + public: Region& operator=(const Region& region); // Accessors // ********* - public: Box GetBoundingBox() const; + public: Box getBoundingBox() const; - public: Unit GetXMin() const; - public: Unit GetYMin() const; - public: Unit GetXMax() const; - public: Unit GetYMax() const; + public: Unit getXMin() const; + public: Unit getYMin() const; + public: Unit getXMax() const; + public: Unit getYMax() const; - public: Boxes GetBoxes() const; - public: Boxes GetBoxesUnder(const Box& area) const; + public: Boxes getBoxes() const; + public: Boxes getBoxesUnder(const Box& area) const; - public: Boxes GetVoidBoxes() const; - public: Boxes GetVoidBoxesUnder(const Box& area) const; + public: Boxes getVoidBoxes() const; + public: Boxes getVoidBoxesUnder(const Box& area) const; - public: SwapLine GetVerticalSwapLine(const Interval& extention = Interval()) const; - public: SwapLine GetVerticalSwapLine(const Unit& x, const Interval& extention = Interval()) const; + public: SwapLine getVerticalSwapLine(const Interval& extention = Interval()) const; + public: SwapLine getVerticalSwapLine(const Unit& x, const Interval& extention = Interval()) const; - public: SwapLine GetHorizontalSwapLine(const Interval& extention = Interval()) const; - public: SwapLine GetHorizontalSwapLine(const Unit& y, const Interval& extention = Interval()) const; + public: SwapLine getHorizontalSwapLine(const Interval& extention = Interval()) const; + public: SwapLine getHorizontalSwapLine(const Unit& y, const Interval& extention = Interval()) const; // Predicates // ********** - public: bool IsEmpty() const; + public: bool IsEmpty() const; - public: bool Contains(const Point& point) const; - public: bool Contains(const Box& box) const; - public: bool Contains(const Region& region) const; -#if 0 // pas encore teste - public: bool Intersect(const Box& box) const; - public: bool Intersect(const Region& region) const; + public: bool Contains(const Point& point) const; + public: bool Contains(const Box& box) const; + public: bool Contains(const Region& region) const; +#if 0 // pas encore teste + public: bool Intersect(const Box& box) const; + public: bool Intersect(const Region& region) const; #endif // Updators // ******** - public: Region& Clear(); + public: Region& Clear(); - public: Region& Fill(const Box& box); - public: Region& Fill(const Region& region); - public: Region& GetUnion(const Region& region); + public: Region& Fill(const Box& box); + public: Region& Fill(const Region& region); + public: Region& getUnion(const Region& region); - public: Region& Groove(const Box& box); - public: Region& Groove(const Region& region); - public: Region& GetIntersection(const Region& region); + public: Region& Groove(const Box& box); + public: Region& Groove(const Region& region); + public: Region& getIntersection(const Region& region); - public: Region& Inflate(const Unit& quantity); - public: Region& Translate(const Unit& dx, const Unit& dy); + public: Region& Inflate(const Unit& quantity); + public: Region& Translate(const Unit& dx, const Unit& dy); - public: bool VerticalEnhancement(); - public: bool VerticalEnhancement(Point point); - public: bool HorizontalEnhancement(); - public: bool HorizontalEnhancement(Point point); - public: Interval TopBottomFacing (const Box box) const; - public: Interval LeftRightFacing (const Box box) const; + public: bool VerticalEnhancement(); + public: bool VerticalEnhancement(Point point); + public: bool HorizontalEnhancement(); + public: bool HorizontalEnhancement(Point point); + public: Interval TopBottomFacing (const Box box) const; + public: Interval LeftRightFacing (const Box box) const; // Others // ****** - public: string _GetTypeName() const { return _TName("Region"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Region"); }; + public: string _getString() const; + public: Record* _getRecord() const; - public: Tile* _GetBottomRightTile() const {return _bottomRightTile;}; - public: Tile* _GetTopLeftTile() const {return _topLeftTile;}; - public: Tile* _GetTileAt(const Point& point, Tile* startTile = NULL) const; - public: Tile* _GetNonVoidTileAt(const Point& point, Tile* startTile = NULL) const; - public: Tile* _GetStartTile(Tile* tile) const; - public: GenericCollection _GetTiles() const; - public: GenericCollection _GetTilesUnder(const Box& area, Tile* startTile = NULL) const; + public: Tile* _getBottomRightTile() const {return _bottomRightTile;}; + public: Tile* _getTopLeftTile() const {return _topLeftTile;}; + public: Tile* _getTileAt(const Point& point, Tile* startTile = NULL) const; + public: Tile* _getNonVoidTileAt(const Point& point, Tile* startTile = NULL) const; + public: Tile* _getStartTile(Tile* tile) const; + public: GenericCollection _getTiles() const; + public: GenericCollection _getTilesUnder(const Box& area, Tile* startTile = NULL) const; - public: void _SetBottomRightTile(Tile* bottomRightTile) {_bottomRightTile = bottomRightTile;}; - public: void _SetTopLeftTile(Tile* topLeftTile) {_topLeftTile = topLeftTile;}; - public: void _Split(const Box& box); - public: void _GrowthToFit(const Box& box); - public: void _Update(const Box& box, bool isVoid, Tile* startTile = NULL); + public: void _SetBottomRightTile(Tile* bottomRightTile) {_bottomRightTile = bottomRightTile;}; + public: void _SetTopLeftTile(Tile* topLeftTile) {_topLeftTile = topLeftTile;}; + public: void _Split(const Box& box); + public: void _GrowthToFit(const Box& box); + public: void _Update(const Box& box, bool isVoid, Tile* startTile = NULL); }; diff --git a/hurricane/src/hurricane/Relation.cpp b/hurricane/src/hurricane/Relation.cpp index fae8abf4..74315f9c 100644 --- a/hurricane/src/hurricane/Relation.cpp +++ b/hurricane/src/hurricane/Relation.cpp @@ -21,44 +21,44 @@ namespace Hurricane { class Relation_OwnerIsSlave : public Filter { // ********************************************** - private: const Relation* _relation; + private: const Relation* _relation; - public: Relation_OwnerIsSlave(const Relation* relation) - // **************************************************** - : _relation(relation) - { - }; + public: Relation_OwnerIsSlave(const Relation* relation) + // **************************************************** + : _relation(relation) + { + }; - public: Relation_OwnerIsSlave(const Relation_OwnerIsSlave& filter) - // *************************************************************** - : _relation(filter._relation) - { - }; + public: Relation_OwnerIsSlave(const Relation_OwnerIsSlave& filter) + // *************************************************************** + : _relation(filter._relation) + { + }; - public: Relation_OwnerIsSlave& operator=(const Relation_OwnerIsSlave& filter) - // ************************************************************************** - { - _relation = filter._relation; - return *this; - }; + public: Relation_OwnerIsSlave& operator=(const Relation_OwnerIsSlave& filter) + // ************************************************************************** + { + _relation = filter._relation; + return *this; + }; - public: virtual Filter* GetClone() const - // ******************************************* - { - return new Relation_OwnerIsSlave(*this); - }; + public: virtual Filter* getClone() const + // ******************************************* + { + return new Relation_OwnerIsSlave(*this); + }; - public: virtual bool Accept(DBo* owner) const - // ****************************************** - { - return (owner != _relation->GetMasterOwner()); - }; + public: virtual bool Accept(DBo* owner) const + // ****************************************** + { + return (owner != _relation->getMasterOwner()); + }; - public: virtual string _GetString() const - // ************************************** - { - return "<" + _TName("Relation::OwnerIsSlave") + " " + GetString(_relation) + ">"; - }; + public: virtual string _getString() const + // ************************************** + { + return "<" + _TName("Relation::OwnerIsSlave") + " " + getString(_relation) + ">"; + }; }; @@ -70,49 +70,49 @@ class Relation_OwnerIsSlave : public Filter { Relation::Relation(DBo* masterOwner) // ********************************* -: Inherit(), - _masterOwner(masterOwner) +: Inherit(), + _masterOwner(masterOwner) { - if (!_masterOwner) - throw Error("Can't create " + _TName("Relation") + " : null master owner"); + if (!_masterOwner) + throw Error("Can't create " + _TName("Relation") + " : null master owner"); } -DBos Relation::GetSlaveOwners() const +DBos Relation::getSlaveOwners() const // ********************************** { - return GetOwners().GetSubSet(Relation_OwnerIsSlave(this)); + return getOwners().getSubSet(Relation_OwnerIsSlave(this)); } -void Relation::OnReleasedBy(DBo* owner) +void Relation::onReleasedBy(DBo* owner) // ************************************ { - _GetOwnerSet().erase(owner); + _getOwnerSet().erase(owner); - if (owner == _masterOwner) Delete(); + if (owner == _masterOwner) destroy(); } -void Relation::_PostCreate() +void Relation::_postCreate() // ************************* { - Inherit::_PostCreate(); + Inherit::_postCreate(); - _masterOwner->Put(this); + _masterOwner->put(this); } -string Relation::_GetString() const +string Relation::_getString() const // ******************************** { - return "<" + _TName("Relation") + " " + GetString(GetMasterOwner()) + " " + GetString(GetName()) + ">"; + return "<" + _TName("Relation") + " " + getString(getMasterOwner()) + " " + getString(getName()) + ">"; } -Record* Relation::_GetRecord() const +Record* Relation::_getRecord() const // *************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("MasterOwner", _masterOwner)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("MasterOwner", _masterOwner)); + } + return record; } @@ -123,35 +123,35 @@ Record* Relation::_GetRecord() const StandardRelation::StandardRelation(DBo* masterOwner, const Name& name) // ******************************************************************* -: Inherit(masterOwner), - _name(name) +: Inherit(masterOwner), + _name(name) { } -StandardRelation* StandardRelation::Create(DBo* masterOwner, const Name& name) +StandardRelation* StandardRelation::create(DBo* masterOwner, const Name& name) // *************************************************************************** { - StandardRelation* standardRelation = new StandardRelation(masterOwner, name); + StandardRelation* standardRelation = new StandardRelation(masterOwner, name); - standardRelation->_PostCreate(); + standardRelation->_postCreate(); - return standardRelation; + return standardRelation; }; -string StandardRelation::_GetString() const +string StandardRelation::_getString() const // **************************************** { - return Inherit::_GetString(); + return Inherit::_getString(); } -Record* StandardRelation::_GetRecord() const +Record* StandardRelation::_getRecord() const // *********************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("Name", &_name)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("Name", &_name)); + } + return record; } diff --git a/hurricane/src/hurricane/Relation.h b/hurricane/src/hurricane/Relation.h index d053d3a3..025fbce4 100644 --- a/hurricane/src/hurricane/Relation.h +++ b/hurricane/src/hurricane/Relation.h @@ -23,37 +23,37 @@ class Relation : public SharedProperty { // Types // ***** - public: typedef SharedProperty Inherit; + public: typedef SharedProperty Inherit; // Attributes // ********** - private: DBo* _masterOwner; + private: DBo* _masterOwner; // Constructors // ************ - protected: Relation(DBo* masterOwner); + protected: Relation(DBo* masterOwner); // Accessors // ********* - public: DBo* GetMasterOwner() const {return _masterOwner;}; - public: DBos GetSlaveOwners() const; + public: DBo* getMasterOwner() const {return _masterOwner;}; + public: DBos getSlaveOwners() const; // Managers // ******** - public: virtual void OnReleasedBy(DBo* owner); + public: virtual void onReleasedBy(DBo* owner); // Others // ****** - protected: virtual void _PostCreate(); + protected: virtual void _postCreate(); - public: virtual string _GetTypeName() const {return _TName("Relation");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("Relation");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; @@ -69,31 +69,31 @@ class StandardRelation : public Relation { // Types // ***** - public: typedef Relation Inherit; + public: typedef Relation Inherit; // Attributes // ********** - private: Name _name; + private: Name _name; // Constructors // ************ - protected: StandardRelation(DBo* masterOwner, const Name& name); + protected: StandardRelation(DBo* masterOwner, const Name& name); - public: static StandardRelation* Create(DBo* masterOwner, const Name& name); + public: static StandardRelation* create(DBo* masterOwner, const Name& name); // Accessors // ********* - public: virtual Name GetName() const {return _name;}; + public: virtual Name getName() const {return _name;}; // Others // ****** - public: virtual string _GetTypeName() const {return _TName("StandardRelation");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("StandardRelation");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/RoutingPad.cpp b/hurricane/src/hurricane/RoutingPad.cpp index 9afa2fa9..384c765f 100644 --- a/hurricane/src/hurricane/RoutingPad.cpp +++ b/hurricane/src/hurricane/RoutingPad.cpp @@ -51,12 +51,12 @@ RoutingPad* RoutingPad::Create(Net* net, Occurrence occurrence) Contact* contact = NULL; Point position; - if ( (plug = dynamic_cast(occurrence.GetEntity()) ) ) { - position = occurrence.GetPath().GetTransformation().getPoint( plug->GetPosition() ); - } else if ( (pin = dynamic_cast(occurrence.GetEntity()) ) ) { - position = occurrence.GetPath().GetTransformation().getPoint( pin->GetPosition() ); - } else if ( (contact = dynamic_cast(occurrence.GetEntity()) ) ) { - position = occurrence.GetPath().GetTransformation().getPoint( contact->GetPosition() ); + if ( (plug = dynamic_cast(occurrence.getEntity()) ) ) { + position = occurrence.getPath().getTransformation().getPoint( plug->getPosition() ); + } else if ( (pin = dynamic_cast(occurrence.getEntity()) ) ) { + position = occurrence.getPath().getTransformation().getPoint( pin->getPosition() ); + } else if ( (contact = dynamic_cast(occurrence.getEntity()) ) ) { + position = occurrence.getPath().getTransformation().getPoint( contact->getPosition() ); } if ( !plug && !pin && !contact ) @@ -64,114 +64,114 @@ RoutingPad* RoutingPad::Create(Net* net, Occurrence occurrence) RoutingPad* routingPad = new RoutingPad(net, position, occurrence); - routingPad->_PostCreate(); + routingPad->_postCreate(); return routingPad; } -void RoutingPad::_PostCreate() +void RoutingPad::_postCreate() // **************************** { - Inherit::_PostCreate(); + Inherit::_postCreate(); - if (!_occurrence.GetPath().IsEmpty()) - _occurrence.GetMasterCell()->_AddSlaveEntity(_occurrence.GetEntity(),this); + if (!_occurrence.getPath().IsEmpty()) + _occurrence.getMasterCell()->_AddSlaveEntity(_occurrence.getEntity(),this); } -Unit RoutingPad::GetX() const +Unit RoutingPad::getX() const // *********************** { return _x; } -Unit RoutingPad::GetY() const +Unit RoutingPad::getY() const // *********************** { return _y; } -Box RoutingPad::GetBoundingBox() const +Box RoutingPad::getBoundingBox() const // ******************************** { - Component* component = _GetEntityAsComponent(); + Component* component = _getEntityAsComponent(); if ( component ) { - return _occurrence.GetPath().GetTransformation().getBox ( component->GetBoundingBox() ); + return _occurrence.getPath().getTransformation().getBox ( component->getBoundingBox() ); } - return Box(GetPosition()); + return Box(getPosition()); } -Box RoutingPad::GetBoundingBox(const BasicLayer* basicLayer) const +Box RoutingPad::getBoundingBox(const BasicLayer* basicLayer) const // ****************************************************** { - Component* component = _GetEntityAsComponent(); + Component* component = _getEntityAsComponent(); if ( component ) - return _occurrence.GetPath().GetTransformation().getBox ( component->GetBoundingBox(basicLayer) ); + return _occurrence.getPath().getTransformation().getBox ( component->getBoundingBox(basicLayer) ); - return Box(GetPosition()); + return Box(getPosition()); } -Layer* RoutingPad::GetLayer() const +Layer* RoutingPad::getLayer() const // ****************************************************** { - Component* component = _GetEntityAsComponent(); - if ( component ) return component->GetLayer (); + Component* component = _getEntityAsComponent(); + if ( component ) return component->getLayer (); return NULL; } -Point RoutingPad::GetSourcePosition() const +Point RoutingPad::getSourcePosition() const // **************************************** { - Segment* segment = _GetEntityAsSegment(); + Segment* segment = _getEntityAsSegment(); if ( segment ) - return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetSourcePosition() ); + return _occurrence.getPath().getTransformation().getPoint ( segment->getSourcePosition() ); - return GetPosition(); + return getPosition(); } -Point RoutingPad::GetTargetPosition() const +Point RoutingPad::getTargetPosition() const // **************************************** { - Segment* segment = _GetEntityAsSegment(); + Segment* segment = _getEntityAsSegment(); if ( segment ) - return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetTargetPosition() ); + return _occurrence.getPath().getTransformation().getPoint ( segment->getTargetPosition() ); - return GetPosition(); + return getPosition(); } -Unit RoutingPad::GetSourceX() const +Unit RoutingPad::getSourceX() const // ******************************** { - return GetSourcePosition().getX(); + return getSourcePosition().getX(); } -Unit RoutingPad::GetSourceY() const +Unit RoutingPad::getSourceY() const // ******************************** { - return GetSourcePosition().getY(); + return getSourcePosition().getY(); } -Unit RoutingPad::GetTargetX() const +Unit RoutingPad::getTargetX() const // ******************************** { - return GetTargetPosition().getX(); + return getTargetPosition().getX(); } -Unit RoutingPad::GetTargetY() const +Unit RoutingPad::getTargetY() const // ******************************** { - return GetTargetPosition().getY(); + return getTargetPosition().getY(); } -Point RoutingPad::GetCenter() const +Point RoutingPad::getCenter() const // **************************************** { - Segment* segment = _GetEntityAsSegment(); + Segment* segment = _getEntityAsSegment(); if ( segment ) - return _occurrence.GetPath().GetTransformation().getPoint ( segment->GetCenter() ); + return _occurrence.getPath().getTransformation().getPoint ( segment->getCenter() ); - return GetPosition(); + return getPosition(); } @@ -188,13 +188,13 @@ void RoutingPad::Translate(const Unit& dx, const Unit& dy) void RoutingPad::SetX(const Unit& x) // ****************************** { - SetPosition(x, GetY()); + SetPosition(x, getY()); } void RoutingPad::SetY(const Unit& y) // ****************************** { - SetPosition(GetX(), y); + SetPosition(getX(), y); } void RoutingPad::SetPosition(const Unit& x, const Unit& y) @@ -217,58 +217,58 @@ void RoutingPad::SetOffset(const Unit& x, const Unit& y) _y = y; } -void RoutingPad::_PreDelete() +void RoutingPad::_preDestroy() // *********************** { -// trace << "entering RoutingPad::PreDelete: " << this << endl; +// trace << "entering RoutingPad::preDestroy: " << this << endl; // trace_in(); - if (!_occurrence.GetPath().IsEmpty()) - _occurrence.GetMasterCell()->_RemoveSlaveEntity(_occurrence.GetEntity(),this); - Inherit::_PreDelete(); + if (!_occurrence.getPath().IsEmpty()) + _occurrence.getMasterCell()->_RemoveSlaveEntity(_occurrence.getEntity(),this); + Inherit::_preDestroy(); -// trace << "exiting RoutingPad::PreDelete:" << endl; +// trace << "exiting RoutingPad::preDestroy:" << endl; // trace_out(); } -string RoutingPad::_GetString() const +string RoutingPad::_getString() const // ******************************* { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " [" + GetValueString(GetX())); - s.insert(s.length() - 1, " " + GetValueString(GetY())); + string s = Inherit::_getString(); + s.insert(s.length() - 1, " [" + getValueString(getX())); + s.insert(s.length() - 1, " " + getValueString(getY())); s.insert(s.length() - 1, "] "); - s.insert(s.length() - 1, GetString(_occurrence)); + s.insert(s.length() - 1, getString(_occurrence)); return s; } -Record* RoutingPad::_GetRecord() const +Record* RoutingPad::_getRecord() const // ************************** { - Record* record = Inherit::_GetRecord(); + Record* record = Inherit::_getRecord(); if (record) { - record->Add(GetSlot("X", &_x)); - record->Add(GetSlot("Y", &_y)); - record->Add(GetSlot("Occurrence",_occurrence)); + record->Add(getSlot("X", &_x)); + record->Add(getSlot("Y", &_y)); + record->Add(getSlot("Occurrence",_occurrence)); } return record; } -Component* RoutingPad::_GetEntityAsComponent () const +Component* RoutingPad::_getEntityAsComponent () const // *************************************************** { if ( _occurrence.IsValid() ) - return dynamic_cast( _occurrence.GetEntity() ); + return dynamic_cast( _occurrence.getEntity() ); return NULL; } -Segment* RoutingPad::_GetEntityAsSegment () const +Segment* RoutingPad::_getEntityAsSegment () const // *********************************************** { if ( _occurrence.IsValid() ) - return dynamic_cast( _occurrence.GetEntity() ); + return dynamic_cast( _occurrence.getEntity() ); return NULL; } @@ -276,13 +276,13 @@ Segment* RoutingPad::_GetEntityAsSegment () const //bool RoutingPad::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const //// ****************************************************************************************** //{ -// Layer* layer = GetLayer(); -// Box boundingBox ( GetBoundingBox() ); +// Layer* layer = getLayer(); +// Box boundingBox ( getBoundingBox() ); // Box area ( point ); // // area.Inflate ( aperture ); // -// for_each_basic_layer(basicLayer, layer->GetBasicLayers()) { +// for_each_basic_layer(basicLayer, layer->getBasicLayers()) { // if (view->IsVisible(basicLayer)) // if (boundingBox.Intersect(area)) return true; // end_for; @@ -295,15 +295,15 @@ Segment* RoutingPad::_GetEntityAsSegment () const //void RoutingPad::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) //// **************************************************************************************************** //{ -// Box boundingBox ( GetBoundingBox() ); -// BasicLayer* layer = GetLayer()->_GetSymbolicBasicLayer(); +// Box boundingBox ( getBoundingBox() ); +// BasicLayer* layer = getLayer()->_getSymbolicBasicLayer(); // // if ( basicLayer == layer ) { -// if ( 1 < view->GetScreenSize(boundingBox.GetWidth()) ) { +// if ( 1 < view->getScreenSize(boundingBox.getWidth()) ) { // view->DrawRectangle ( boundingBox ); // } // else -// view->DrawLine ( GetSourcePosition(), GetTargetPosition() ); +// view->DrawLine ( getSourcePosition(), getTargetPosition() ); // } //} // @@ -311,7 +311,7 @@ Segment* RoutingPad::_GetEntityAsSegment () const //void RoutingPad::_Highlight(View* view, const Box& updateArea, const Transformation& transformation) //// ********************************************************************************************** //{ -// BasicLayer* layer = GetLayer()->_GetSymbolicBasicLayer(); +// BasicLayer* layer = getLayer()->_getSymbolicBasicLayer(); // _Draw ( view, layer, updateArea, transformation ); //} @@ -321,15 +321,15 @@ void RoutingPad::SetExternalComponent(Component* component) { if (IsMaterialized()) Invalidate(false); - Occurrence plugOccurrence = GetPlugOccurrence(); - Plug* plug= static_cast(plugOccurrence.GetEntity()); - if (plug->GetMasterNet() != component->GetNet()) + Occurrence plugOccurrence = getPlugOccurrence(); + Plug* plug= static_cast(plugOccurrence.getEntity()); + if (plug->getMasterNet() != component->getNet()) throw Error("Cannot Set External Component to Routing Pad : Inconsistant Net"); - _occurrence.GetMasterCell()->_RemoveSlaveEntity(_occurrence.GetEntity(),this); - _occurrence = Occurrence(component,Path(plugOccurrence.GetPath(),plug->GetInstance())); + _occurrence.getMasterCell()->_RemoveSlaveEntity(_occurrence.getEntity(),this); + _occurrence = Occurrence(component,Path(plugOccurrence.getPath(),plug->getInstance())); - Point position = _occurrence.GetPath().GetTransformation().getPoint ( component->GetPosition() ); + Point position = _occurrence.getPath().getTransformation().getPoint ( component->getPosition() ); Horizontal* horizontal = dynamic_cast(component); if ( horizontal ) { @@ -344,7 +344,7 @@ void RoutingPad::SetExternalComponent(Component* component) SetPosition ( position ); } - _occurrence.GetMasterCell()->_AddSlaveEntity(_occurrence.GetEntity(),this); + _occurrence.getMasterCell()->_AddSlaveEntity(_occurrence.getEntity(),this); if (!IsMaterialized()) { Materialize(); @@ -352,19 +352,19 @@ void RoutingPad::SetExternalComponent(Component* component) } -Occurrence RoutingPad::GetPlugOccurrence() +Occurrence RoutingPad::getPlugOccurrence() // *************************************** { - if (is_a(_occurrence.GetEntity())) + if (is_a(_occurrence.getEntity())) return _occurrence; - Component* component= static_cast(_occurrence.GetEntity()); - Net* net=component->GetNet(); - Path path=_occurrence.GetPath(); + Component* component= static_cast(_occurrence.getEntity()); + Net* net=component->getNet(); + Path path=_occurrence.getPath(); if (path.IsEmpty()) throw Error("Empty Path => not in an instance"); - Instance* instance=path.GetTailInstance(); - Plug* plug=instance->GetPlug(net); - return Occurrence(plug,path.GetHeadPath()); + Instance* instance=path.getTailInstance(); + Plug* plug=instance->getPlug(net); + return Occurrence(plug,path.getHeadPath()); } @@ -373,9 +373,9 @@ void RoutingPad::RestorePlugOccurrence() { if (IsMaterialized()) Unmaterialize(); - _occurrence=GetPlugOccurrence(); - SetPosition ( _occurrence.GetPath().GetTransformation().getPoint - ( dynamic_cast(_occurrence.GetEntity())->GetPosition() ) ); + _occurrence=getPlugOccurrence(); + SetPosition ( _occurrence.getPath().getTransformation().getPoint + ( dynamic_cast(_occurrence.getEntity())->getPosition() ) ); } @@ -410,7 +410,7 @@ void RoutingPad::Builder::Scan(InputFile& inputFile, char*& arguments) arguments = &arguments[n]; - DBo* dbo = inputFile.GetDBo(layerId); + DBo* dbo = inputFile.getDBo(layerId); if (!dbo || !is_a(dbo)) throw Error("Can't create RoutingPad : bad layer"); @@ -420,7 +420,7 @@ void RoutingPad::Builder::Scan(InputFile& inputFile, char*& arguments) DBo* RoutingPad::Builder::CreateDBo() // ******************************* { - return RoutingPad::Create(GetNet(), GetLayer(), getX(), getY(), GetWidth(), GetHeight()); + return RoutingPad::Create(getNet(), getLayer(), getX(), getY(), getWidth(), getHeight()); } RoutingPad::Builder ROUTINGPAD_BUILDER("RP"); @@ -431,12 +431,12 @@ RoutingPad* CreateRoutingPad ( Net* net, Occurrence plugOccurrence ) // ***************************************************************** { Component* bestComponent = NULL; - Plug* plug = static_cast(plugOccurrence.GetEntity()); + Plug* plug = static_cast(plugOccurrence.getEntity()); - for_each_component ( component, GetExternalComponents(plug->GetMasterNet()) ) { + for_each_component ( component, getExternalComponents(plug->getMasterNet()) ) { if ( !bestComponent ) { bestComponent = component; continue; } - if ( /* IsOnTop(component->GetLayer(),bestComponent->GetLayer()) - ||*/ ( GetArea(component) > GetArea(bestComponent) ) ) { + if ( /* IsOnTop(component->getLayer(),bestComponent->getLayer()) + ||*/ ( getArea(component) > getArea(bestComponent) ) ) { bestComponent = component; } end_for @@ -444,8 +444,8 @@ RoutingPad* CreateRoutingPad ( Net* net, Occurrence plugOccurrence ) if ( !bestComponent ) { string message = "CreateRoutingPad(): Cannot find external component of "; - message += GetString(plug->GetMasterNet()) + " in "; - message += GetString(plug->GetInstance()) + ".\n" ; + message += getString(plug->getMasterNet()) + " in "; + message += getString(plug->getInstance()) + ".\n" ; throw Error ( message ); } @@ -461,14 +461,14 @@ RoutingPad* CreateRoutingPad ( Pin* pin ) Occurrence pinOccurrence ( pin, Path() ); # if 0 - for_each_routing_pad ( routingPad, pin->GetNet()->GetRoutingPads() ) { - if ( routingPad->GetOccurrence() == pinOccurrence ) + for_each_routing_pad ( routingPad, pin->getNet()->getRoutingPads() ) { + if ( routingPad->getOccurrence() == pinOccurrence ) return routingPad; end_for } # endif - return RoutingPad::Create ( pin->GetNet(), pinOccurrence ); + return RoutingPad::Create ( pin->getNet(), pinOccurrence ); } diff --git a/hurricane/src/hurricane/RoutingPad.h b/hurricane/src/hurricane/RoutingPad.h index 309e7a6f..d42237af 100644 --- a/hurricane/src/hurricane/RoutingPad.h +++ b/hurricane/src/hurricane/RoutingPad.h @@ -31,71 +31,68 @@ class RoutingPad : public Component { // Types // ***** - public: typedef Component Inherit; + public: typedef Component Inherit; // Attributes // ********** - private: Unit _x; - private: Unit _y; - private: Occurrence _occurrence; + private: Unit _x; + private: Unit _y; + private: Occurrence _occurrence; // Constructors // ************ - protected: RoutingPad(Net* net, const Point& p, Occurrence occurrence = Occurrence()); - public: static RoutingPad* Create(Net* net, Occurrence occurrence); + protected: RoutingPad(Net* net, const Point& p, Occurrence occurrence = Occurrence()); + public: static RoutingPad* Create(Net* net, Occurrence occurrence); // Accessors // ********* - //public: virtual Hooks GetHooks() const; - public: virtual Unit GetX() const; - public: virtual Unit GetY() const; - public: virtual Box GetBoundingBox() const; - public: virtual Layer* GetLayer() const; - public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const; - public: virtual Point GetCenter() const; - public: Occurrence GetOccurrence() const { return _occurrence; }; - public: Occurrence GetPlugOccurrence(); - public: Point GetSourcePosition() const; - public: Point GetTargetPosition() const; - public: Unit GetSourceX() const; - public: Unit GetSourceY() const; - public: Unit GetTargetX() const; - public: Unit GetTargetY() const; + //public: virtual Hooks getHooks() const; + public: virtual Unit getX() const; + public: virtual Unit getY() const; + public: virtual Box getBoundingBox() const; + public: virtual Layer* getLayer() const; + public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const; + public: virtual Point getCenter() const; + public: Occurrence getOccurrence() const { return _occurrence; }; + public: Occurrence getPlugOccurrence(); + public: Point getSourcePosition() const; + public: Point getTargetPosition() const; + public: Unit getSourceX() const; + public: Unit getSourceY() const; + public: Unit getTargetX() const; + public: Unit getTargetY() const; // Updators // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetX(const Unit& x); - public: void SetY(const Unit& y); - public: void SetPosition(const Unit& x, const Unit& y); - public: void SetPosition(const Point& position); - public: void SetOffset(const Unit& x, const Unit& y); + public: void SetX(const Unit& x); + public: void SetY(const Unit& y); + public: void SetPosition(const Unit& x, const Unit& y); + public: void SetPosition(const Point& position); + public: void SetOffset(const Unit& x, const Unit& y); public: void SetExternalComponent(Component* component); public: void RestorePlugOccurrence(); // Others // ****** - protected: virtual void _PostCreate(); - protected: virtual void _PreDelete(); + protected: virtual void _postCreate(); + protected: virtual void _preDestroy(); - public: virtual string _GetTypeName() const {return _TName("RoutingPad");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("RoutingPad");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; - public: Component* _GetEntityAsComponent () const; - public: Segment* _GetEntityAsSegment () const; -// public: 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); + public: Component* _getEntityAsComponent () const; + public: Segment* _getEntityAsSegment () const; }; diff --git a/hurricane/src/hurricane/RoutingPads.h b/hurricane/src/hurricane/RoutingPads.h index 130bd7e2..624efc34 100644 --- a/hurricane/src/hurricane/RoutingPads.h +++ b/hurricane/src/hurricane/RoutingPads.h @@ -50,9 +50,9 @@ typedef GenericFilter RoutingPadFilter; #define for_each_routing_pad(routingpad, routingpads)\ /*********************************/\ {\ - RoutingPadLocator _locator = routingpads.GetLocator();\ + RoutingPadLocator _locator = routingpads.getLocator();\ while (_locator.IsValid()) {\ - RoutingPad* routingpad = _locator.GetElement();\ + RoutingPad* routingpad = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Rubber.cpp b/hurricane/src/hurricane/Rubber.cpp index 0b185c49..2e96ff1b 100644 --- a/hurricane/src/hurricane/Rubber.cpp +++ b/hurricane/src/hurricane/Rubber.cpp @@ -37,36 +37,36 @@ Rubber::Rubber(Net* net, Hook* hook) if (!_hook) throw Error("Can't create " + _TName("Rubber") + " : null hook"); - if (_hook->GetComponent()->GetNet() != _net) + if (_hook->getComponent()->getNet() != _net) throw Error("Can't create " + _TName("Rubber") + " : invalid hook"); } -void Rubber::Delete() +void Rubber::destroy() // ****************** { throw Error("Abnormal deletion of " + _TName("Rubber")); } -Cell* Rubber::GetCell() const +Cell* Rubber::getCell() const // ************************** { - return _net->GetCell(); + return _net->getCell(); } -Point Rubber::GetCenter() const +Point Rubber::getCenter() const // **************************** { - return GetBoundingBox().getCenter(); + return getBoundingBox().getCenter(); } -Point Rubber::GetBarycenter() const +Point Rubber::getBarycenter() const // ******************************** { - int n = GetHooks().GetSize(); + int n = getHooks().getSize(); Unit x = 0; Unit y = 0; - for_each_hook(hook, GetHooks()) { - Point position = hook->GetComponent()->GetBoundingBox().getCenter(); + for_each_hook(hook, getHooks()) { + Point position = hook->getComponent()->getBoundingBox().getCenter(); x += position.getX() / n; y += position.getY() / n; end_for; @@ -74,15 +74,15 @@ Point Rubber::GetBarycenter() const return Point(x,y); } -Box Rubber::GetBoundingBox() const +Box Rubber::getBoundingBox() const // ******************************* { if (_boundingBox.isEmpty()) { Rubber* rubber = const_cast(this); Box& boundingBox = rubber->_boundingBox; - for_each_hook(hook, GetHooks()) { - Point position = hook->GetComponent()->GetBoundingBox().getCenter(); + for_each_hook(hook, getHooks()) { + Point position = hook->getComponent()->getBoundingBox().getCenter(); boundingBox.merge(position); end_for; } @@ -90,20 +90,20 @@ Box Rubber::GetBoundingBox() const return _boundingBox; } -Hooks Rubber::GetHooks() const +Hooks Rubber::getHooks() const // *************************** { - return (_hook) ? _hook->GetHooks().GetSubSet(Hook::GetIsMasterFilter()) : Hooks(); + return (_hook) ? _hook->getHooks().getSubSet(Hook::getIsMasterFilter()) : Hooks(); } void Rubber::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()); } } @@ -111,9 +111,9 @@ void Rubber::Unmaterialize() // ************************* { if (IsMaterialized()) { - Cell* cell = GetCell(); - cell->_Unfit(GetBoundingBox()); - cell->_GetQuadTree()->Remove(this); + Cell* cell = getCell(); + cell->_Unfit(getBoundingBox()); + cell->_getQuadTree()->Remove(this); } } @@ -131,78 +131,78 @@ Rubber* Rubber::_Create(Hook* hook) if (!hook->IsMaster()) throw Error("Can't create " + _TName("Rubber") + " : not a master hook"); - Net* net = hook->GetComponent()->GetNet(); + Net* net = hook->getComponent()->getNet(); if (!net) throw Error("Can't create " + _TName("Rubber") + " : unconnected component"); Rubber* rubber = new Rubber(net, hook); - rubber->_PostCreate(); + rubber->_postCreate(); return rubber; } -void Rubber::_PostCreate() +void Rubber::_postCreate() // *********************** { - _net->_GetRubberSet()._Insert(this); + _net->_getRubberSet()._Insert(this); - for_each_hook(hook, GetHooks()) { - hook->GetComponent()->_SetRubber(this); + for_each_hook(hook, getHooks()) { + hook->getComponent()->_SetRubber(this); end_for; } - Inherit::_PostCreate(); + Inherit::_postCreate(); } -void Rubber::_Delete() +void Rubber::_destroy() // ******************* { - _PreDelete(); + _preDestroy(); delete this; } -void Rubber::_PreDelete() +void Rubber::_preDestroy() // ********************** { -// trace << "entering Rubber::_PreDelete: " << this << endl; +// trace << "entering Rubber::_preDestroy: " << this << endl; // trace_in(); - Inherit::_PreDelete(); + Inherit::_preDestroy(); _count = (unsigned)-1; // to avoid a new destruction - for_each_hook(hook, GetHooks()) { - hook->GetComponent()->_SetRubber(NULL); + for_each_hook(hook, getHooks()) { + hook->getComponent()->_SetRubber(NULL); end_for; } - _net->_GetRubberSet()._Remove(this); + _net->_getRubberSet()._Remove(this); -// trace << "exiting Rubber::_PreDelete:" << endl; +// trace << "exiting Rubber::_preDestroy:" << endl; // trace_out(); } -string Rubber::_GetString() const +string Rubber::_getString() const // ****************************** { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_net->GetName())); - s.insert(s.length() - 1, " " + GetString(_count)); + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_net->getName())); + s.insert(s.length() - 1, " " + getString(_count)); return s; } -Record* Rubber::_GetRecord() const +Record* Rubber::_getRecord() const // ************************* { - Record* record = Inherit::_GetRecord(); + Record* record = Inherit::_getRecord(); if (record) { - record->Add(GetSlot("Net", _net)); - record->Add(GetSlot("Hook", _hook)); - record->Add(GetSlot("Count", _count)); - record->Add(GetSlot("BoundingBox", _boundingBox)); + record->Add(getSlot("Net", _net)); + record->Add(getSlot("Hook", _hook)); + record->Add(getSlot("Count", _count)); + record->Add(getSlot("BoundingBox", _boundingBox)); } return record; } @@ -211,9 +211,9 @@ void Rubber::_SetNet(Net* net) // *************************** { if (net != _net) { - if (_net) _net->_GetRubberSet()._Remove(this); + if (_net) _net->_getRubberSet()._Remove(this); _net = net; - if (_net) _net->_GetRubberSet()._Insert(this); + if (_net) _net->_getRubberSet()._Insert(this); } } @@ -221,7 +221,7 @@ void Rubber::_SetHook(Hook* hook) // ****************************** { assert(hook->IsMaster()); - assert(hook->GetComponent()->GetNet() == GetNet()); + assert(hook->getComponent()->getNet() == getNet()); _hook = hook; } @@ -237,7 +237,7 @@ void Rubber::_Release() { if (_count != ((unsigned)-1)) { // not in deletion Invalidate(); - if ((--_count) == 1) _Delete(); + if ((--_count) == 1) _destroy(); } } @@ -248,191 +248,12 @@ void Rubber::Invalidate(bool propagateFlag) _boundingBox.makeEmpty(); } -//bool Rubber::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const -//// ************************************************************************************** -//{ -// double x = GetValue(point.getX()); -// double y = GetValue(point.getY()); -// double a = GetValue(aperture); -// Point origin; -// -// switch (view->GetRubberDisplayType()) -// { -// case View::RubberDisplayType::GEOMETRIC: -// { -// origin = GetCenter(); -// break; -// } -// case View::RubberDisplayType::BARYCENTRIC: -// { -// origin = GetBarycenter(); -// break; -// } -// case View::RubberDisplayType::STEINER: -// { -// // XXX -// return false; -// break; -// } -// default: -// throw Error("Unknown RubberDisplayType"); -// } -// double xo = GetValue(origin.getX()); -// double yo = GetValue(origin.getY()); -// for_each_hook(hook, GetHooks()) { -// Point extremity = extremity = hook->GetComponent()->GetBoundingBox().getCenter(); -// double xe = GetValue(extremity.getX()); -// double ye = GetValue(extremity.getY()); -// double xp = xo; -// double yp = yo; -// if (xo != xe) xp = (((xe - xo) / (ye - yo)) * (y - yo)) + xo; -// if (yo != ye) yp = (((ye - yo) / (xe - xo)) * (x - xo)) + yo; -// if ((abs(xp - x) <= a) || (abs(yp - y) <= a)) return true; -// end_for; -// } -// return false; -//} -// -// -//void Rubber::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) -//// **************************************************************************************************************** -//{ -// assert(!basicLayer); -// -// Point center; -// -// switch (view->GetRubberDisplayType()) -// { -// case View::RubberDisplayType::GEOMETRIC: -// { -// center = transformation.GetPoint(GetCenter()); -// for_each_hook(hook, GetHooks()) { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// view->DrawLine(center, transformation.GetPoint(position)); -// end_for; -// } -// break; -// } -// case View::RubberDisplayType::BARYCENTRIC: -// { -// center = transformation.GetPoint(GetBarycenter()); -// for_each_hook(hook, GetHooks()) { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// view->DrawLine(center, transformation.GetPoint(position)); -// end_for; -// } -// break; -// } -// case View::RubberDisplayType::STEINER: -// { -// center = transformation.GetPoint(GetBarycenter()); -// for_each_hook(hook, GetHooks()) { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// Point crosspoint (position.getX(), center.getY()); -// view->DrawLine(position, crosspoint); -// view->DrawLine(crosspoint, center); -// end_for; -// } -// -// break; -// } -// default: -// throw Error("Unknown RubberDisplayType"); -// } -// -//} -// typedef struct pcmp_s { bool operator() (const Point& p1, const Point& p2) const { return (p1.getX() < p2.getX()) || ( (p1.getX() == p2.getX()) && (p1.getY() < p2.getY()) ); } } pcmp_t; -//void Rubber::_Highlight(View* view, const Box& updateArea, const Transformation& transformation) -//// ********************************************************************************************** -//{ -// Point center; -// -// switch (view->GetRubberDisplayType()) -// { -// case View::RubberDisplayType::GEOMETRIC: -// { -// center = transformation.GetPoint(GetCenter()); -// for_each_hook(hook, GetHooks()) { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// view->DrawLine(center, transformation.GetPoint(position)); -// end_for; -// } -// break; -// } -// case View::RubberDisplayType::BARYCENTRIC: -// { -// center = transformation.GetPoint(GetBarycenter()); -// for_each_hook(hook, GetHooks()) { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// view->DrawLine(center, transformation.GetPoint(position)); -// end_for; -// } -// break; -// } -// case View::RubberDisplayType::STEINER: -// { -// set pset; -// for_each_hook (hook, GetHooks()) -// { -// Point position = hook->GetComponent()->GetBoundingBox().getCenter(); -// pset.insert (position); -// end_for; -// } -// center = transformation.GetPoint(GetBarycenter()); -// Unit lastXup = center.getX(); -// Unit lastXlo = center.getX(); -// for ( -// set::iterator pit = pset.begin(); -// pit != pset.end(); -// pit++ -// ) -// { -// Point position (*pit); -// Point crosspoint (position.getX(), center.getY()); -// Point connxpoint (center); -// if (position.getY() > center.getY()) -// { -// // en haut -// if ( (position.getX() - lastXup) < (position.getY() - center.getY()) ) -// { -// crosspoint.SetX (lastXup); -// crosspoint.SetY (position.getY()); -// connxpoint.SetX (lastXup); -// } -// else -// lastXup = position.getX(); -// } else { -// // en bas -// if ( (position.getX() - lastXlo) < (center.getY() - position.getY()) ) -// { -// crosspoint.SetX (lastXlo); -// crosspoint.SetY (position.getY()); -// connxpoint.SetX (lastXlo); -// } -// else -// lastXlo = position.getX(); -// } -// -// -// view->DrawLine(position, crosspoint); -// view->DrawLine(crosspoint, connxpoint); -// } -// break; -// } -// default: -// throw Error("Unknown RubberDisplayType"); -// } -// -//} -// - - } // End of Hurricane namespace. // **************************************************************************************************** diff --git a/hurricane/src/hurricane/Rubber.h b/hurricane/src/hurricane/Rubber.h index 068b9f46..4747e55c 100644 --- a/hurricane/src/hurricane/Rubber.h +++ b/hurricane/src/hurricane/Rubber.h @@ -47,19 +47,19 @@ class Rubber : public Go { // Destructor // ********** - public: virtual void Delete(); + public: virtual void destroy(); // Accessors // ********* - public: virtual Cell* GetCell() const; - public: Net* GetNet() const {return _net;}; - public: Hook* GetHook() const {return _hook;}; - public: unsigned GetCount() const {return _count;}; - public: Point GetCenter() const; - public: Point GetBarycenter() const; - public: virtual Box GetBoundingBox() const; - public: Hooks GetHooks() const; + public: virtual Cell* getCell() const; + public: Net* getNet() const {return _net;}; + public: Hook* getHook() const {return _hook;}; + public: unsigned getCount() const {return _count;}; + public: Point getCenter() const; + public: Point getBarycenter() const; + public: virtual Box getBoundingBox() const; + public: Hooks getHooks() const; // Updators // ******** @@ -73,15 +73,15 @@ class Rubber : public Go { // ****** public: static Rubber* _Create(Hook* hook); - 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 _GetTypeName() const {return _TName("Rubber");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; - public: Rubber* _GetNextOfNetRubberSet() const {return _nextOfNetRubberSet;}; + public: virtual string _getTypeName() const {return _TName("Rubber");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; + public: Rubber* _getNextOfNetRubberSet() const {return _nextOfNetRubberSet;}; public: void _SetNet(Net* net); public: void _SetHook(Hook* hook); @@ -90,10 +90,6 @@ class Rubber : public Go { public: void _Capture(); public: void _Release(); - //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); - }; diff --git a/hurricane/src/hurricane/Rubbers.h b/hurricane/src/hurricane/Rubbers.h index 40d87cc8..95b7a46e 100644 --- a/hurricane/src/hurricane/Rubbers.h +++ b/hurricane/src/hurricane/Rubbers.h @@ -46,10 +46,10 @@ typedef GenericFilter RubberFilter; #define for_each_rubber(rubber, rubbers)\ /***************************************/\ {\ - RubberLocator _locator = rubbers.GetLocator();\ - while (_locator.IsValid()) {\ - Rubber* rubber = _locator.GetElement();\ - _locator.Progress(); + RubberLocator _locator = rubbers.getLocator();\ + while (_locator.IsValid()) {\ + Rubber* rubber = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Segment.cpp b/hurricane/src/hurricane/Segment.cpp index 576f894b..38a91ccb 100644 --- a/hurricane/src/hurricane/Segment.cpp +++ b/hurricane/src/hurricane/Segment.cpp @@ -39,14 +39,14 @@ class Segment_Hooks : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Hook* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Hook* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -69,13 +69,13 @@ class Segment_Hooks : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -106,14 +106,14 @@ class Segment_Anchors : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Component* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Component* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -136,13 +136,13 @@ class Segment_Anchors : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -161,33 +161,33 @@ Segment::Segment(Net* net, Component* source, Component* target, Layer* layer, c _width(width) { if (source) { - if (!source->GetNet()) + if (!source->getNet()) throw Error("Can't create " + _TName("Segment") + " : unconnected source"); - if (source->GetNet() != net) + if (source->getNet() != net) throw Error("Can't create " + _TName("Segment") + " : incompatible source"); } if (target) { - if (!target->GetNet()) + if (!target->getNet()) throw Error("Can't create " + _TName("Segment") + " : unconnected target"); - if (target->GetNet() != net) + if (target->getNet() != net) throw Error("Can't create " + _TName("Segment") + " : incompatible target"); } if (!_layer) throw Error("Can't create " + _TName("Segment") + " : null layer"); - if (source) _sourceHook.Attach(source->GetBodyHook()); - if (target) _targetHook.Attach(target->GetBodyHook()); + if (source) _sourceHook.Attach(source->getBodyHook()); + if (target) _targetHook.Attach(target->getBodyHook()); } -Hooks Segment::GetHooks() const +Hooks Segment::getHooks() const // **************************** { return Segment_Hooks(this); } -Hook* Segment::GetOppositeHook(const Hook* hook) const +Hook* Segment::getOppositeHook(const Hook* hook) const // *************************************************** { if (hook) { @@ -197,48 +197,48 @@ Hook* Segment::GetOppositeHook(const Hook* hook) const return NULL; } -Component* Segment::GetSource() const +Component* Segment::getSource() const // ********************************** { - Hook* masterHook = _sourceHook.GetMasterHook(); - return (masterHook) ? masterHook->GetComponent() : NULL; + Hook* masterHook = _sourceHook.getMasterHook(); + return (masterHook) ? masterHook->getComponent() : NULL; } -Component* Segment::GetTarget() const +Component* Segment::getTarget() const // ********************************** { - Hook* masterHook = _targetHook.GetMasterHook(); - return (masterHook) ? masterHook->GetComponent() : NULL; + Hook* masterHook = _targetHook.getMasterHook(); + return (masterHook) ? masterHook->getComponent() : NULL; } -Components Segment::GetAnchors() const +Components Segment::getAnchors() const // *********************************** { return Segment_Anchors(this); } -Component* Segment::GetOppositeAnchor(Component* anchor) const +Component* Segment::getOppositeAnchor(Component* anchor) const // *********************************************************** { if (anchor) { - Component* source = GetSource(); - Component* target = GetTarget(); + Component* source = getSource(); + Component* target = getTarget(); if (anchor == source) return target; if (anchor == target) return source; } return NULL; } -Point Segment::GetSourcePosition() const +Point Segment::getSourcePosition() const // ************************************* { - return Point(GetSourceX(), GetSourceY()); + return Point(getSourceX(), getSourceY()); } -Point Segment::GetTargetPosition() const +Point Segment::getTargetPosition() const // ************************************* { - return Point(GetTargetX(), GetTargetY()); + return Point(getTargetX(), getTargetY()); } void Segment::SetLayer(Layer* layer) @@ -265,85 +265,85 @@ void Segment::SetWidth(const Unit& width) void Segment::Invert() // ******************* { - Component* source = GetSource(); - Component* target = GetTarget(); + Component* source = getSource(); + Component* target = getTarget(); if (source && target && (target != source)) { - GetSourceHook()->Detach(); - GetTargetHook()->Detach(); - GetSourceHook()->Attach(target->GetBodyHook()); - GetTargetHook()->Attach(source->GetBodyHook()); + getSourceHook()->Detach(); + getTargetHook()->Detach(); + getSourceHook()->Attach(target->getBodyHook()); + getTargetHook()->Attach(source->getBodyHook()); } } -void Segment::_PreDelete() +void Segment::_preDestroy() // *********************** { -// trace << "entering Segment::_PreDelete: " << this << endl; +// trace << "entering Segment::_preDestroy: " << this << endl; // trace_in(); - Inherit::_PreDelete(); + Inherit::_preDestroy(); _sourceHook.Detach(); _targetHook.Detach(); -// trace << "exiting Segment::_PreDelete:" << endl; +// trace << "exiting Segment::_preDestroy:" << endl; // trace_out(); } -string Segment::_GetString() const +string Segment::_getString() const // ******************************* { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_layer->getName())); - s.insert(s.length() - 1, " [" + GetValueString(GetSourceX()) + " " + GetValueString(GetSourceY()) + "]"); - s.insert(s.length() - 1, " [" + GetValueString(GetTargetX()) + " " + GetValueString(GetTargetY()) + "]"); - s.insert(s.length() - 1, " " + GetValueString(_width)); + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_layer->getName())); + s.insert(s.length() - 1, " [" + getValueString(getSourceX()) + " " + getValueString(getSourceY()) + "]"); + s.insert(s.length() - 1, " [" + getValueString(getTargetX()) + " " + getValueString(getTargetY()) + "]"); + s.insert(s.length() - 1, " " + getValueString(_width)); return s; } -Record* Segment::_GetRecord() const +Record* Segment::_getRecord() const // ************************** { - Record* record = Inherit::_GetRecord(); + Record* record = Inherit::_getRecord(); if (record) { - record->Add(GetSlot("SourceHook", &_sourceHook)); - record->Add(GetSlot("Source", GetSource())); - record->Add(GetSlot("TargetHook", &_targetHook)); - record->Add(GetSlot("Target", GetTarget())); - record->Add(GetSlot("Layer", _layer)); - record->Add(GetSlot("Width", &_width)); + record->Add(getSlot("SourceHook", &_sourceHook)); + record->Add(getSlot("Source", getSource())); + record->Add(getSlot("TargetHook", &_targetHook)); + record->Add(getSlot("Target", getTarget())); + record->Add(getSlot("Layer", _layer)); + record->Add(getSlot("Width", &_width)); } return record; } -Unit Segment::_GetSize() const +Unit Segment::_getSize() const // *************************** { Unit size = 0; - Layer* layer = GetLayer(); + Layer* layer = getLayer(); if (is_a(layer)) size = ((CompositeLayer*)layer)->getMaximalSegmentSize(); return size; } -Unit Segment::_GetExtention() const +Unit Segment::_getExtention() const // ******************************** { Unit extention = 0; - Layer* layer = GetLayer(); + Layer* layer = getLayer(); if (is_a(layer)) extention = ((CompositeLayer*)layer)->getMaximalSegmentExtention(); return extention; } -Unit Segment::_GetSize(const BasicLayer* basicLayer) const +Unit Segment::_getSize(const BasicLayer* basicLayer) const // ************************************************* { - Layer* layer = GetLayer(); + Layer* layer = getLayer(); if (!layer->contains(basicLayer)) return 0; @@ -355,10 +355,10 @@ Unit Segment::_GetSize(const BasicLayer* basicLayer) const return size; } -Unit Segment::_GetExtention(const BasicLayer* basicLayer) const +Unit Segment::_getExtention(const BasicLayer* basicLayer) const // ****************************************************** { - Layer* layer = GetLayer(); + Layer* layer = getLayer(); if (!layer->contains(basicLayer)) return 0; @@ -387,16 +387,16 @@ Segment::SourceHook::SourceHook(Segment* segment) SOURCE_HOOK_OFFSET = (unsigned long)this - (unsigned long)segment; } -Component* Segment::SourceHook::GetComponent() const +Component* Segment::SourceHook::getComponent() const // ************************************************* { return (Component*)((unsigned long)this - SOURCE_HOOK_OFFSET); } -string Segment::SourceHook::_GetString() const +string Segment::SourceHook::_getString() const // ******************************************* { - return "<" + _TName("Segment::SourceHook") + " " + GetString(GetComponent()) + ">"; + return "<" + _TName("Segment::SourceHook") + " " + getString(getComponent()) + ">"; } @@ -418,16 +418,16 @@ Segment::TargetHook::TargetHook(Segment* segment) TARGET_HOOK_OFFSET = (unsigned long)this - (unsigned long)segment; } -Component* Segment::TargetHook::GetComponent() const +Component* Segment::TargetHook::getComponent() const // ************************************************* { return (Component*)((unsigned long)this - TARGET_HOOK_OFFSET); } -string Segment::TargetHook::_GetString() const +string Segment::TargetHook::_getString() const // ******************************************* { - return "<" + _TName("Segment::TargetHook") + " " + GetString(GetComponent()) + ">"; + return "<" + _TName("Segment::TargetHook") + " " + getString(getComponent()) + ">"; } // **************************************************************************************************** @@ -455,23 +455,23 @@ Segment_Hooks& Segment_Hooks::operator=(const Segment_Hooks& hooks) return *this; } -Collection* Segment_Hooks::GetClone() const +Collection* Segment_Hooks::getClone() const // *********************************************** { return new Segment_Hooks(*this); } -Locator* Segment_Hooks::GetLocator() const +Locator* Segment_Hooks::getLocator() const // ********************************************** { return new Locator(_segment); } -string Segment_Hooks::_GetString() const +string Segment_Hooks::_getString() const // ************************************* { string s = "<" + _TName("Segment::Hooks"); - if (_segment) s += " " + GetString(_segment); + if (_segment) s += " " + getString(_segment); s += ">"; return s; } @@ -488,7 +488,7 @@ Segment_Hooks::Locator::Locator(const Segment* segment) _segment(segment), _hook(NULL) { - if (_segment) _hook = ((Segment*)_segment)->GetBodyHook(); + if (_segment) _hook = ((Segment*)_segment)->getBodyHook(); } Segment_Hooks::Locator::Locator(const Locator& locator) @@ -507,13 +507,13 @@ Segment_Hooks::Locator& Segment_Hooks::Locator::operator=(const Locator& locator return *this; } -Hook* Segment_Hooks::Locator::GetElement() const +Hook* Segment_Hooks::Locator::getElement() const // ********************************************* { return _hook; } -Locator* Segment_Hooks::Locator::GetClone() const +Locator* Segment_Hooks::Locator::getClone() const // ***************************************************** { return new Locator(*this); @@ -529,22 +529,22 @@ void Segment_Hooks::Locator::Progress() // ************************************ { if (_hook) { - if (_hook == ((Segment*)_segment)->GetBodyHook()) - _hook = ((Segment*)_segment)->GetSourceHook(); + if (_hook == ((Segment*)_segment)->getBodyHook()) + _hook = ((Segment*)_segment)->getSourceHook(); else { - if (_hook == ((Segment*)_segment)->GetSourceHook()) - _hook = ((Segment*)_segment)->GetTargetHook(); + if (_hook == ((Segment*)_segment)->getSourceHook()) + _hook = ((Segment*)_segment)->getTargetHook(); else _hook = NULL; } } } -string Segment_Hooks::Locator::_GetString() const +string Segment_Hooks::Locator::_getString() const // ********************************************** { string s = "<" + _TName("Segment::Hooks::Locator"); - if (_segment) s += " " + GetString(_segment); + if (_segment) s += " " + getString(_segment); s += ">"; return s; } @@ -576,23 +576,23 @@ Segment_Anchors& Segment_Anchors::operator=(const Segment_Anchors& hooks) return *this; } -Collection* Segment_Anchors::GetClone() const +Collection* Segment_Anchors::getClone() const // ****************************************************** { return new Segment_Anchors(*this); } -Locator* Segment_Anchors::GetLocator() const +Locator* Segment_Anchors::getLocator() const // ***************************************************** { return new Locator(_segment); } -string Segment_Anchors::_GetString() const +string Segment_Anchors::_getString() const // *************************************** { string s = "<" + _TName("Segment::Anchors"); - if (_segment) s += " " + GetString(_segment); + if (_segment) s += " " + getString(_segment); s += ">"; return s; } @@ -610,8 +610,8 @@ Segment_Anchors::Locator::Locator(const Segment* segment) _anchor(NULL) { if (_segment) { - _anchor = ((Segment*)_segment)->GetSource(); - if (!_anchor) _anchor = ((Segment*)_segment)->GetTarget(); + _anchor = ((Segment*)_segment)->getSource(); + if (!_anchor) _anchor = ((Segment*)_segment)->getTarget(); } } @@ -631,13 +631,13 @@ Segment_Anchors::Locator& Segment_Anchors::Locator::operator=(const Locator& loc return *this; } -Component* Segment_Anchors::Locator::GetElement() const +Component* Segment_Anchors::Locator::getElement() const // **************************************************** { return _anchor; } -Locator* Segment_Anchors::Locator::GetClone() const +Locator* Segment_Anchors::Locator::getClone() const // ************************************************************ { return new Locator(*this); @@ -653,18 +653,18 @@ void Segment_Anchors::Locator::Progress() // ************************************** { if (_anchor) { - if (_anchor == ((Segment*)_segment)->GetTarget()) + if (_anchor == ((Segment*)_segment)->getTarget()) _anchor = NULL; else - _anchor = ((Segment*)_segment)->GetTarget(); + _anchor = ((Segment*)_segment)->getTarget(); } } -string Segment_Anchors::Locator::_GetString() const +string Segment_Anchors::Locator::_getString() const // ************************************************ { string s = "<" + _TName("Segment::Anchors::Locator"); - if (_segment) s += " " + GetString(_segment); + if (_segment) s += " " + getString(_segment); s += ">"; return s; } diff --git a/hurricane/src/hurricane/Segment.h b/hurricane/src/hurricane/Segment.h index 14ff5402..7d065a09 100644 --- a/hurricane/src/hurricane/Segment.h +++ b/hurricane/src/hurricane/Segment.h @@ -24,101 +24,98 @@ class Segment : public Component { // Types // ***** - public: typedef Component Inherit; + public: typedef Component Inherit; - public: class SourceHook : public Hook { - // *********************************** + public: class SourceHook : public Hook { + // *********************************** - friend class Segment; + friend class Segment; - public: typedef Hook Inherit; + public: typedef Hook Inherit; - private: SourceHook(Segment* segment); + private: SourceHook(Segment* segment); - public: virtual Component* GetComponent() const; + public: virtual Component* getComponent() const; - public: virtual bool IsMaster() const {return false;}; + public: virtual bool IsMaster() const {return false;}; - public: virtual string _GetTypeName() const { return _TName("Segment::SourceHook"); }; - public: virtual string _GetString() const; - }; + public: virtual string _getTypeName() const { return _TName("Segment::SourceHook"); }; + public: virtual string _getString() const; + }; - public: class TargetHook : public Hook { - // *********************************** + public: class TargetHook : public Hook { + // *********************************** - friend class Segment; + friend class Segment; - public: typedef Hook Inherit; + public: typedef Hook Inherit; - private: TargetHook(Segment* segment); + private: TargetHook(Segment* segment); - public: virtual Component* GetComponent() const; + public: virtual Component* getComponent() const; - public: virtual bool IsMaster() const {return false;}; + public: virtual bool IsMaster() const {return false;}; - public: virtual string _GetTypeName() const { return _TName("Segment::TargetHook"); }; - public: virtual string _GetString() const; - }; + public: virtual string _getTypeName() const { return _TName("Segment::TargetHook"); }; + public: virtual string _getString() const; + }; // Attributes // ********** - private: SourceHook _sourceHook; - private: TargetHook _targetHook; - private: Layer* _layer; - private: Unit _width; + private: SourceHook _sourceHook; + private: TargetHook _targetHook; + private: Layer* _layer; + private: Unit _width; // Constructors // ************ - protected: Segment(Net* net, Component* source, Component* target, Layer* layer, const Unit& width = 0); + protected: Segment(Net* net, Component* source, Component* target, Layer* layer, const Unit& width = 0); // Accessors // ********* - public: virtual Hooks GetHooks() const; - public: virtual Unit GetX() const {return 0;}; - public: virtual Unit GetY() const {return 0;}; - public: virtual Layer* GetLayer() const {return _layer;}; - public: Hook* GetSourceHook() {return &_sourceHook;}; - public: Hook* GetTargetHook() {return &_targetHook;}; - public: Hook* GetOppositeHook(const Hook* hook) const; - public: Component* GetSource() const; - public: Component* GetTarget() const; - public: Components GetAnchors() const; - public: Component* GetOppositeAnchor(Component* anchor) const; - public: const Unit& GetWidth() const {return _width;}; - public: Unit GetHalfWidth() const {return (_width / 2);}; - public: virtual Unit GetSourceX() const = 0; - public: virtual Unit GetSourceY() const = 0; - public: virtual Point GetSourcePosition() const; - public: virtual Unit GetTargetX() const = 0; - public: virtual Unit GetTargetY() const = 0; - public: virtual Point GetTargetPosition() const; - public: virtual Unit GetLength() const = 0; + public: virtual Hooks getHooks() const; + public: virtual Unit getX() const {return 0;}; + public: virtual Unit getY() const {return 0;}; + public: virtual Layer* getLayer() const {return _layer;}; + public: Hook* getSourceHook() {return &_sourceHook;}; + public: Hook* getTargetHook() {return &_targetHook;}; + public: Hook* getOppositeHook(const Hook* hook) const; + public: Component* getSource() const; + public: Component* getTarget() const; + public: Components getAnchors() const; + public: Component* getOppositeAnchor(Component* anchor) const; + public: const Unit& getWidth() const {return _width;}; + public: Unit getHalfWidth() const {return (_width / 2);}; + public: virtual Unit getSourceX() const = 0; + public: virtual Unit getSourceY() const = 0; + public: virtual Point getSourcePosition() const; + public: virtual Unit getTargetX() const = 0; + public: virtual Unit getTargetY() const = 0; + public: virtual Point getTargetPosition() const; + public: virtual Unit getLength() const = 0; // Updators // ******** - public: void SetLayer(Layer* layer); - public: void SetWidth(const Unit& width); - public: void Invert(); + public: void SetLayer(Layer* layer); + public: void SetWidth(const Unit& width); + public: void Invert(); // Others // ****** - 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: Unit _GetSize() const; - public: Unit _GetExtention() const; - public: Unit _GetSize(const BasicLayer* basicLayer) const; - public: Unit _GetExtention(const BasicLayer* basicLayer) 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: Unit _getSize() const; + public: Unit _getExtention() const; + public: Unit _getSize(const BasicLayer* basicLayer) const; + public: Unit _getExtention(const BasicLayer* basicLayer) const; }; diff --git a/hurricane/src/hurricane/Segments.h b/hurricane/src/hurricane/Segments.h index c68a3cca..a20620ec 100644 --- a/hurricane/src/hurricane/Segments.h +++ b/hurricane/src/hurricane/Segments.h @@ -46,9 +46,9 @@ typedef GenericFilter SegmentFilter; #define for_each_segment(segment, segments)\ /******************************************/\ {\ - SegmentLocator _locator = segments.GetLocator();\ + SegmentLocator _locator = segments.getLocator();\ while (_locator.IsValid()) {\ - Segment* segment = _locator.GetElement();\ + Segment* segment = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Selectors.h b/hurricane/src/hurricane/Selectors.h index a20ccfbc..fbedf55c 100644 --- a/hurricane/src/hurricane/Selectors.h +++ b/hurricane/src/hurricane/Selectors.h @@ -46,9 +46,9 @@ typedef GenericFilter SelectorFilter; #define for_each_selector(selector, selectors)\ /*********************************************/\ {\ - SelectorLocator _locator = selectors.GetLocator();\ + SelectorLocator _locator = selectors.getLocator();\ while (_locator.IsValid()) {\ - Selector* selector = _locator.GetElement();\ + Selector* selector = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/SetCollection.h b/hurricane/src/hurricane/SetCollection.h index 4ce185de..c5eb63b5 100644 --- a/hurricane/src/hurricane/SetCollection.h +++ b/hurricane/src/hurricane/SetCollection.h @@ -23,155 +23,155 @@ namespace Hurricane { // **************************************************************************************************** template > - class SetCollection : public Collection { + class SetCollection : public Collection { // ************************************************ // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: typedef set ElementSet; + public: typedef set ElementSet; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const ElementSet* _elementSet; - private: typename ElementSet::const_iterator _iterator; // AD + private: const ElementSet* _elementSet; + private: typename ElementSet::const_iterator _iterator; // AD - public: Locator(const ElementSet* elementSet) - // ****************************************** - : Inherit(), - _elementSet(elementSet), - _iterator() - { - if (_elementSet) _iterator = _elementSet->begin(); - }; + public: Locator(const ElementSet* elementSet) + // ****************************************** + : Inherit(), + _elementSet(elementSet), + _iterator() + { + if (_elementSet) _iterator = _elementSet->begin(); + }; - public: virtual Element GetElement() const - // *************************************** - { - return (IsValid()) ? *_iterator : Element(); - }; + public: virtual Element getElement() const + // *************************************** + { + return (IsValid()) ? *_iterator : Element(); + }; - public: virtual Hurricane::Locator* GetClone() const - // ********************************************************** - { - return new Locator(_elementSet); - }; + public: virtual Hurricane::Locator* getClone() const + // ********************************************************** + { + return new Locator(_elementSet); + }; - public: virtual bool IsValid() const - // ********************************* - { - return (_elementSet && (_iterator != _elementSet->end())); - }; + public: virtual bool IsValid() const + // ********************************* + { + return (_elementSet && (_iterator != _elementSet->end())); + }; - public: virtual void Progress() - // **************************** - { - ++_iterator; - }; + public: virtual void Progress() + // **************************** + { + ++_iterator; + }; - }; + }; // Attributes // ********** - private: const ElementSet* _elementSet; + private: const ElementSet* _elementSet; // Constructors // ************ - public: SetCollection(const ElementSet* elementSet = NULL) - // ******************************************************* - : Inherit(), - _elementSet(elementSet) - { - }; + public: SetCollection(const ElementSet* elementSet = NULL) + // ******************************************************* + : Inherit(), + _elementSet(elementSet) + { + }; - public: SetCollection(const ElementSet& elementSet) - // ************************************************ - : Inherit(), - _elementSet(&elementSet) - { - }; + public: SetCollection(const ElementSet& elementSet) + // ************************************************ + : Inherit(), + _elementSet(&elementSet) + { + }; - public: SetCollection(const SetCollection& setCollection) - // ****************************************************** - : Inherit(), - _elementSet(setCollection._elementSet) - { - }; + public: SetCollection(const SetCollection& setCollection) + // ****************************************************** + : Inherit(), + _elementSet(setCollection._elementSet) + { + }; // Operators // ********* - public: SetCollection& operator=(const SetCollection& setCollection) - // ***************************************************************** - { - _elementSet = setCollection._elementSet; - return *this; - }; + public: SetCollection& operator=(const SetCollection& setCollection) + // ***************************************************************** + { + _elementSet = setCollection._elementSet; + return *this; + }; // Accessors // ********* - public: virtual Collection* GetClone() const - // ************************************************** - { - return new SetCollection(*this); - } + public: virtual Collection* getClone() const + // ************************************************** + { + return new SetCollection(*this); + } - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************ - { - // return (_elementSet) ? new Locator(_elementSet) : NULL; - // V3 - return (_elementSet) ? new Locator(_elementSet) : NULL; - } + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************ + { + // return (_elementSet) ? new Locator(_elementSet) : NULL; + // V3 + return (_elementSet) ? new Locator(_elementSet) : NULL; + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_elementSet) ? _elementSet->size() : 0; - }; + public: virtual unsigned getSize() const + // ************************************* + { + return (_elementSet) ? _elementSet->size() : 0; + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("SetCollection"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!_elementSet) - return "<" + _GetTypeName() + " unbound>"; - else { - if (_elementSet->empty()) - return "<" + _GetTypeName() + " empty>"; - else - return "<" + _GetTypeName() + " " + GetString(_elementSet->size()) + ">"; - } - }; + public: virtual string _getString() const + // ************************************** + { + if (!_elementSet) + return "<" + _getTypeName() + " unbound>"; + else { + if (_elementSet->empty()) + return "<" + _getTypeName() + " empty>"; + else + return "<" + _getTypeName() + " " + getString(_elementSet->size()) + ">"; + } + }; - Record* _GetRecord() const + Record* _getRecord() const // ***************** { Record* record = NULL; if (!_elementSet->empty()) { - record = new Record(_GetString()); - unsigned n = 1; - typename set::const_iterator iterator = _elementSet->begin(); // AD - while (iterator != _elementSet->end()) { - record->Add(GetSlot(GetString(n++), *iterator)); + record = new Record(_getString()); + unsigned n = 1; + typename set::const_iterator iterator = _elementSet->begin(); // AD + while (iterator != _elementSet->end()) { + record->Add(getSlot(getString(n++), *iterator)); ++iterator; - } + } } return record; } @@ -185,17 +185,17 @@ template > // **************************************************************************************************** template - inline GenericCollection GetCollection(const set& elementSet) + inline GenericCollection getCollection(const set& elementSet) // **************************************************************************************** { - return SetCollection(elementSet); + return SetCollection(elementSet); } template - inline GenericCollection GetCollection(const set* elementSet) + inline GenericCollection getCollection(const set* elementSet) // **************************************************************************************** { - return SetCollection(elementSet); + return SetCollection(elementSet); } diff --git a/hurricane/src/hurricane/SharedName.cpp b/hurricane/src/hurricane/SharedName.cpp index 0b5d7d97..ca8d1ca7 100644 --- a/hurricane/src/hurricane/SharedName.cpp +++ b/hurricane/src/hurricane/SharedName.cpp @@ -18,44 +18,44 @@ SharedName::SharedNameMap* SharedName::_SHARED_NAME_MAP = NULL; SharedName::SharedName(const string& s) // ************************************ -: _count(0), - _string(s) +: _count(0), + _string(s) { - if (!_SHARED_NAME_MAP) _SHARED_NAME_MAP = new SharedNameMap(); - (*_SHARED_NAME_MAP)[&_string] = this; + if (!_SHARED_NAME_MAP) _SHARED_NAME_MAP = new SharedNameMap(); + (*_SHARED_NAME_MAP)[&_string] = this; } SharedName::~SharedName() // ********************** { - _SHARED_NAME_MAP->erase(&_string); + _SHARED_NAME_MAP->erase(&_string); } void SharedName::Capture() // *********************** { - _count++; + _count++; } void SharedName::Release() // *********************** { - if (!--_count) delete this; + if (!--_count) delete this; } -string SharedName::_GetString() const +string SharedName::_getString() const // ********************************** { - return "<" + _TName("SharedName") + " " + GetString(_count) + " " + _string + ">"; + return "<" + _TName("SharedName") + " " + getString(_count) + " " + _string + ">"; } -Record* SharedName::_GetRecord() const +Record* SharedName::_getRecord() const // ***************************** { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("Count", &_count)); - record->Add(GetSlot("String", &_string)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("Count", &_count)); + record->Add(getSlot("String", &_string)); + return record; } @@ -67,7 +67,7 @@ Record* SharedName::_GetRecord() const bool SharedName::SharedNameMapComparator::operator()(string* s1, string* s2) const // ******************************************************************************* { - return (*s1) < (*s2); + return (*s1) < (*s2); } diff --git a/hurricane/src/hurricane/SharedName.h b/hurricane/src/hurricane/SharedName.h index 7d003c40..e513765a 100644 --- a/hurricane/src/hurricane/SharedName.h +++ b/hurricane/src/hurricane/SharedName.h @@ -23,60 +23,60 @@ class SharedName { // Friends // ******* - friend class Name; + friend class Name; // Types // ***** - private: struct SharedNameMapComparator { - // ************************************ + private: struct SharedNameMapComparator { + // ************************************ - bool operator()(string* s1, string* s2) const; + bool operator()(string* s1, string* s2) const; - }; + }; - private: typedef map SharedNameMap; + private: typedef map SharedNameMap; // Attributes // ********** - private: static SharedNameMap* _SHARED_NAME_MAP; + private: static SharedNameMap* _SHARED_NAME_MAP; - private: int _count; - private: string _string; + private: int _count; + private: string _string; // Constructors // ************ - private: SharedName(const string& s); + private: SharedName(const string& s); - private: SharedName(const SharedName& sharedName); - // not implemented to forbid copy construction + private: SharedName(const SharedName& sharedName); + // not implemented to forbid copy construction // Destructor // ********** - private: ~SharedName(); + private: ~SharedName(); // Operators // ********* - private: SharedName& operator=(const SharedName& sharedName); - // not implemented to forbid assignment + private: SharedName& operator=(const SharedName& sharedName); + // not implemented to forbid assignment // Updators // ******** - private: void Capture(); - private: void Release(); + private: void Capture(); + private: void Release(); // Others // ****** - public: const string &_GetSString () const { return _string; }; - public: string _GetTypeName() const { return _TName("SharedName"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: const string &_getSString () const { return _string; }; + public: string _getTypeName() const { return _TName("SharedName"); }; + public: string _getString() const; + public: Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/SharedPath.cpp b/hurricane/src/hurricane/SharedPath.cpp index 96d90a80..224cc1e3 100644 --- a/hurricane/src/hurricane/SharedPath.cpp +++ b/hurricane/src/hurricane/SharedPath.cpp @@ -37,14 +37,14 @@ class SharedPath_Instances : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual Instance* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual Instance* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; // Attributes @@ -66,13 +66,13 @@ class SharedPath_Instances : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -94,99 +94,99 @@ SharedPath::SharedPath(Instance* headInstance, SharedPath* tailSharedPath) if (!_headInstance) throw Error("Can't create " + _TName("SharedPath") + " : null head instance"); - if (_headInstance->_GetSharedPath(_tailSharedPath)) + if (_headInstance->_getSharedPath(_tailSharedPath)) throw Error("Can't create " + _TName("SharedPath") + " : already exists"); - if (_tailSharedPath && (_tailSharedPath->GetOwnerCell() != _headInstance->GetMasterCell())) + if (_tailSharedPath && (_tailSharedPath->getOwnerCell() != _headInstance->getMasterCell())) throw Error("Can't create " + _TName("SharedPath") + " : incompatible tail path"); - _headInstance->_GetSharedPathMap()._Insert(this); + _headInstance->_getSharedPathMap()._Insert(this); } SharedPath::~SharedPath() // ********************** { - for_each_quark(quark, _GetQuarks()) quark->Delete(); end_for; + for_each_quark(quark, _getQuarks()) quark->destroy(); end_for; - Cell* cell = _headInstance->GetCell(); - for_each_instance(instance, cell->GetSlaveInstances()) { - SharedPath* sharedPath = instance->_GetSharedPath(this); + Cell* cell = _headInstance->getCell(); + for_each_instance(instance, cell->getSlaveInstances()) { + SharedPath* sharedPath = instance->_getSharedPath(this); if (sharedPath) delete sharedPath; end_for; } - _headInstance->_GetSharedPathMap()._Remove(this); + _headInstance->_getSharedPathMap()._Remove(this); } -SharedPath* SharedPath::GetHeadSharedPath() const +SharedPath* SharedPath::getHeadSharedPath() const // ********************************************** { if (!_tailSharedPath) return NULL; - SharedPath* tailSharedPath = _tailSharedPath->GetHeadSharedPath(); + SharedPath* tailSharedPath = _tailSharedPath->getHeadSharedPath(); - SharedPath* headSharedPath = _headInstance->_GetSharedPath(tailSharedPath); + SharedPath* headSharedPath = _headInstance->_getSharedPath(tailSharedPath); if (!headSharedPath) headSharedPath = new SharedPath(_headInstance, tailSharedPath); return headSharedPath; } -Instance* SharedPath::GetTailInstance() const +Instance* SharedPath::getTailInstance() const // ****************************************** { - return (_tailSharedPath) ? _tailSharedPath->GetTailInstance() : _headInstance; + return (_tailSharedPath) ? _tailSharedPath->getTailInstance() : _headInstance; } -char SharedPath::GetNameSeparator() +char SharedPath::getNameSeparator() // ******************************** { return NAME_SEPARATOR; } -string SharedPath::GetName() const +string SharedPath::getName() const // ******************************* { string name = ""; string nameSeparator = ""; SharedPath* sharedPath = (SharedPath*)this; while (sharedPath) { - name += nameSeparator + GetString(sharedPath->GetHeadInstance()->GetName()); - nameSeparator = GetString(GetNameSeparator()); - sharedPath = sharedPath->GetTailSharedPath(); + name += nameSeparator + getString(sharedPath->getHeadInstance()->getName()); + nameSeparator = getString(getNameSeparator()); + sharedPath = sharedPath->getTailSharedPath(); } return name; } -Cell* SharedPath::GetOwnerCell() const +Cell* SharedPath::getOwnerCell() const // *********************************** { - return _headInstance->GetCell(); + return _headInstance->getCell(); } -Cell* SharedPath::GetMasterCell() const +Cell* SharedPath::getMasterCell() const // ************************************ { Cell* masterCell = NULL; SharedPath* sharedPath = (SharedPath*)this; while (sharedPath) { - masterCell = sharedPath->GetHeadInstance()->GetMasterCell(); - sharedPath = sharedPath->GetTailSharedPath(); + masterCell = sharedPath->getHeadInstance()->getMasterCell(); + sharedPath = sharedPath->getTailSharedPath(); } return masterCell; } -Instances SharedPath::GetInstances() const +Instances SharedPath::getInstances() const // *************************************** { return SharedPath_Instances(this); } -Transformation SharedPath::GetTransformation(const Transformation& transformation) const +Transformation SharedPath::getTransformation(const Transformation& transformation) const // ************************************************************************************* { - Transformation headTransformation = _headInstance->GetTransformation(); + Transformation headTransformation = _headInstance->getTransformation(); Transformation tailTransformation = - (!_tailSharedPath) ? transformation : _tailSharedPath->GetTransformation(transformation); + (!_tailSharedPath) ? transformation : _tailSharedPath->getTransformation(transformation); return headTransformation.getTransformation(tailTransformation); } @@ -196,24 +196,24 @@ void SharedPath::SetNameSeparator(char nameSeparator) NAME_SEPARATOR = nameSeparator; } -string SharedPath::_GetString() const +string SharedPath::_getString() const // ********************************** { string s = "<" + _TName("SharedPath"); - string name = GetName(); + string name = getName(); if (!name.empty()) s += " " + name; s += ">"; return s; } -Record* SharedPath::_GetRecord() const +Record* SharedPath::_getRecord() const // ***************************** { - Record* record = new Record(GetString(this)); + Record* record = new Record(getString(this)); if (record) { - record->Add(GetSlot("HeadInstance", _headInstance)); - record->Add(GetSlot("TailSharedPath", _tailSharedPath)); - record->Add(GetSlot("Quarks", &_quarkMap)); + record->Add(getSlot("HeadInstance", _headInstance)); + record->Add(getSlot("TailSharedPath", _tailSharedPath)); + record->Add(getSlot("Quarks", &_quarkMap)); } return record; } @@ -230,22 +230,22 @@ SharedPath::QuarkMap::QuarkMap() { } -const Entity* SharedPath::QuarkMap::_GetKey(Quark* quark) const +const Entity* SharedPath::QuarkMap::_getKey(Quark* quark) const // ************************************************************ { - return quark->GetOccurrence().GetEntity(); + return quark->getOccurrence().getEntity(); } -unsigned SharedPath::QuarkMap::_GetHashValue(const Entity* entity) const +unsigned SharedPath::QuarkMap::_getHashValue(const Entity* entity) const // ********************************************************************* { return ( (unsigned int)( (unsigned long)entity ) ) / 8; } -Quark* SharedPath::QuarkMap::_GetNextElement(Quark* quark) const +Quark* SharedPath::QuarkMap::_getNextElement(Quark* quark) const // ************************************************************* { - return quark->_GetNextOfSharedPathQuarkMap(); + return quark->_getNextOfSharedPathQuarkMap(); } void SharedPath::QuarkMap::_SetNextElement(Quark* quark, Quark* nextQuark) const @@ -281,23 +281,23 @@ SharedPath_Instances& SharedPath_Instances::operator=(const SharedPath_Instances return *this; } -Collection* SharedPath_Instances::GetClone() const +Collection* SharedPath_Instances::getClone() const // ********************************************************** { return new SharedPath_Instances(*this); } -Locator* SharedPath_Instances::GetLocator() const +Locator* SharedPath_Instances::getLocator() const // ********************************************************* { return new Locator(_sharedPath); } -string SharedPath_Instances::_GetString() const +string SharedPath_Instances::_getString() const // ******************************************** { string s = "<" + _TName("SharedPath::Instances"); - if (_sharedPath) s += " " + GetString(_sharedPath); + if (_sharedPath) s += " " + getString(_sharedPath); s += ">"; return s; } @@ -329,13 +329,13 @@ SharedPath_Instances::Locator& SharedPath_Instances::Locator::operator=(const Lo return *this; } -Instance* SharedPath_Instances::Locator::GetElement() const +Instance* SharedPath_Instances::Locator::getElement() const // ******************************************************** { - return (_sharedPath) ? _sharedPath->GetHeadInstance() : NULL; + return (_sharedPath) ? _sharedPath->getHeadInstance() : NULL; } -Locator* SharedPath_Instances::Locator::GetClone() const +Locator* SharedPath_Instances::Locator::getClone() const // **************************************************************** { return new Locator(*this); @@ -350,14 +350,14 @@ bool SharedPath_Instances::Locator::IsValid() const void SharedPath_Instances::Locator::Progress() // ******************************************* { - if (_sharedPath) _sharedPath = _sharedPath->GetTailSharedPath(); + if (_sharedPath) _sharedPath = _sharedPath->getTailSharedPath(); } -string SharedPath_Instances::Locator::_GetString() const +string SharedPath_Instances::Locator::_getString() const // ***************************************************** { string s = "<" + _TName("SharedPath::Instances::Locator"); - if (_sharedPath) s += " " + GetString(_sharedPath); + if (_sharedPath) s += " " + getString(_sharedPath); s += ">"; return s; } diff --git a/hurricane/src/hurricane/SharedPath.h b/hurricane/src/hurricane/SharedPath.h index 47f06dd5..482cd38e 100644 --- a/hurricane/src/hurricane/SharedPath.h +++ b/hurricane/src/hurricane/SharedPath.h @@ -30,80 +30,80 @@ class SharedPath { // Types // ***** - public: class QuarkMap : public IntrusiveMap { - // *************************************************************** + public: class QuarkMap : public IntrusiveMap { + // *************************************************************** - public: typedef IntrusiveMap Inherit; - - public: QuarkMap(); + public: typedef IntrusiveMap Inherit; + + public: QuarkMap(); - public: virtual const Entity* _GetKey(Quark* quark) const; - public: virtual unsigned _GetHashValue(const Entity* entity) const; - public: virtual Quark* _GetNextElement(Quark* quark) const; - public: virtual void _SetNextElement(Quark* quark, Quark* nextQuark) const; + public: virtual const Entity* _getKey(Quark* quark) const; + public: virtual unsigned _getHashValue(const Entity* entity) const; + public: virtual Quark* _getNextElement(Quark* quark) const; + public: virtual void _SetNextElement(Quark* quark, Quark* nextQuark) const; - }; + }; // Attributes // ********** - private: Instance* _headInstance; - private: SharedPath* _tailSharedPath; - private: QuarkMap _quarkMap; - private: SharedPath* _nextOfInstanceSharedPathMap; + private: Instance* _headInstance; + private: SharedPath* _tailSharedPath; + private: QuarkMap _quarkMap; + private: SharedPath* _nextOfInstanceSharedPathMap; // Constructors // ************ - public: SharedPath(Instance* headInstance, SharedPath* tailSharedPath = NULL); + public: SharedPath(Instance* headInstance, SharedPath* tailSharedPath = NULL); - private: SharedPath(const SharedPath& sharedPath); - // not implemented to forbid copy construction + private: SharedPath(const SharedPath& sharedPath); + // not implemented to forbid copy construction // Destructor // ********** - public: ~SharedPath(); + public: ~SharedPath(); // Operators // ********* - private: SharedPath& operator=(const SharedPath& sharedPath); - // not implemented to forbid assignment + private: SharedPath& operator=(const SharedPath& sharedPath); + // not implemented to forbid assignment // Accessors // ********* - public: static char GetNameSeparator(); + public: static char getNameSeparator(); - public: Instance* GetHeadInstance() const {return _headInstance;}; - public: SharedPath* GetTailSharedPath() const {return _tailSharedPath;}; - public: SharedPath* GetHeadSharedPath() 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 {return _headInstance;}; + public: SharedPath* getTailSharedPath() const {return _tailSharedPath;}; + public: SharedPath* getHeadSharedPath() 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; // Updators // ******** - public: static void SetNameSeparator(char nameSeparator); + public: static void SetNameSeparator(char nameSeparator); // Accessors // ********* - public: string _GetTypeName() const { return _TName("SharedPath"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("SharedPath"); }; + public: string _getString() const; + public: Record* _getRecord() const; - public: Quark* _GetQuark(const Entity* entity) const {return _quarkMap.GetElement(entity);}; - public: Quarks _GetQuarks() const {return _quarkMap.GetElements();}; - public: QuarkMap& _GetQuarkMap() {return _quarkMap;}; - public: SharedPath* _GetNextOfInstanceSharedPathMap() const {return _nextOfInstanceSharedPathMap;}; + public: Quark* _getQuark(const Entity* entity) const {return _quarkMap.getElement(entity);}; + public: Quarks _getQuarks() const {return _quarkMap.getElements();}; + public: QuarkMap& _getQuarkMap() {return _quarkMap;}; + public: SharedPath* _getNextOfInstanceSharedPathMap() const {return _nextOfInstanceSharedPathMap;}; - public: void _SetNextOfInstanceSharedPathMap(SharedPath* sharedPath) {_nextOfInstanceSharedPathMap = sharedPath;}; + public: void _SetNextOfInstanceSharedPathMap(SharedPath* sharedPath) {_nextOfInstanceSharedPathMap = sharedPath;}; }; diff --git a/hurricane/src/hurricane/SharedPathes.h b/hurricane/src/hurricane/SharedPathes.h index 9cbb78ff..44a9ad31 100644 --- a/hurricane/src/hurricane/SharedPathes.h +++ b/hurricane/src/hurricane/SharedPathes.h @@ -46,9 +46,9 @@ typedef GenericFilter SharedPathFilter; #define for_each_shared_path(sharedPath, sharedPathes)\ /*****************************************************/\ {\ - SharedPathLocator _locator = sharedPathes.GetLocator();\ + SharedPathLocator _locator = sharedPathes.getLocator();\ while (_locator.IsValid()) {\ - SharedPath* sharedPath = _locator.GetElement();\ + SharedPath* sharedPath = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Slice.cpp b/hurricane/src/hurricane/Slice.cpp index c0a53c95..d8d9745d 100644 --- a/hurricane/src/hurricane/Slice.cpp +++ b/hurricane/src/hurricane/Slice.cpp @@ -32,47 +32,47 @@ Slice::Slice(Cell* cell, Layer* layer) if (!_layer) throw Error("Can't create " + _TName("Slice") + " : null layer"); - if (_cell->GetSlice(_layer)) + if (_cell->getSlice(_layer)) throw Error("Can't create " + _TName("Slice") + " : already exists"); - _cell->_GetSliceMap()._Insert(this); + _cell->_getSliceMap()._Insert(this); } Slice::~Slice() // ************ { - _cell->_GetSliceMap()._Remove(this); + _cell->_getSliceMap()._Remove(this); } -Components Slice::GetComponents() const +Components Slice::getComponents() const // ************************************ { - // return _quadTree.GetGos().GetSubSet(); - return SubTypeCollection(_quadTree.GetGos()); + // return _quadTree.getGos().getSubSet(); + return SubTypeCollection(_quadTree.getGos()); } -Components Slice::GetComponentsUnder(const Box& area) const +Components Slice::getComponentsUnder(const Box& area) const // ******************************************************** { - // return _quadTree.GetGosUnder(area).GetSubSet(); - return SubTypeCollection(_quadTree.GetGosUnder(area)); + // return _quadTree.getGosUnder(area).getSubSet(); + return SubTypeCollection(_quadTree.getGosUnder(area)); } -Markers Slice::GetMarkers() const +Markers Slice::getMarkers() const // ****************************** { - // return _quadTree.GetGos().GetSubSet(); - return SubTypeCollection(_quadTree.GetGos()); + // return _quadTree.getGos().getSubSet(); + return SubTypeCollection(_quadTree.getGos()); } -Markers Slice::GetMarkersUnder(const Box& area) const +Markers Slice::getMarkersUnder(const Box& area) const // ************************************************** { - // return _quadTree.GetGosUnder(area).GetSubSet(); - return SubTypeCollection(_quadTree.GetGosUnder(area)); + // return _quadTree.getGosUnder(area).getSubSet(); + return SubTypeCollection(_quadTree.getGosUnder(area)); } -Slice* Slice::_Create(Cell* cell, Layer* layer) +Slice* Slice::_create(Cell* cell, Layer* layer) // ******************************************** { Slice* slice = new Slice(cell, layer); @@ -80,30 +80,30 @@ Slice* Slice::_Create(Cell* cell, Layer* layer) return slice; } -void Slice::_Delete() +void Slice::_destroy() // ****************** { delete this; } -string Slice::_GetString() const +string Slice::_getString() const // ***************************** { string s = "<" + _TName("Slice"); - // s += " " + GetString(_cell->GetName()); - s += " " + GetString(_layer->getName()); + // s += " " + getString(_cell->getName()); + s += " " + getString(_layer->getName()); s += ">"; return s; } -Record* Slice::_GetRecord() const +Record* Slice::_getRecord() const // ************************ { - Record* record = new Record(GetString(this)); + Record* record = new Record(getString(this)); if (record) { - record->Add(GetSlot("Cell", _cell)); - record->Add(GetSlot("Layer", _layer)); - record->Add(GetSlot("QuadTree", &_quadTree)); + record->Add(getSlot("Cell", _cell)); + record->Add(getSlot("Layer", _layer)); + record->Add(getSlot("QuadTree", &_quadTree)); } return record; } diff --git a/hurricane/src/hurricane/Slice.h b/hurricane/src/hurricane/Slice.h index 43ce55c1..ca3cc58d 100644 --- a/hurricane/src/hurricane/Slice.h +++ b/hurricane/src/hurricane/Slice.h @@ -30,62 +30,60 @@ class Slice { // Attributes // ********** - private: Cell* _cell; - private: Layer* _layer; - private: QuadTree _quadTree; - private: Slice* _nextOfCellSliceMap; + private: Cell* _cell; + private: Layer* _layer; + private: QuadTree _quadTree; + private: Slice* _nextOfCellSliceMap; // Constructors // ************ - protected: Slice(Cell* cell, Layer* layer); + protected: Slice(Cell* cell, Layer* layer); - private: Slice(const Slice& slice); // not implemented to forbid copy construction + private: Slice(const Slice& slice); // not implemented to forbid copy construction // Destructor // ********** - protected: ~Slice(); + protected: ~Slice(); // Operators // ********* - private: Slice& operator=(const Slice& slice); // not implemented to forbid assignment + private: Slice& operator=(const Slice& slice); // not implemented to forbid assignment // Accessors // ********* - public: Cell* GetCell() const {return _cell;}; - public: Layer* GetLayer() const {return _layer;}; - public: const Box& GetBoundingBox() const {return _quadTree.GetBoundingBox();}; - public: Gos GetGos() const {return _quadTree.GetGos();}; - public: Gos GetGosUnder(const Box& area) const {return _quadTree.GetGosUnder(area);}; - public: Components GetComponents() const; - public: Components GetComponentsUnder(const Box& area) const; - public: Markers GetMarkers() const; - public: Markers GetMarkersUnder(const Box& area) const; + public: Cell* getCell() const {return _cell;}; + public: Layer* getLayer() const {return _layer;}; + public: const Box& getBoundingBox() const {return _quadTree.getBoundingBox();}; + public: Gos getGos() const {return _quadTree.getGos();}; + public: Gos getGosUnder(const Box& area) const {return _quadTree.getGosUnder(area);}; + public: Components getComponents() const; + public: Components getComponentsUnder(const Box& area) const; + public: Markers getMarkers() const; + public: Markers getMarkersUnder(const Box& area) const; // Predicates // ********** - public: bool IsEmpty() const {return _quadTree.IsEmpty();}; + public: bool IsEmpty() const {return _quadTree.IsEmpty();}; // Others // ****** - public: static Slice* _Create(Cell* cell, Layer* layer); + public: static Slice* _create(Cell* cell, Layer* layer); - public: void _Delete(); + public: void _destroy(); - public: string _GetTypeName() const { return _TName("Slice"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; - public: QuadTree* _GetQuadTree() {return &_quadTree;}; - public: Slice* _GetNextOfCellSliceMap() const {return _nextOfCellSliceMap;}; + public: string _getTypeName() const { return _TName("Slice"); }; + public: string _getString() const; + public: Record* _getRecord() const; + public: QuadTree* _getQuadTree() {return &_quadTree;}; + public: Slice* _getNextOfCellSliceMap() const {return _nextOfCellSliceMap;}; - public: void _SetNextOfCellSliceMap(Slice* slice) {_nextOfCellSliceMap = slice;}; - - //public: void _Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation); + public: void _SetNextOfCellSliceMap(Slice* slice) {_nextOfCellSliceMap = slice;}; }; diff --git a/hurricane/src/hurricane/Slices.h b/hurricane/src/hurricane/Slices.h index 4e90ad7d..a91b2766 100644 --- a/hurricane/src/hurricane/Slices.h +++ b/hurricane/src/hurricane/Slices.h @@ -46,10 +46,10 @@ typedef GenericFilter SliceFilter; #define for_each_slice(slice, slices)\ /************************************/\ {\ - SliceLocator _locator = slices.GetLocator();\ - while (_locator.IsValid()) {\ - Slice* slice = _locator.GetElement();\ - _locator.Progress(); + SliceLocator _locator = slices.getLocator();\ + while (_locator.IsValid()) {\ + Slice* slice = _locator.getElement();\ + _locator.Progress(); diff --git a/hurricane/src/hurricane/Slot.h b/hurricane/src/hurricane/Slot.h index 561166e3..eb4e4521 100644 --- a/hurricane/src/hurricane/Slot.h +++ b/hurricane/src/hurricane/Slot.h @@ -65,17 +65,17 @@ namespace Hurricane { // Accessors public: - const string& GetName () const { return _name; }; - virtual string GetDataString () const { return _data->_GetString(); }; - virtual Record* GetDataRecord () const { return _data->_GetRecord(); }; + const string& getName () const { return _name; }; + virtual string getDataString () const { return _data->_getString(); }; + virtual Record* getDataRecord () const { return _data->_getRecord(); }; // Inspector Managment. public: - virtual string _GetString () const + virtual string _getString () const { - return "<" + _GetTypeName() - + " " + GetName() + " " - + _data->_GetString() + ">"; + return "<" + _getTypeName() + + " " + getName() + " " + + _data->_getString() + ">"; }; }; @@ -106,7 +106,7 @@ namespace Hurricane { // Accessors public: - virtual string _GetTypeName () const { return _TName("PointerSlot"); }; + virtual string _getTypeName () const { return _TName("PointerSlot"); }; }; @@ -132,7 +132,7 @@ namespace Hurricane { // Accessors public: - virtual string _GetTypeName () const { return _TName("ValueSlot"); }; + virtual string _getTypeName () const { return _TName("ValueSlot"); }; }; diff --git a/hurricane/src/hurricane/SlotAdapter.h b/hurricane/src/hurricane/SlotAdapter.h index bd99ebb7..486c17c4 100644 --- a/hurricane/src/hurricane/SlotAdapter.h +++ b/hurricane/src/hurricane/SlotAdapter.h @@ -50,17 +50,17 @@ -# ifndef __SLOT_ADAPTER__ -# define __SLOT_ADAPTER__ +#ifndef __SLOT_ADAPTER__ +#define __SLOT_ADAPTER__ -# ifndef __HURRICANE_COMMONS__ -# error "SlotAdapter.h musn't be included alone, please uses Commons.h." -# endif +#ifndef __HURRICANE_COMMONS__ +#error "SlotAdapter.h musn't be included alone, please uses Commons.h." +#endif -# include +#include @@ -76,13 +76,13 @@ namespace Hurricane { // Template Functions : "Proxy...()". template - inline string ProxyTypeName ( const Type* object ) { return object->_GetTypeName(); } + inline string ProxyTypeName ( const Type* object ) { return object->_getTypeName(); } template - inline string ProxyString ( const Type* object ) { return object->_GetString(); } + inline string ProxyString ( const Type* object ) { return object->_getString(); } template - inline Record* ProxyRecord ( const Type* object ) { return object->_GetRecord(); } + inline Record* ProxyRecord ( const Type* object ) { return object->_getRecord(); } @@ -118,10 +118,10 @@ template // Slot Management. public: - virtual string _GetTypeName () const = 0; - virtual string _GetString () const { return "SlotAdapter::_GetString()"; }; - virtual Record* _GetRecord () const { return NULL; }; - inline virtual Slot* _GetSlot ( const string& name ) const; + virtual string _getTypeName () const = 0; + virtual string _getString () const { return "SlotAdapter::_getString()"; }; + virtual Record* _getRecord () const { return NULL; }; + inline virtual Slot* _getSlot ( const string& name ) const; }; @@ -139,7 +139,7 @@ template // Slot Management. public: - inline virtual Slot* _GetSlot ( const string& name ) const; + inline virtual Slot* _getSlot ( const string& name ) const; }; @@ -153,7 +153,7 @@ template protected: \ const T* t; \ public: \ - const NestedSlotAdapter* _CheckInheritance () const \ + const NestedSlotAdapter* _checkInheritance () const \ { return static_cast(t); } \ public: \ enum { True=1, False=0 }; \ @@ -183,9 +183,9 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ProxyTypeName(_object); }; - virtual string _GetString () const { return ProxyString (_object); }; - virtual Record* _GetRecord () const { return ProxyRecord (_object); }; + virtual string _getTypeName () const { return ProxyTypeName(_object); }; + virtual string _getString () const { return ProxyString (_object); }; + virtual Record* _getRecord () const { return ProxyRecord (_object); }; }; @@ -212,9 +212,9 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ProxyTypeName(&_object); }; - virtual string _GetString () const { return ProxyString (&_object); }; - virtual Record* _GetRecord () const { return ProxyRecord (&_object); }; + virtual string _getTypeName () const { return ProxyTypeName(&_object); }; + virtual string _getString () const { return ProxyString (&_object); }; + virtual Record* _getRecord () const { return ProxyRecord (&_object); }; }; @@ -271,8 +271,8 @@ template<> // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const { return string(1,_c); }; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const { return string(1,_c); }; }; @@ -298,8 +298,8 @@ template<> // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const { return string(1,_c); }; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const { return string(1,_c); }; }; @@ -523,65 +523,60 @@ template<> template - inline Hurricane::Record* GetRecord ( T* t ) - { + inline Hurricane::Record* getRecord ( T* t ) { if ( !t ) return NULL; if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((const void*)t))->_GetRecord(); + return ((const Hurricane::SlotAdapter*)((const void*)t))->_getRecord(); - return Hurricane::PointerSlotAdapter(t)._GetRecord(); + return Hurricane::PointerSlotAdapter(t)._getRecord(); } template - inline Hurricane::Record* GetRecord ( T t ) - { + inline Hurricane::Record* getRecord ( T t ) { if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((const void*)&t))->_GetRecord(); + return ((const Hurricane::SlotAdapter*)((const void*)&t))->_getRecord(); - return Hurricane::ValueSlotAdapter(t)._GetRecord(); + return Hurricane::ValueSlotAdapter(t)._getRecord(); } template - inline string GetString ( T* t ) - { + inline string getString ( T* t ) { if ( !t ) return "NULL"; if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((const void*)t))->_GetString(); + return ((const Hurricane::SlotAdapter*)((const void*)t))->_getString(); - return Hurricane::PointerSlotAdapter(t)._GetString(); + return Hurricane::PointerSlotAdapter(t)._getString(); } template - inline string GetString ( T t ) + inline string getString ( T t ) { if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((void*)&t))->_GetString(); + return ((const Hurricane::SlotAdapter*)((void*)&t))->_getString(); - return Hurricane::ValueSlotAdapter(t)._GetString(); + return Hurricane::ValueSlotAdapter(t)._getString(); } template - inline Hurricane::Slot* GetSlot ( const string& name, T* t ) - { - if ( !t ) return GetSlot ( name, "NULL pointer" ); + inline Hurricane::Slot* getSlot(const string& name, T* t ) { + if ( !t ) return getSlot ( name, "NULL pointer" ); if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((const void*)t))->_GetSlot(name); + return ((const Hurricane::SlotAdapter*)((const void*)t))->_getSlot(name); - return (new Hurricane::PointerSlotAdapter(t))->_GetSlot(name); + return (new Hurricane::PointerSlotAdapter(t))->_getSlot(name); } template - inline Hurricane::Slot* GetSlot ( const string& name, T t ) - { + inline Hurricane::Slot* getSlot( const string& name, T t ) { if ( Hurricane::IsNestedSlotAdapter::True ) - return ((const Hurricane::SlotAdapter*)((const void*)&t))->_GetSlot(name); + return ((const Hurricane::SlotAdapter*)((const void*)&t))->_getSlot(name); - return (new Hurricane::ValueSlotAdapter(t))->_GetSlot(name); + return (new Hurricane::ValueSlotAdapter(t))->_getSlot(name); } @@ -590,9 +585,9 @@ template { \ if ( !t ) return stream << "NULL"; \ if ( Hurricane::IsNestedSlotAdapter::True ) \ - return stream << "&" << ((const Hurricane::SlotAdapter*)((const void*)t))->_GetString(); \ + return stream << "&" << ((const Hurricane::SlotAdapter*)((const void*)t))->_getString(); \ \ - return stream << "&" << Hurricane::PointerSlotAdapter(t)._GetString(); \ + return stream << "&" << Hurricane::PointerSlotAdapter(t)._getString(); \ } @@ -600,28 +595,26 @@ template inline ostream& operator<< ( ostream& stream, const Type& t ) \ { \ if ( Hurricane::IsNestedSlotAdapter::True ) \ - return stream << ((const Hurricane::SlotAdapter*)((const void*)&t))->_GetString(); \ + return stream << ((const Hurricane::SlotAdapter*)((const void*)&t))->_getString(); \ \ - return stream << Hurricane::ValueSlotAdapter(t)._GetString(); \ + return stream << Hurricane::ValueSlotAdapter(t)._getString(); \ } -# include "Record.h" -# include "Slot.h" +#include "Record.h" +#include "Slot.h" namespace Hurricane { - inline Slot* SlotAdapter::_GetSlot ( const string& name ) const - { + inline Slot* SlotAdapter::_getSlot ( const string& name ) const { return new ValueSlot(name,this); }; - inline Slot* NestedSlotAdapter::_GetSlot ( const string& name ) const - { + inline Slot* NestedSlotAdapter::_getSlot ( const string& name ) const { return new PointerSlot(name,this); }; @@ -629,7 +622,7 @@ namespace Hurricane { // Re-Entering Hurricane namespace, but now we can make use of -// GetString(), GetRecord() & GetSlot() for containers templates. +// getString(), getRecord() & getSlot() for containers templates. // ------------------------------------------------------------------- @@ -652,30 +645,28 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const; - virtual Record* _GetRecord () const; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const; + virtual Record* _getRecord () const; }; template - inline string PointerSlotAdapter >::_GetString () const - { + inline string PointerSlotAdapter >::_getString () const { string name = "vector:"; - return name + GetString(_v->size()); + return name + getString(_v->size()); } template - inline Record* PointerSlotAdapter >::_GetRecord () const - { + inline Record* PointerSlotAdapter >::_getRecord () const { Record* record = NULL; if ( !_v->empty() ) { record = new Record ( "vector" ); unsigned n = 1; typename vector::const_iterator iterator = _v->begin(); while ( iterator != _v->end() ) { - record->Add ( GetSlot(GetString(n++), *iterator) ); + record->Add ( getSlot(getString(n++), *iterator) ); ++iterator; } } @@ -705,22 +696,22 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const; - virtual Record* _GetRecord () const; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const; + virtual Record* _getRecord () const; }; template - inline string PointerSlotAdapter >::_GetString () const + inline string PointerSlotAdapter >::_getString () const { string name = "list:"; - return name + GetString(_l->size()); + return name + getString(_l->size()); } template - inline Record* PointerSlotAdapter >::_GetRecord () const + inline Record* PointerSlotAdapter >::_getRecord () const { Record* record = NULL; if ( !_l->empty() ) { @@ -728,7 +719,7 @@ template unsigned n = 1; typename list::const_iterator iterator = _l->begin(); while ( iterator != _l->end() ) { - record->Add ( GetSlot(GetString(n++), *iterator) ); + record->Add ( getSlot(getString(n++), *iterator) ); ++iterator; } } @@ -758,29 +749,27 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const; - virtual Record* _GetRecord () const; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const; + virtual Record* _getRecord () const; }; template - inline string PointerSlotAdapter >::_GetString () const - { + inline string PointerSlotAdapter >::_getString () const { string name = "map:"; - return name + GetString(_m->size()); + return name + getString(_m->size()); } template - inline Record* PointerSlotAdapter >::_GetRecord () const - { + inline Record* PointerSlotAdapter >::_getRecord () const { Record* record = NULL; if ( !_m->empty() ) { record = new Record ( "map" ); typename map::const_iterator iterator = _m->begin(); while ( iterator != _m->end() ) { - record->Add ( GetSlot(GetString(iterator->first), iterator->second) ); + record->Add ( getSlot(getString(iterator->first), iterator->second) ); ++iterator; } } @@ -810,30 +799,28 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const; - virtual Record* _GetRecord () const; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const; + virtual Record* _getRecord () const; }; template - inline string PointerSlotAdapter >::_GetString () const - { + inline string PointerSlotAdapter >::_getString () const { string name = "set:"; - return name + GetString(_s->size()); + return name + getString(_s->size()); } template - inline Record* PointerSlotAdapter >::_GetRecord () const - { + inline Record* PointerSlotAdapter >::_getRecord () const { Record* record = NULL; if ( !_s->empty() ) { record = new Record ( "set" ); unsigned n = 1; typename set::const_iterator iterator = _s->begin(); while ( iterator != _s->end() ) { - record->Add ( GetSlot(GetString(n++), *iterator) ); + record->Add ( getSlot(getString(n++), *iterator) ); ++iterator; } } @@ -863,30 +850,28 @@ template // Slot Management. public: - virtual string _GetTypeName () const { return ">"; }; - virtual string _GetString () const; - virtual Record* _GetRecord () const; + virtual string _getTypeName () const { return ">"; }; + virtual string _getString () const; + virtual Record* _getRecord () const; }; template - inline string PointerSlotAdapter >::_GetString () const - { + inline string PointerSlotAdapter >::_getString () const { string name = "multiset:"; - return name + GetString(_s->size()); + return name + getString(_s->size()); } template - inline Record* PointerSlotAdapter >::_GetRecord () const - { + inline Record* PointerSlotAdapter >::_getRecord () const { Record* record = NULL; if ( !_s->empty() ) { record = new Record ( "multiset" ); unsigned n = 1; typename multiset::const_iterator iterator = _s->begin(); while ( iterator != _s->end() ) { - record->Add ( GetSlot(GetString(n++), *iterator) ); + record->Add ( getSlot(getString(n++), *iterator) ); ++iterator; } } @@ -901,4 +886,4 @@ template -# endif +#endif diff --git a/hurricane/src/hurricane/Symbols.h b/hurricane/src/hurricane/Symbols.h index 3eddf7dc..9dc43d9b 100644 --- a/hurricane/src/hurricane/Symbols.h +++ b/hurricane/src/hurricane/Symbols.h @@ -46,9 +46,9 @@ typedef GenericFilter SymbolFilter; #define for_each_symbol(symbol, symbols)\ /***************************************/\ {\ - SymbolLocator _locator = symbols.GetLocator();\ + SymbolLocator _locator = symbols.getLocator();\ while (_locator.IsValid()) {\ - Symbol* symbol = _locator.GetElement();\ + Symbol* symbol = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Tabulation.cpp b/hurricane/src/hurricane/Tabulation.cpp index 450f2e31..811dec7d 100644 --- a/hurricane/src/hurricane/Tabulation.cpp +++ b/hurricane/src/hurricane/Tabulation.cpp @@ -16,15 +16,15 @@ namespace Hurricane { Tabulation::Tabulation(const string& s) // ************************************ -: _s(s), - _n(0) +: _s(s), + _n(0) { } Tabulation::Tabulation(const Tabulation& tabulation) // ************************************************* -: _s(tabulation._s), - _n(tabulation._n) +: _s(tabulation._s), + _n(tabulation._n) { } @@ -36,48 +36,48 @@ Tabulation::~Tabulation() Tabulation& Tabulation::operator=(const Tabulation& tabulation) // ************************************************************ { - _s = tabulation._s; - _n = tabulation._n; - return *this; + _s = tabulation._s; + _n = tabulation._n; + return *this; } Tabulation& Tabulation::operator++() // ********************************* { - if (_n < 100) _n++; - return *this; + if (_n < 100) _n++; + return *this; } Tabulation Tabulation::operator++(int) // *********************************** { - Tabulation tabulation = *this; - if (_n < 100) _n++; - return tabulation; + Tabulation tabulation = *this; + if (_n < 100) _n++; + return tabulation; } Tabulation& Tabulation::operator--() // ********************************* { - if (0 < _n) _n--; - return *this; + if (0 < _n) _n--; + return *this; } Tabulation Tabulation::operator--(int) // *********************************** { - Tabulation tabulation = *this; - if (0 < _n) _n--; - return tabulation; + Tabulation tabulation = *this; + if (0 < _n) _n--; + return tabulation; } -string Tabulation::_GetString() const +string Tabulation::_getString() const // ********************************** { - string s = ""; - unsigned n = _n; - while (n--) s += _s; - return s; + string s = ""; + unsigned n = _n; + while (n--) s += _s; + return s; } diff --git a/hurricane/src/hurricane/Tabulation.h b/hurricane/src/hurricane/Tabulation.h index cbc21fe0..5dd028c8 100644 --- a/hurricane/src/hurricane/Tabulation.h +++ b/hurricane/src/hurricane/Tabulation.h @@ -23,38 +23,38 @@ class Tabulation { // Attributes // ********** - private: string _s; - private: unsigned _n; + private: string _s; + private: unsigned _n; // Constructors // ************ - public: Tabulation(const string& s = " "); + public: Tabulation(const string& s = " "); - public: Tabulation(const Tabulation& tabulation); + public: Tabulation(const Tabulation& tabulation); // Destructor // ********** - public: ~Tabulation(); + public: ~Tabulation(); // Operators // ********* - public: Tabulation& operator=(const Tabulation& tabulation); + public: Tabulation& operator=(const Tabulation& tabulation); - public: Tabulation& operator++(); - public: Tabulation operator++(int); - public: Tabulation& operator--(); - public: Tabulation operator--(int); + public: Tabulation& operator++(); + public: Tabulation operator++(int); + public: Tabulation& operator--(); + public: Tabulation operator--(int); // Others // ****** - public: string _GetTypeName() const { return _TName("Tabulation"); }; - public: string _GetString() const; - public: Record* _GetRecord() const { return NULL; }; - public: Slot* _GetSlot() const { return NULL; }; + public: string _getTypeName() const { return _TName("Tabulation"); }; + public: string _getString() const; + public: Record* _getRecord() const { return NULL; }; + public: Slot* _getSlot() const { return NULL; }; }; diff --git a/hurricane/src/hurricane/Technology.cpp b/hurricane/src/hurricane/Technology.cpp index f2761622..40b05e4f 100644 --- a/hurricane/src/hurricane/Technology.cpp +++ b/hurricane/src/hurricane/Technology.cpp @@ -44,14 +44,14 @@ class Technology_BasicLayers : public Collection { public: Locator& operator=(const Locator& locator); - public: virtual BasicLayer* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual BasicLayer* getElement() const; + public: virtual Hurricane::Locator* getClone() const; public: virtual bool IsValid() const; public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -76,13 +76,13 @@ class Technology_BasicLayers : public Collection { // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -101,7 +101,7 @@ Technology::Technology(DataBase* dataBase, const Name& name) if (!_dataBase) throw Error("Can't create " + _TName("Technology") + " : null data base"); - if (_dataBase->GetTechnology()) + if (_dataBase->getTechnology()) throw Error("Can't create " + _TName("Technology") + " : already exists"); if (_name.IsEmpty()) @@ -113,43 +113,43 @@ Technology* Technology::Create(DataBase* dataBase, const Name& name) { Technology* technology = new Technology(dataBase, name); - technology->_PostCreate(); + technology->_postCreate(); return technology; } -BasicLayer* Technology::GetBasicLayer(const Name& name) const +BasicLayer* Technology::getBasicLayer(const Name& name) const // ********************************************************** { - Layer* layer = GetLayer(name); + Layer* layer = getLayer(name); return (layer && is_a(layer)) ? (BasicLayer*)layer : NULL; } -CompositeLayer* Technology::GetCompositeLayer(const Name& name) const +CompositeLayer* Technology::getCompositeLayer(const Name& name) const // ****************************************************************** { - Layer* layer = GetLayer(name); + Layer* layer = getLayer(name); return (layer && is_a(layer)) ? (CompositeLayer*)layer : NULL; } -BasicLayers Technology::GetBasicLayers() const +BasicLayers Technology::getBasicLayers() const // ******************************************* { - // return GetLayers().GetSubSet(); - return SubTypeCollection(GetLayers()); + // return getLayers().getSubSet(); + return SubTypeCollection(getLayers()); } -BasicLayers Technology::GetBasicLayers(const Layer::Mask& mask) const +BasicLayers Technology::getBasicLayers(const Layer::Mask& mask) const // ****************************************************************** { return Technology_BasicLayers(this, mask); } -CompositeLayers Technology::GetCompositeLayers() const +CompositeLayers Technology::getCompositeLayers() const // *************************************************** { - // return GetLayers().GetSubSet(); - return SubTypeCollection(GetLayers()); + // return getLayers().getSubSet(); + return SubTypeCollection(getLayers()); } void Technology::SetName(const Name& name) @@ -163,40 +163,40 @@ void Technology::SetName(const Name& name) } } -void Technology::_PostCreate() +void Technology::_postCreate() // *************************** { - Inherit::_PostCreate(); + Inherit::_postCreate(); _dataBase->_SetTechnology(this); } -void Technology::_PreDelete() +void Technology::_preDestroy() // ************************** { - Inherit::_PreDelete(); + Inherit::_preDestroy(); - for_each_layer(layer, GetLayers()) layer->Delete(); end_for; + for_each_layer(layer, getLayers()) layer->destroy(); end_for; _dataBase->_SetTechnology(NULL); } -string Technology::_GetString() const +string Technology::_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* Technology::_GetRecord() const +Record* Technology::_getRecord() const // ***************************** { - Record* record = Inherit::_GetRecord(); + Record* record = Inherit::_getRecord(); if (record) { - record->Add(GetSlot("DataBase", _dataBase)); - record->Add(GetSlot("Name", &_name)); - record->Add(GetSlot("Layers", &_layerList)); + record->Add(getSlot("DataBase", _dataBase)); + record->Add(getSlot("Name", &_name)); + record->Add(getSlot("Layers", &_layerList)); } return record; } @@ -211,25 +211,25 @@ Technology::LayerMap::LayerMap() { } -Name Technology::LayerMap::_GetKey(Layer* layer) const +Name Technology::LayerMap::_getKey(Layer* layer) const // *************************************************** { return layer->getName(); } -unsigned Technology::LayerMap::_GetHashValue(Name name) const +unsigned Technology::LayerMap::_getHashValue(Name name) const // ********************************************************** { - return ( (unsigned int)( (unsigned long)name._GetSharedName() ) ) / 8; + return ( (unsigned int)( (unsigned long)name._getSharedName() ) ) / 8; } -Layer* Technology::LayerMap::_GetNextElement(Layer* layer) const +Layer* Technology::LayerMap::_getNextElement(Layer* layer) const // ************************************************************* { return layer->_getNextOfTechnologyLayerMap(); } -void Technology::LayerMap::_SetNextElement(Layer* layer, Layer* nextLayer) const +void Technology::LayerMap::_setNextElement(Layer* layer, Layer* nextLayer) const // ***************************************************************************** { layer->_setNextOfTechnologyLayerMap(nextLayer); @@ -273,25 +273,25 @@ Technology_BasicLayers& Technology_BasicLayers::operator=(const Technology_Basic return *this; } -Collection* Technology_BasicLayers::GetClone() const +Collection* Technology_BasicLayers::getClone() const // ************************************************************** { return new Technology_BasicLayers(*this); } -Locator* Technology_BasicLayers::GetLocator() const +Locator* Technology_BasicLayers::getLocator() const // ************************************************************* { return new Locator(_technology, _mask); } -string Technology_BasicLayers::_GetString() const +string Technology_BasicLayers::_getString() const // ********************************************** { string s = "<" + _TName("Technology::BasicLayers"); if (_technology) { - s += " " + GetString(_technology); - s += " " + GetString(_mask); + s += " " + getString(_technology); + s += " " + getString(_mask); } s += ">"; return s; @@ -320,8 +320,8 @@ Technology_BasicLayers::Locator::Locator(const Technology* technology, const Lay _basicLayerLocator() { if (_technology) { - _basicLayerLocator = _technology->GetBasicLayers().GetLocator(); - while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->getMask() & _mask)) + _basicLayerLocator = _technology->getBasicLayers().getLocator(); + while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.getElement()->getMask() & _mask)) _basicLayerLocator.Progress(); } } @@ -344,13 +344,13 @@ Technology_BasicLayers::Locator& Technology_BasicLayers::Locator::operator=(cons return *this; } -BasicLayer* Technology_BasicLayers::Locator::GetElement() const +BasicLayer* Technology_BasicLayers::Locator::getElement() const // ************************************************************ { - return _basicLayerLocator.GetElement(); + return _basicLayerLocator.getElement(); } -Locator* Technology_BasicLayers::Locator::GetClone() const +Locator* Technology_BasicLayers::Locator::getClone() const // ******************************************************************** { return new Locator(*this); @@ -368,16 +368,16 @@ void Technology_BasicLayers::Locator::Progress() do { _basicLayerLocator.Progress(); } - while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->getMask() & _mask)); + while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.getElement()->getMask() & _mask)); } -string Technology_BasicLayers::Locator::_GetString() const +string Technology_BasicLayers::Locator::_getString() const // ******************************************************* { string s = "<" + _TName("Technology::BasicLayers::Locator"); if (_technology) { - s += " " + GetString(_technology); - s += " " + GetString(_mask); + s += " " + getString(_technology); + s += " " + getString(_mask); } s += ">"; return s; diff --git a/hurricane/src/hurricane/Technology.h b/hurricane/src/hurricane/Technology.h index 4b977978..28414d90 100644 --- a/hurricane/src/hurricane/Technology.h +++ b/hurricane/src/hurricane/Technology.h @@ -31,69 +31,69 @@ class Technology : public DBo { // Types // ***** - public: typedef DBo Inherit; + public: typedef DBo Inherit; - public: class LayerMap : public IntrusiveMap { - // ****************************************************** + public: class LayerMap : public IntrusiveMap { + // ****************************************************** - public: typedef IntrusiveMap Inherit; - - public: LayerMap(); + public: typedef IntrusiveMap Inherit; + + public: LayerMap(); - public: virtual Name _GetKey(Layer* layer) const; - public: virtual unsigned _GetHashValue(Name name) const; - public: virtual Layer* _GetNextElement(Layer* layer) const; - public: virtual void _SetNextElement(Layer* layer, Layer* nextLayer) const; + public: virtual Name _getKey(Layer* layer) const; + public: virtual unsigned _getHashValue(Name name) const; + public: virtual Layer* _getNextElement(Layer* layer) const; + public: virtual void _setNextElement(Layer* layer, Layer* nextLayer) const; - }; + }; - public: typedef list LayerList; + public: typedef list LayerList; // Attributes // ********** - private: DataBase* _dataBase; - private: Name _name; - private: LayerMap _layerMap; - private: LayerList _layerList; + private: DataBase* _dataBase; + private: Name _name; + private: LayerMap _layerMap; + private: LayerList _layerList; // Constructors // ************ - protected: Technology(DataBase* dataBase, const Name& name); + protected: Technology(DataBase* dataBase, const Name& name); - public: static Technology* Create(DataBase* dataBase, const Name& name); + public: static Technology* Create(DataBase* dataBase, const Name& name); // Accessors // ********* - public: DataBase* GetDataBase() const {return _dataBase;}; - public: const Name& GetName() const {return _name;}; - public: Layer* GetLayer(const Name& name) const {return _layerMap.GetElement(name);}; - public: BasicLayer* GetBasicLayer(const Name& name) const; - public: CompositeLayer* GetCompositeLayer(const Name& name) const; - public: Layers GetLayers() const {return GetCollection(_layerList);}; - public: BasicLayers GetBasicLayers() const; - public: BasicLayers GetBasicLayers(const Layer::Mask& mask) const; - public: CompositeLayers GetCompositeLayers() const; + public: DataBase* getDataBase() const {return _dataBase;}; + public: const Name& getName() const {return _name;}; + public: Layer* getLayer(const Name& name) const {return _layerMap.getElement(name);}; + public: BasicLayer* getBasicLayer(const Name& name) const; + public: CompositeLayer* getCompositeLayer(const Name& name) const; + public: Layers getLayers() const {return getCollection(_layerList);}; + public: BasicLayers getBasicLayers() const; + public: BasicLayers getBasicLayers(const Layer::Mask& mask) const; + public: CompositeLayers getCompositeLayers() const; // Updators // ******** - public: void SetName(const Name& name); + public: void SetName(const Name& name); // Others // ****** - protected: virtual void _PostCreate(); + protected: virtual void _postCreate(); - protected: virtual void _PreDelete(); + protected: virtual void _preDestroy(); - public: virtual string _GetTypeName() const {return _TName("Technology");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; - public: LayerMap& _GetLayerMap() {return _layerMap;}; - public: LayerList& _GetLayerList() {return _layerList;}; + public: virtual string _getTypeName() const {return _TName("Technology");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; + public: LayerMap& _getLayerMap() {return _layerMap;}; + public: LayerList& _getLayerList() {return _layerList;}; }; diff --git a/hurricane/src/hurricane/Timer.cpp b/hurricane/src/hurricane/Timer.cpp index daeea290..2805a843 100644 --- a/hurricane/src/hurricane/Timer.cpp +++ b/hurricane/src/hurricane/Timer.cpp @@ -16,64 +16,64 @@ namespace Hurricane { Timer::Timer() // *********** -: _time(time(NULL)) +: _time(time(NULL)) { } Timer::Timer(const Timer& timer) // ***************************** -: _time(timer._time) +: _time(timer._time) { } Timer& Timer::operator=(const Timer& timer) // **************************************** { - _time = timer._time; - return *this; + _time = timer._time; + return *this; } -string Timer::_GetString() const +string Timer::_getString() const // ***************************** { - unsigned seconds = time(NULL) - _time; + unsigned seconds = time(NULL) - _time; - string s = ""; + string s = ""; - if (86400 <= seconds) { - unsigned days = seconds / 86400; - seconds -= 96400 * days; - s += GetString(days) + "d"; - } + if (86400 <= seconds) { + unsigned days = seconds / 86400; + seconds -= 96400 * days; + s += getString(days) + "d"; + } - if (3600 <= seconds) { - unsigned hours = seconds / 3600; - seconds -= 3600 * hours; - if (!s.empty()) s += " "; - s += GetString(hours) + "h"; - } + if (3600 <= seconds) { + unsigned hours = seconds / 3600; + seconds -= 3600 * hours; + if (!s.empty()) s += " "; + s += getString(hours) + "h"; + } - if (60 <= seconds) { - unsigned minutes = seconds / 60; - seconds -= 60 * minutes; - if (!s.empty()) s += " "; - s += GetString(minutes) + "m"; - } + if (60 <= seconds) { + unsigned minutes = seconds / 60; + seconds -= 60 * minutes; + if (!s.empty()) s += " "; + s += getString(minutes) + "m"; + } - if ((1 <= seconds) || s.empty()) { - if (!s.empty()) s += " "; - s += GetString(seconds) + "s"; - } + if ((1 <= seconds) || s.empty()) { + if (!s.empty()) s += " "; + s += getString(seconds) + "s"; + } - return s; + return s; } -Record* Timer::_GetRecord() const +Record* Timer::_getRecord() const // ************************ { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("Time", &_time)); - return record; + Record* record = new Record(getString(this)); + record->Add(getSlot("Time", &_time)); + return record; } diff --git a/hurricane/src/hurricane/Timer.h b/hurricane/src/hurricane/Timer.h index 6b3d2a77..a1db5a09 100644 --- a/hurricane/src/hurricane/Timer.h +++ b/hurricane/src/hurricane/Timer.h @@ -23,26 +23,26 @@ class Timer { // Attributes // ********** - private: time_t _time; + private: time_t _time; // Constructors // ************ - public: Timer(); + public: Timer(); - public: Timer(const Timer& timer); + public: Timer(const Timer& timer); // Operators // ********* - public: Timer& operator=(const Timer& timer); + public: Timer& operator=(const Timer& timer); // Others // ****** - public: string _GetTypeName() const { return _TName("Timer"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Timer"); }; + public: string _getString() const; + public: Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/Transformation.cpp b/hurricane/src/hurricane/Transformation.cpp index a4e48ccd..b31a94ae 100644 --- a/hurricane/src/hurricane/Transformation.cpp +++ b/hurricane/src/hurricane/Transformation.cpp @@ -222,23 +222,23 @@ void Transformation::applyOn(Transformation& transformation) const transformation = getTransformation(transformation); } -string Transformation::_GetString() const +string Transformation::_getString() const // ************************************** { return "<" + _TName("Transformation") + " " + - GetValueString(_tx) + " " + - GetValueString(_ty) + " " + - GetString(_orientation) + + getValueString(_tx) + " " + + getValueString(_ty) + " " + + getString(_orientation) + ">"; } -Record* Transformation::_GetRecord() const +Record* Transformation::_getRecord() const // ********************************* { - Record* record = new Record(GetString(this)); - record->Add(GetSlot("X", &_tx)); - record->Add(GetSlot("Y", &_ty)); - record->Add(GetSlot("Orientation", _orientation)); + Record* record = new Record(getString(this)); + record->Add(getSlot("X", &_tx)); + record->Add(getSlot("Y", &_ty)); + record->Add(getSlot("Orientation", _orientation)); return record; } @@ -267,17 +267,17 @@ Transformation::Orientation& Transformation::Orientation::operator=(const Orient return *this; } -string Transformation::Orientation::_GetString() const +string Transformation::Orientation::_getString() const // *************************************************** { - return GetString(&_code); + return getString(&_code); } -Record* Transformation::Orientation::_GetRecord() const +Record* Transformation::Orientation::_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; } diff --git a/hurricane/src/hurricane/Transformation.h b/hurricane/src/hurricane/Transformation.h index 402490ba..9e884f34 100644 --- a/hurricane/src/hurricane/Transformation.h +++ b/hurricane/src/hurricane/Transformation.h @@ -37,11 +37,11 @@ class Transformation { 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("Transformation::Orientation"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Transformation::Orientation"); }; + public: string _getString() const; + public: Record* _getRecord() const; }; // Attributes @@ -100,8 +100,8 @@ class Transformation { // Predicates // ********** - public: bool isEven() const {return !(_orientation.GetCode() & 1);}; - public: bool isOdd() const {return (_orientation.GetCode() & 1);}; + public: bool isEven() const {return !(_orientation.getCode() & 1);}; + public: bool isOdd() const {return (_orientation.getCode() & 1);}; // Updators // ******** @@ -119,9 +119,9 @@ class Transformation { // Others // ****** - public: string _GetTypeName() const { return _TName("Transformation"); }; - public: string _GetString() const; - public: Record* _GetRecord() const; + public: string _getTypeName() const { return _TName("Transformation"); }; + public: string _getString() const; + public: Record* _getRecord() const; }; @@ -157,8 +157,8 @@ template<> inline Record* ProxyRecord ( const Transformation::Orientation::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; } diff --git a/hurricane/src/hurricane/Unit.cpp b/hurricane/src/hurricane/Unit.cpp index 15dced7e..119cbd3f 100644 --- a/hurricane/src/hurricane/Unit.cpp +++ b/hurricane/src/hurricane/Unit.cpp @@ -30,30 +30,30 @@ static Unit GRID_STEP = 1; // Precision managers // **************************************************************************************************** -unsigned GetPrecision() +unsigned getPrecision() // ******************** { - return PRECISION; + return PRECISION; } -unsigned GetMaximalPrecisionAllowed() +unsigned getMaximalPrecisionAllowed() // ********************************** { - return MAXIMAL_PRECISION_ALLOWED; + return MAXIMAL_PRECISION_ALLOWED; } void SetPrecision(unsigned precision) // ********************************** { - if (MAXIMAL_PRECISION_ALLOWED < precision) - throw Error("Can't set precision : not allowed"); + if (MAXIMAL_PRECISION_ALLOWED < precision) + throw Error("Can't set precision : not allowed"); - PRECISION = precision; + PRECISION = precision; - RESOLUTION = 1; - while (precision--) RESOLUTION /= 10; + RESOLUTION = 1; + while (precision--) RESOLUTION /= 10; - SetGridStep(GetUnit(1)); + SetGridStep(getUnit(1)); } @@ -62,10 +62,10 @@ void SetPrecision(unsigned precision) // Resolution managers // **************************************************************************************************** -double GetResolution() +double getResolution() // ******************* { - return RESOLUTION; + return RESOLUTION; } @@ -74,52 +74,52 @@ double GetResolution() // Grid managers // **************************************************************************************************** -const Unit& GetGridStep() +const Unit& getGridStep() // ********************** { - return GRID_STEP; + return GRID_STEP; } void SetGridStep(const Unit& gridStep) // *********************************** { - if (!gridStep) throw Error("Can't set grid step : invalid value"); + if (!gridStep) throw Error("Can't set grid step : invalid value"); - GRID_STEP = gridStep; + GRID_STEP = gridStep; } bool IsOnGrid(const Unit& unit, int n) // *********************************** { - if (n <= 0) throw Error("Can't compute : invalid value"); + if (n <= 0) throw Error("Can't compute : invalid value"); - n *= GRID_STEP; + n *= GRID_STEP; - return (((abs(unit) / n) * n) == abs(unit)); + return (((abs(unit) / n) * n) == abs(unit)); } -Unit GetOnGridUnit(const Unit& unit, int s) +Unit getOnGridUnit(const Unit& unit, int s) // **************************************** { - switch (s) { - case -1 : { - if (0 < unit) return (unit / GRID_STEP) * GRID_STEP; - else if (unit < 0) return ((unit / GRID_STEP) - 1) * GRID_STEP; - return unit; - } - case 0 : { - int g1 = (unit / GRID_STEP) * GRID_STEP; - int g2 = ((g1 < unit) ? (g1 + GRID_STEP) : (g1 - GRID_STEP)); - return (abs(g1 - unit) <= abs(g2 - unit)) ? g1 : g2; - } - case +1 : { - if (0 < unit) return ((unit / GRID_STEP) + 1) * GRID_STEP; - else if (unit < 0) return (unit / GRID_STEP) * GRID_STEP; - return unit; - } - } - throw Error("Can't get on grid unit : invalid parameter s (should be -1, 0 or +1)"); - return 0; + switch (s) { + case -1 : { + if (0 < unit) return (unit / GRID_STEP) * GRID_STEP; + else if (unit < 0) return ((unit / GRID_STEP) - 1) * GRID_STEP; + return unit; + } + case 0 : { + int g1 = (unit / GRID_STEP) * GRID_STEP; + int g2 = ((g1 < unit) ? (g1 + GRID_STEP) : (g1 - GRID_STEP)); + return (abs(g1 - unit) <= abs(g2 - unit)) ? g1 : g2; + } + case +1 : { + if (0 < unit) return ((unit / GRID_STEP) + 1) * GRID_STEP; + else if (unit < 0) return (unit / GRID_STEP) * GRID_STEP; + return unit; + } + } + throw Error("Can't get on grid unit : invalid parameter s (should be -1, 0 or +1)"); + return 0; } @@ -128,40 +128,40 @@ Unit GetOnGridUnit(const Unit& unit, int s) // Others // **************************************************************************************************** -Unit GetUnit(double value) +Unit getUnit(double value) // *********************** { - return (int)rint(value / RESOLUTION); + return (int)rint(value / RESOLUTION); } -double GetValue(const Unit& unit) +double getValue(const Unit& unit) // ****************************** { - return (unit * RESOLUTION); + return (unit * RESOLUTION); } -string GetValueString(const Unit& unit) +string getValueString(const Unit& unit) // ************************************ { - if (unit == 0) return "0"; + if (unit == 0) return "0"; - char buffer[32]; - unsigned length = sprintf(buffer, "%ld", abs(unit)); - if (length <= PRECISION) { - unsigned offset = PRECISION - length + 1; - for (int i = length; 0 <= i; i--) buffer[i + offset] = buffer[i]; - for (unsigned i = 0; i < offset; i++) buffer[i] = '0'; - length += offset; - } - for (unsigned i = 0; i <= PRECISION; i++) - buffer[length - i + 1] = buffer[length - i]; - buffer[length - PRECISION] = '.'; - while (buffer[length] == '0') buffer[length--] = '\0'; - if (buffer[length] == '.') buffer[length--] = '\0'; - if (0 < unit) - return buffer; - else - return "-" + string(buffer); + char buffer[32]; + unsigned length = sprintf(buffer, "%ld", abs(unit)); + if (length <= PRECISION) { + unsigned offset = PRECISION - length + 1; + for (int i = length; 0 <= i; i--) buffer[i + offset] = buffer[i]; + for (unsigned i = 0; i < offset; i++) buffer[i] = '0'; + length += offset; + } + for (unsigned i = 0; i <= PRECISION; i++) + buffer[length - i + 1] = buffer[length - i]; + buffer[length - PRECISION] = '.'; + while (buffer[length] == '0') buffer[length--] = '\0'; + if (buffer[length] == '.') buffer[length--] = '\0'; + if (0 < unit) + return buffer; + else + return "-" + string(buffer); } @@ -173,12 +173,12 @@ string GetValueString(const Unit& unit) bool Scan(const string& s, H::Unit& unit) // *********************************** { - double d; - if (Scan(s, d)) { - unit = H::GetUnit(d); - return true; - } - return false; + double d; + if (Scan(s, d)) { + unit = H::getUnit(d); + return true; + } + return false; } // **************************************************************************************************** diff --git a/hurricane/src/hurricane/Unit.h b/hurricane/src/hurricane/Unit.h index ed7a6dc4..77f1b9d5 100644 --- a/hurricane/src/hurricane/Unit.h +++ b/hurricane/src/hurricane/Unit.h @@ -28,9 +28,9 @@ typedef long Unit; // Precision managers (precision defines the maximal number of decimals allowed) // **************************************************************************************************** -unsigned GetPrecision(); +unsigned getPrecision(); -unsigned GetMaximalPrecisionAllowed(); +unsigned getMaximalPrecisionAllowed(); void SetPrecision(unsigned precision); // Should be called only once at the beginning of the program @@ -41,7 +41,7 @@ void SetPrecision(unsigned precision); // Resolution managers (the value associate to the unit 1) // **************************************************************************************************** -double GetResolution(); +double getResolution(); @@ -49,13 +49,13 @@ double GetResolution(); // Grid managers // **************************************************************************************************** -const Unit& GetGridStep(); +const Unit& getGridStep(); void SetGridStep(const Unit& gridStep); bool IsOnGrid(const Unit& unit, int n = 1); -Unit GetOnGridUnit(const Unit& unit, int s = 0); +Unit getOnGridUnit(const Unit& unit, int s = 0); @@ -63,11 +63,11 @@ Unit GetOnGridUnit(const Unit& unit, int s = 0); // Others // **************************************************************************************************** -Unit GetUnit(double value); +Unit getUnit(double value); -double GetValue(const Unit& unit); +double getValue(const Unit& unit); -string GetValueString(const Unit& unit); +string getValueString(const Unit& unit); @@ -81,13 +81,13 @@ string GetValueString(const Unit& unit); /* template<> */ /* inline string ProxyString ( const Unit* object ) */ -/* { return GetValueString(); } */ +/* { return getValueString(); } */ /* template<> */ /* inline Record* ProxyRecord ( const Unit* object ) */ /* { */ -/* Record* record = new Record(GetString(object)); */ -/* record->Add(GetSlot("Unit", (unsigned int*)_object)); */ +/* Record* record = new Record(getString(object)); */ +/* record->Add(getSlot("Unit", (unsigned int*)_object)); */ /* return record; */ /* } */ diff --git a/hurricane/src/hurricane/UpdateSession.cpp b/hurricane/src/hurricane/UpdateSession.cpp index 3810f54c..fb66af72 100644 --- a/hurricane/src/hurricane/UpdateSession.cpp +++ b/hurricane/src/hurricane/UpdateSession.cpp @@ -21,93 +21,93 @@ stack* UPDATOR_STACK = NULL; UpdateSession::UpdateSession() // *************************** -: Inherit() +: Inherit() { } -void UpdateSession::Delete() +void UpdateSession::destroy() // ************************* { - throw Error("Abnormal deletion of " + _TName("UpdateSession")); + throw Error("Abnormal deletion of " + _TName("UpdateSession")); } -const Name& UpdateSession::GetPropertyName() +const Name& UpdateSession::getPropertyName() // ***************************************** { - static Name NAME = _PName("UpdateSession"); - return NAME; + static Name NAME = _PName("UpdateSession"); + return NAME; } -UpdateSession* UpdateSession::_Create() +UpdateSession* UpdateSession::_create() // ************************************ { - UpdateSession* updateSession = new UpdateSession(); + UpdateSession* updateSession = new UpdateSession(); - updateSession->_PostCreate(); + updateSession->_postCreate(); - return updateSession; + return updateSession; } -void UpdateSession::_PostCreate() +void UpdateSession::_postCreate() // ****************************** { - Inherit::_PostCreate(); + Inherit::_postCreate(); - if (!UPDATOR_STACK) UPDATOR_STACK = new stack(); + if (!UPDATOR_STACK) UPDATOR_STACK = new stack(); - UPDATOR_STACK->push(this); + UPDATOR_STACK->push(this); } -void UpdateSession::_Delete() +void UpdateSession::_destroy() // ************************** { - Inherit::Delete(); + Inherit::destroy(); } -void UpdateSession::_PreDelete() +void UpdateSession::_preDestroy() // ***************************** { - if (!UPDATOR_STACK || UPDATOR_STACK->empty()) - throw Error("Invalid update session deletion : empty stack"); + if (!UPDATOR_STACK || UPDATOR_STACK->empty()) + throw Error("Invalid update session deletion : empty stack"); - if (UPDATOR_STACK->top() != this) - throw Error("Invalid update session deletion : not on top"); + if (UPDATOR_STACK->top() != this) + throw Error("Invalid update session deletion : not on top"); - UPDATOR_STACK->pop(); + UPDATOR_STACK->pop(); - for_each_dbo(owner, GetOwners()) { - if (is_a(owner)) ((Go*)owner)->Materialize(); - end_for; - } + for_each_dbo(owner, getOwners()) { + if (is_a(owner)) ((Go*)owner)->Materialize(); + end_for; + } - Inherit::_PreDelete(); + Inherit::_preDestroy(); } -string UpdateSession::_GetString() const +string UpdateSession::_getString() const // ************************************* { - return "<" + _TName("UpdateSession") + ">"; + return "<" + _TName("UpdateSession") + ">"; } -Record* UpdateSession::_GetRecord() const +Record* UpdateSession::_getRecord() const // ******************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + } + return record; } -void UpdateSession::OnCapturedBy(DBo* owner) +void UpdateSession::onCapturedBy(DBo* owner) // ***************************************** { - if (!is_a(owner)) - throw Error("Bad update session capture : not a graphic object"); + if (!is_a(owner)) + throw Error("Bad update session capture : not a graphic object"); - Inherit::OnCapturedBy(owner); + Inherit::onCapturedBy(owner); } -void UpdateSession::OnNotOwned() +void UpdateSession::onNotOwned() // ***************************** { } @@ -124,29 +124,29 @@ void Go::Invalidate(bool propagateFlag) // trace << "Invalidate(" << this << ")" << endl; // trace_in(); - if (!UPDATOR_STACK || UPDATOR_STACK->empty()) - throw Error("Can't invalidate go : empty update session stack"); + if (!UPDATOR_STACK || UPDATOR_STACK->empty()) + throw Error("Can't invalidate go : empty update session stack"); - Property* property = GetProperty(UpdateSession::GetPropertyName()); + Property* property = getProperty(UpdateSession::getPropertyName()); - if (property) { - if (!is_a(property)) - throw Error("Can't invalidate go : bad update session type"); - } - else { + if (property) { + if (!is_a(property)) + throw Error("Can't invalidate go : bad update session type"); + } + else { SlaveEntityMap::iterator it; SlaveEntityMap::iterator end; - GetCell()->_GetSlaveEntities(this,it,end); + getCell()->_getSlaveEntities(this,it,end); for(; it != end ; it++) { Go* go = dynamic_cast(it->second); if (go) go->Invalidate(propagateFlag); } - if (IsMaterialized()) { - Unmaterialize(); - Put(UPDATOR_STACK->top()); - } - } + if (IsMaterialized()) { + Unmaterialize(); + put(UPDATOR_STACK->top()); + } + } // trace << "done" << endl; // trace_out(); } @@ -162,7 +162,7 @@ void OpenUpdateSession() { // trace << "OpenUpdateSession()" << endl; // trace_in(); - UpdateSession::_Create(); + UpdateSession::_create(); } void CloseUpdateSession() @@ -171,10 +171,10 @@ void CloseUpdateSession() // trace << "CloseUpdateSession()" << endl; // trace_in(); - if (!UPDATOR_STACK || UPDATOR_STACK->empty()) - throw Error("Can't end update : empty update session stack"); + if (!UPDATOR_STACK || UPDATOR_STACK->empty()) + throw Error("Can't end update : empty update session stack"); - UPDATOR_STACK->top()->_Delete(); + UPDATOR_STACK->top()->_destroy(); // trace << "done" << endl; // trace_out(); diff --git a/hurricane/src/hurricane/UpdateSession.h b/hurricane/src/hurricane/UpdateSession.h index 96b9db04..df886da3 100644 --- a/hurricane/src/hurricane/UpdateSession.h +++ b/hurricane/src/hurricane/UpdateSession.h @@ -25,39 +25,39 @@ class UpdateSession : public SharedProperty { // Types // ***** - public: typedef SharedProperty Inherit; + public: typedef SharedProperty Inherit; // Constructors // ************ - protected: UpdateSession(); + protected: UpdateSession(); - public: virtual void Delete(); + public: virtual void destroy(); // Accessors // ********* - public: static const Name& GetPropertyName(); - public: virtual Name GetName() const {return GetPropertyName();}; + public: static const Name& getPropertyName(); + public: virtual Name getName() const {return getPropertyName();}; // Managers // ******** - public: virtual void OnCapturedBy(DBo* owner); - public: virtual void OnNotOwned(); + public: virtual void onCapturedBy(DBo* owner); + public: virtual void onNotOwned(); // Ohers // ***** - public: static UpdateSession* _Create(); - protected: virtual void _PostCreate(); + public: static UpdateSession* _create(); + protected: virtual void _postCreate(); - public: void _Delete(); - protected: virtual void _PreDelete(); + public: void _destroy(); + protected: virtual void _preDestroy(); - public: virtual string _GetTypeName() const {return _TName("UpdateSession");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("UpdateSession");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/UserGo.cpp b/hurricane/src/hurricane/UserGo.cpp index 6f031979..5cc45bfb 100644 --- a/hurricane/src/hurricane/UserGo.cpp +++ b/hurricane/src/hurricane/UserGo.cpp @@ -24,61 +24,61 @@ class UserGo_CellUserGos : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const Cell* _cell; + private: const Cell* _cell; private: DisplaySlotLocator _displaySlotLocator; - private: UserGoLocator _userGoLocator; + private: UserGoLocator _userGoLocator; - public: Locator(); - public: Locator(const Cell* cell); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + public: Locator& operator=(const Locator& locator); - public: virtual UserGo* GetElement() const; - public: virtual Hurricane::Locator* GetClone() const; + public: virtual UserGo* getElement() const; + public: virtual Hurricane::Locator* getClone() const; - public: virtual bool IsValid() const; + public: virtual bool IsValid() const; - public: virtual void Progress(); + public: virtual void Progress(); - public: virtual string _GetString() const; + public: virtual string _getString() const; - }; + }; // Attributes // ********** - private: const Cell* _cell; + private: const Cell* _cell; // Constructors // ************ - public: UserGo_CellUserGos(); - public: UserGo_CellUserGos(const Cell* cell); - public: UserGo_CellUserGos(const UserGo_CellUserGos& cellusergos); + public: UserGo_CellUserGos(); + public: UserGo_CellUserGos(const Cell* cell); + public: UserGo_CellUserGos(const UserGo_CellUserGos& cellusergos); // Operators // ********* - public: UserGo_CellUserGos& operator=(const UserGo_CellUserGos& usergos); + public: UserGo_CellUserGos& operator=(const UserGo_CellUserGos& usergos); // Accessors // ********* - public: virtual Collection* GetClone() const; - public: virtual Hurricane::Locator* GetLocator() const; + public: virtual Collection* getClone() const; + public: virtual Hurricane::Locator* getLocator() const; // Others // ****** - public: virtual string _GetString() const; + public: virtual string _getString() const; }; @@ -89,67 +89,55 @@ class UserGo_CellUserGos : public Collection { UserGo::UserGo(DisplaySlot* displaySlot) // ************************************* : Inherit() - , _displaySlot(displaySlot) + , _displaySlot(displaySlot) { - if (!_displaySlot) - throw Error("Can't Create " + _TName("UserGo") + " null displaySlot"); + if (!_displaySlot) + throw Error("Can't Create " + _TName("UserGo") + " null displaySlot"); } void UserGo::Materialize() // *********************** { - if (!IsMaterialized()) { - QuadTree& quadTree = _displaySlot->_GetQuadTree(); - quadTree.Insert(this); - GetCell()->_Fit(quadTree.GetBoundingBox()); - } + if (!IsMaterialized()) { + QuadTree& quadTree = _displaySlot->_getQuadTree(); + quadTree.Insert(this); + getCell()->_Fit(quadTree.getBoundingBox()); + } } void UserGo::Unmaterialize() // ************************* { - if (IsMaterialized()) { - QuadTree& quadTree = _displaySlot->_GetQuadTree(); - GetCell()->_Unfit(GetBoundingBox()); - quadTree.Remove(this); - } + if (IsMaterialized()) { + QuadTree& quadTree = _displaySlot->_getQuadTree(); + getCell()->_Unfit(getBoundingBox()); + quadTree.Remove(this); + } } -void UserGo::_PostCreate() -// *********************** -{ - Inherit::_PostCreate(); -} - -void UserGo::_PreDelete() -// ********************** -{ - Inherit::_PreDelete(); -} - -string UserGo::_GetString() const +string UserGo::_getString() const // ****************************** { - string s = Inherit::_GetString(); - s.insert(s.length() - 1, " " + GetString(_displaySlot->GetName())); - return s; + string s = Inherit::_getString(); + s.insert(s.length() - 1, " " + getString(_displaySlot->getName())); + return s; } -Record* UserGo::_GetRecord() const +Record* UserGo::_getRecord() const // ************************* { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("DisplaySlot", _displaySlot)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("DisplaySlot", _displaySlot)); + } + return record; } -UserGos GetUserGos(const Cell* cell) +UserGos getUserGos(const Cell* cell) // ********************************* { if (!cell) - throw Error("Null pointer on cell while getting usergos"); + throw Error("Null pointer on cell while getting usergos"); return UserGo_CellUserGos(cell); } @@ -159,53 +147,53 @@ UserGos GetUserGos(const Cell* cell) UserGo_CellUserGos::UserGo_CellUserGos() // ************************************* -: Inherit(), - _cell(NULL) +: Inherit(), + _cell(NULL) { } UserGo_CellUserGos::UserGo_CellUserGos(const Cell* cell) // ***************************************************** -: Inherit(), - _cell(cell) +: Inherit(), + _cell(cell) { } UserGo_CellUserGos::UserGo_CellUserGos(const UserGo_CellUserGos& usergos) // ********************************************************************** -: Inherit(), - _cell(usergos._cell) +: Inherit(), + _cell(usergos._cell) { } UserGo_CellUserGos& UserGo_CellUserGos::operator=(const UserGo_CellUserGos& usergos) // ********************************************************************************* { - _cell = usergos._cell; - return *this; + _cell = usergos._cell; + return *this; } -Collection* UserGo_CellUserGos::GetClone() const +Collection* UserGo_CellUserGos::getClone() const // ****************************************************** { - return new UserGo_CellUserGos(*this); + return new UserGo_CellUserGos(*this); } -Locator* UserGo_CellUserGos::GetLocator() const +Locator* UserGo_CellUserGos::getLocator() const // ***************************************************** { - return new Locator(_cell); + return new Locator(_cell); } -string UserGo_CellUserGos::_GetString() const +string UserGo_CellUserGos::_getString() const // ****************************************** { - string s = "<" + _TName("Cell::UserGos"); - if (_cell) { - s += " " + GetString(_cell); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::UserGos"); + if (_cell) { + s += " " + getString(_cell); + } + s += ">"; + return s; } @@ -216,34 +204,34 @@ string UserGo_CellUserGos::_GetString() const UserGo_CellUserGos::Locator::Locator() // **************************** -: Inherit(), - _cell(NULL), +: Inherit(), + _cell(NULL), _displaySlotLocator(), - _userGoLocator() + _userGoLocator() { } UserGo_CellUserGos::Locator::Locator(const Cell* cell) // *************************************************** -: Inherit(), - _cell(cell), +: Inherit(), + _cell(cell), _displaySlotLocator(), - _userGoLocator() + _userGoLocator() { - if (_cell) { - _displaySlotLocator = GetDisplaySlots(cell).GetLocator(); + if (_cell) { + _displaySlotLocator = getDisplaySlots(cell).getLocator(); if (_displaySlotLocator.IsValid()) { - DisplaySlot* displaySlot = _displaySlotLocator.GetElement(); - _userGoLocator = displaySlot->GetUserGos().GetLocator(); + DisplaySlot* displaySlot = _displaySlotLocator.getElement(); + _userGoLocator = displaySlot->getUserGos().getLocator(); } - } + } } UserGo_CellUserGos::Locator::Locator(const Locator& locator) // ************************************************** -: Inherit(), - _cell(locator._cell), +: Inherit(), + _cell(locator._cell), _displaySlotLocator(locator._displaySlotLocator), _userGoLocator(locator._userGoLocator) { @@ -252,55 +240,55 @@ UserGo_CellUserGos::Locator::Locator(const Locator& locator) UserGo_CellUserGos::Locator& UserGo_CellUserGos::Locator::operator=(const Locator& locator) // **************************************************************************************** { - _cell = locator._cell; + _cell = locator._cell; _displaySlotLocator = locator._displaySlotLocator; _userGoLocator =locator._userGoLocator; - return *this; + return *this; } -UserGo* UserGo_CellUserGos::Locator::GetElement() const +UserGo* UserGo_CellUserGos::Locator::getElement() const // ******************************************** { - return _userGoLocator.GetElement(); + return _userGoLocator.getElement(); } -Locator* UserGo_CellUserGos::Locator::GetClone() const +Locator* UserGo_CellUserGos::Locator::getClone() const // ************************************************************ { - return new Locator(*this); + return new Locator(*this); } bool UserGo_CellUserGos::Locator::IsValid() const // *************************************** { - return _userGoLocator.IsValid(); + return _userGoLocator.IsValid(); } void UserGo_CellUserGos::Locator::Progress() // ***************************************** { - if (_userGoLocator.IsValid()) { + if (_userGoLocator.IsValid()) { _userGoLocator.Progress(); } else if (_displaySlotLocator.IsValid()) { _displaySlotLocator.Progress(); if (_displaySlotLocator.IsValid()) { - DisplaySlot* displaySlot = _displaySlotLocator.GetElement(); - _userGoLocator = displaySlot->GetUserGos().GetLocator(); + DisplaySlot* displaySlot = _displaySlotLocator.getElement(); + _userGoLocator = displaySlot->getUserGos().getLocator(); } } } -string UserGo_CellUserGos::Locator::_GetString() const +string UserGo_CellUserGos::Locator::_getString() const // ******************************************** { - string s = "<" + _TName("Cell::UserGos::Locator"); - if (_cell) { - s += " " + GetString(_cell); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::UserGos::Locator"); + if (_cell) { + s += " " + getString(_cell); + } + s += ">"; + return s; } } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/UserGo.h b/hurricane/src/hurricane/UserGo.h index 7a7bb137..3653a3a6 100644 --- a/hurricane/src/hurricane/UserGo.h +++ b/hurricane/src/hurricane/UserGo.h @@ -27,41 +27,32 @@ class UserGo : public Go { // Types // ***** - public: typedef Go Inherit; + public: typedef Go Inherit; // Attributes // ********** - protected: DisplaySlot* _displaySlot; + protected: DisplaySlot* _displaySlot; // Constructors // ************ - protected: UserGo(DisplaySlot* displaySlot); - -// Destructor -// ********** - -// Accessors -// ********* + protected: UserGo(DisplaySlot* displaySlot); // Updators // ******** - public: virtual void Materialize(); - public: virtual void Unmaterialize(); + public: virtual void Materialize(); + public: virtual void Unmaterialize(); // Others // ****** - protected: virtual void _PostCreate(); - protected: virtual void _PreDelete(); - - public: virtual string _GetTypeName() const {return _TName("UserGo");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("UserGo");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; -UserGos GetUserGos(const Cell* cell); +UserGos getUserGos(const Cell* cell); } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/UserGos.h b/hurricane/src/hurricane/UserGos.h index e7ffe622..99450836 100644 --- a/hurricane/src/hurricane/UserGos.h +++ b/hurricane/src/hurricane/UserGos.h @@ -50,9 +50,9 @@ typedef GenericFilter UserGoFilter; #define for_each_user_go(userGo, userGos)\ /***************************************/\ {\ - UserGoLocator _locator = userGos.GetLocator();\ + UserGoLocator _locator = userGos.getLocator();\ while (_locator.IsValid()) {\ - UserGo* userGo = _locator.GetElement();\ + UserGo* userGo = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/VectorCollection.h b/hurricane/src/hurricane/VectorCollection.h index a8aed893..f614c5d5 100644 --- a/hurricane/src/hurricane/VectorCollection.h +++ b/hurricane/src/hurricane/VectorCollection.h @@ -23,149 +23,149 @@ template class VectorCollection : public Collection { // Types // ***** - public: typedef Collection Inherit; + public: typedef Collection Inherit; - public: typedef vector ElementVector; + public: typedef vector ElementVector; - public: class Locator : public Hurricane::Locator { - // ******************************************************* + public: class Locator : public Hurricane::Locator { + // ******************************************************* - public: typedef Hurricane::Locator Inherit; + public: typedef Hurricane::Locator Inherit; - private: const ElementVector* _elementVector; - private: typename ElementVector::const_iterator _iterator; // AD + private: const ElementVector* _elementVector; + private: typename ElementVector::const_iterator _iterator; // AD - public: Locator(const ElementVector* elementVector) - // ************************************************ - : Inherit(), - _elementVector(elementVector), - _iterator() - { - if (_elementVector) _iterator = _elementVector->begin(); - }; + public: Locator(const ElementVector* elementVector) + // ************************************************ + : Inherit(), + _elementVector(elementVector), + _iterator() + { + if (_elementVector) _iterator = _elementVector->begin(); + }; - public: virtual Element GetElement() const - // *************************************** - { - return (IsValid()) ? *_iterator : Element(); - }; + public: virtual Element getElement() const + // *************************************** + { + return (IsValid()) ? *_iterator : Element(); + }; - public: virtual Hurricane::Locator* GetClone() const - // ********************************************************** - { - return new Locator(_elementVector); - }; + public: virtual Hurricane::Locator* getClone() const + // ********************************************************** + { + return new Locator(_elementVector); + }; - public: virtual bool IsValid() const - // ********************************* - { - return (_elementVector && (_iterator != _elementVector->end())); - }; + public: virtual bool IsValid() const + // ********************************* + { + return (_elementVector && (_iterator != _elementVector->end())); + }; - public: virtual void Progress() - // **************************** - { - ++_iterator; - }; + public: virtual void Progress() + // **************************** + { + ++_iterator; + }; - }; + }; // Attributes // ********** - private: const ElementVector* _elementVector; + private: const ElementVector* _elementVector; // Constructors // ************ - public: VectorCollection(const ElementVector* elementVector = NULL) - // **************************************************************** - : Inherit(), - _elementVector(elementVector) - { - }; + public: VectorCollection(const ElementVector* elementVector = NULL) + // **************************************************************** + : Inherit(), + _elementVector(elementVector) + { + }; - public: VectorCollection(const ElementVector& elementVector) - // ********************************************************* - : Inherit(), - _elementVector(&elementVector) - { - }; + public: VectorCollection(const ElementVector& elementVector) + // ********************************************************* + : Inherit(), + _elementVector(&elementVector) + { + }; - public: VectorCollection(const VectorCollection& vectorCollection) - // *************************************************************** - : Inherit(), - _elementVector(vectorCollection._elementVector) - { - }; + public: VectorCollection(const VectorCollection& vectorCollection) + // *************************************************************** + : Inherit(), + _elementVector(vectorCollection._elementVector) + { + }; // Operators // ********* - public: VectorCollection& operator=(const VectorCollection& vectorCollection) - // ************************************************************************** - { - _elementVector = vectorCollection._elementVector; - return *this; - }; + public: VectorCollection& operator=(const VectorCollection& vectorCollection) + // ************************************************************************** + { + _elementVector = vectorCollection._elementVector; + return *this; + }; // Accessors // ********* - public: virtual Collection* GetClone() const - // ************************************************** - { - return new VectorCollection(*this); - } + public: virtual Collection* getClone() const + // ************************************************** + { + return new VectorCollection(*this); + } - public: virtual Hurricane::Locator* GetLocator() const - // ************************************************************ - { - // return (_elementVector) ? new Locator(_elementVector) : NULL; - // V3 - return (_elementVector) ? new Locator(_elementVector) : NULL; - } + public: virtual Hurricane::Locator* getLocator() const + // ************************************************************ + { + // return (_elementVector) ? new Locator(_elementVector) : NULL; + // V3 + return (_elementVector) ? new Locator(_elementVector) : NULL; + } - public: virtual unsigned GetSize() const - // ************************************* - { - return (_elementVector) ? _elementVector->size() : 0; - }; + public: virtual unsigned getSize() const + // ************************************* + { + return (_elementVector) ? _elementVector->size() : 0; + }; // Others // ****** - public: virtual string _GetTypeName() const - // ************************************** + public: virtual string _getTypeName() const + // ************************************** { return _TName("VectorCollection"); }; - public: virtual string _GetString() const - // ************************************** - { - if (!_elementVector) - return "<" + _GetTypeName() + " unbound>"; - else { - if (_elementVector->empty()) - return "<" + _GetTypeName() + " empty>"; - else - return "<" + _GetTypeName() + " " + GetString(_elementVector->size()) + ">"; - } - }; + public: virtual string _getString() const + // ************************************** + { + if (!_elementVector) + return "<" + _getTypeName() + " unbound>"; + else { + if (_elementVector->empty()) + return "<" + _getTypeName() + " empty>"; + else + return "<" + _getTypeName() + " " + getString(_elementVector->size()) + ">"; + } + }; - public: Record* _GetRecord() const + public: Record* _getRecord() const // ************************* { H::Record* record = NULL; if (!_elementVector->empty()) { - record = new Record(_GetString()); - unsigned n = 1; - typename vector::const_iterator iterator = _elementVector->begin(); // AD - while (iterator != _elementVector->end()) { - record->Add(GetSlot(GetString(n++), *iterator)); + record = new Record(_getString()); + unsigned n = 1; + typename vector::const_iterator iterator = _elementVector->begin(); // AD + while (iterator != _elementVector->end()) { + record->Add(getSlot(getString(n++), *iterator)); ++iterator; - } + } } return record; } @@ -179,17 +179,17 @@ template class VectorCollection : public Collection { // **************************************************************************************************** template - inline GenericCollection GetCollection(const vector& elementVector) + inline GenericCollection getCollection(const vector& elementVector) // ************************************************************************************* { - return VectorCollection(elementVector); + return VectorCollection(elementVector); } template - inline GenericCollection GetCollection(const vector* elementVector) + inline GenericCollection getCollection(const vector* elementVector) // ************************************************************************************* { - return VectorCollection(elementVector); + return VectorCollection(elementVector); } diff --git a/hurricane/src/hurricane/Vertical.cpp b/hurricane/src/hurricane/Vertical.cpp index d385945b..c4b06956 100644 --- a/hurricane/src/hurricane/Vertical.cpp +++ b/hurricane/src/hurricane/Vertical.cpp @@ -22,149 +22,149 @@ namespace Hurricane { Vertical::Vertical(Net* net, Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget) // **************************************************************************************************** : Inherit(net, source, target, layer, width), - _x(x), - _dySource(dySource), - _dyTarget(dyTarget) + _x(x), + _dySource(dySource), + _dyTarget(dyTarget) { } Vertical* Vertical::Create(Net* net, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget) // **************************************************************************************************** { - if (!net) - throw Error("Can't create " + _TName("Vertical") + " : null net"); + if (!net) + throw Error("Can't create " + _TName("Vertical") + " : null net"); - Vertical* vertical = new Vertical(net, NULL, NULL, layer, x, width, dySource, dyTarget); + Vertical* vertical = new Vertical(net, NULL, NULL, layer, x, width, dySource, dyTarget); - vertical->_PostCreate(); + vertical->_postCreate(); - return vertical; + return vertical; } Vertical* Vertical::Create(Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget) // **************************************************************************************************** { - if (!source) - throw Error("Can't create " + _TName("Vertical") + " : null source"); + if (!source) + throw Error("Can't create " + _TName("Vertical") + " : null source"); - if (!target) - throw Error("Can't create " + _TName("Vertical") + " : null target"); + if (!target) + throw Error("Can't create " + _TName("Vertical") + " : null target"); - Vertical* vertical = - new Vertical(source->GetNet(), source, target, layer, x, width, dySource, dyTarget); + Vertical* vertical = + new Vertical(source->getNet(), source, target, layer, x, width, dySource, dyTarget); - vertical->_PostCreate(); + vertical->_postCreate(); - return vertical; + return vertical; } -Box Vertical::GetBoundingBox() const +Box Vertical::getBoundingBox() const // ********************************* { - Unit size = GetHalfWidth() + _GetSize(); - Unit extention = _GetExtention(); + Unit size = getHalfWidth() + _getSize(); + Unit extention = _getExtention(); - return Box(_x, GetSourceY(), _x, GetTargetY()).inflate(size, extention); + return Box(_x, getSourceY(), _x, getTargetY()).inflate(size, extention); } -Box Vertical::GetBoundingBox(const BasicLayer* basicLayer) const +Box Vertical::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(_x, GetSourceY(), _x, GetTargetY()).inflate(size, extention); + return Box(_x, getSourceY(), _x, getTargetY()).inflate(size, extention); } -Unit Vertical::GetSourceY() const +Unit Vertical::getSourceY() const // ****************************** { - Component* source = GetSource(); - return (source) ? source->GetY() + _dySource : _dySource; + Component* source = getSource(); + return (source) ? source->getY() + _dySource : _dySource; } -Unit Vertical::GetTargetY() const +Unit Vertical::getTargetY() const // ****************************** { - Component* target = GetTarget(); - return (target) ? target->GetY() + _dyTarget : _dyTarget; + Component* target = getTarget(); + return (target) ? target->getY() + _dyTarget : _dyTarget; } -Unit Vertical::GetLength() const +Unit Vertical::getLength() const // ***************************** { - return abs(GetSourceY() - GetTargetY()); + return abs(getSourceY() - getTargetY()); } -Point Vertical::GetCenter() const +Point Vertical::getCenter() const // ******************************* { - return Point ( GetX(), (GetSourceY()+GetTargetY())/2 ); + return Point ( getX(), (getSourceY()+getTargetY())/2 ); } void Vertical::Translate(const Unit& dx, const Unit& dy) // ***************************************************** { - if (dx != 0) { - Invalidate(true); - _x += dx; - } + if (dx != 0) { + Invalidate(true); + _x += dx; + } } void Vertical::SetX(const Unit& x) // ******************************* { - if (x != _x) { - Invalidate(true); - _x = x; - } + if (x != _x) { + Invalidate(true); + _x = x; + } } void Vertical::SetDySource(const Unit& dySource) // ********************************************* { - if (dySource != _dySource) { - Invalidate(false); - _dySource = dySource; - } + if (dySource != _dySource) { + Invalidate(false); + _dySource = dySource; + } } void Vertical::SetDyTarget(const Unit& dyTarget) // ********************************************* { - if (dyTarget != _dyTarget) { - Invalidate(false); - _dyTarget = dyTarget; - } + if (dyTarget != _dyTarget) { + Invalidate(false); + _dyTarget = dyTarget; + } } void Vertical::Translate(const Unit& dx) // ************************************* { - if (dx != 0) { - Invalidate(true); - _x += dx; - } + if (dx != 0) { + Invalidate(true); + _x += dx; + } } -string Vertical::_GetString() const +string Vertical::_getString() const // ******************************** { - return Inherit::_GetString(); + return Inherit::_getString(); } -Record* Vertical::_GetRecord() const +Record* Vertical::_getRecord() const // *************************** { - Record* record = Inherit::_GetRecord(); - if (record) { - record->Add(GetSlot("X", &_x)); - record->Add(GetSlot("DySource", &_dySource)); - record->Add(GetSlot("DyTarget", &_dyTarget)); - } - return record; + Record* record = Inherit::_getRecord(); + if (record) { + record->Add(getSlot("X", &_x)); + record->Add(getSlot("DySource", &_dySource)); + record->Add(getSlot("DyTarget", &_dyTarget)); + } + return record; } } // End of Hurricane namespace. diff --git a/hurricane/src/hurricane/Vertical.h b/hurricane/src/hurricane/Vertical.h index d74dd00a..87cca7f7 100644 --- a/hurricane/src/hurricane/Vertical.h +++ b/hurricane/src/hurricane/Vertical.h @@ -24,54 +24,54 @@ class Vertical : public Segment { // Types // ***** - public: typedef Segment Inherit; + public: typedef Segment Inherit; // Attributes // ********** - private: Unit _x; - private: Unit _dySource; - private: Unit _dyTarget; + private: Unit _x; + private: Unit _dySource; + private: Unit _dyTarget; // Constructors // ************ - protected: Vertical(Net* net, Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); + protected: Vertical(Net* net, Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); - public: static Vertical* Create(Net* net, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); - public: static Vertical* Create(Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); + public: static Vertical* Create(Net* net, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); + public: static Vertical* Create(Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0); // Accessors // ********* - public: virtual Unit GetX() const {return _x;}; - public: virtual Point GetCenter() const; - public: virtual Box GetBoundingBox() const; - public: virtual Box GetBoundingBox(const BasicLayer* basicLayer) const; - public: virtual Unit GetSourceX() const {return GetX();}; - public: virtual Unit GetSourceY() const; - public: virtual Unit GetTargetX() const {return GetX();}; - public: virtual Unit GetTargetY() const; - public: virtual Unit GetLength() const; - public: const Unit& GetDySource() const {return _dySource;}; - public: const Unit& GetDyTarget() const {return _dyTarget;}; + public: virtual Unit getX() const {return _x;}; + public: virtual Point getCenter() const; + public: virtual Box getBoundingBox() const; + public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const; + public: virtual Unit getSourceX() const {return getX();}; + public: virtual Unit getSourceY() const; + public: virtual Unit getTargetX() const {return getX();}; + public: virtual Unit getTargetY() const; + public: virtual Unit getLength() const; + public: const Unit& getDySource() const {return _dySource;}; + public: const Unit& getDyTarget() const {return _dyTarget;}; // Updators // ******** - public: virtual void Translate(const Unit& dx, const Unit& dy); + public: virtual void Translate(const Unit& dx, const Unit& dy); - public: void SetX(const Unit& x); - public: void SetDySource(const Unit& dySource); - public: void SetDyTarget(const Unit& dyTarget); - public: void Translate(const Unit& dx); + public: void SetX(const Unit& x); + public: void SetDySource(const Unit& dySource); + public: void SetDyTarget(const Unit& dyTarget); + public: void Translate(const Unit& dx); // Others // ****** - public: virtual string _GetTypeName() const {return _TName("Vertical");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; + public: virtual string _getTypeName() const {return _TName("Vertical");}; + public: virtual string _getString() const; + public: virtual Record* _getRecord() const; }; diff --git a/hurricane/src/hurricane/Verticals.h b/hurricane/src/hurricane/Verticals.h index ebb9cb3c..8d7f914b 100644 --- a/hurricane/src/hurricane/Verticals.h +++ b/hurricane/src/hurricane/Verticals.h @@ -46,9 +46,9 @@ typedef GenericFilter VerticalFilter; #define for_each_vertical(vertical, verticals)\ /*********************************************/\ {\ - VerticalLocator _locator = verticals.GetLocator();\ + VerticalLocator _locator = verticals.getLocator();\ while (_locator.IsValid()) {\ - Vertical* vertical = _locator.GetElement();\ + Vertical* vertical = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Views.h b/hurricane/src/hurricane/Views.h index 406ed7f8..02c550ff 100644 --- a/hurricane/src/hurricane/Views.h +++ b/hurricane/src/hurricane/Views.h @@ -46,9 +46,9 @@ typedef GenericFilter ViewFilter; #define for_each_view(view, views)\ /*********************************/\ {\ - ViewLocator _locator = views.GetLocator();\ + ViewLocator _locator = views.getLocator();\ while (_locator.IsValid()) {\ - View* view = _locator.GetElement();\ + View* view = _locator.getElement();\ _locator.Progress(); diff --git a/hurricane/src/hurricane/Warning.cpp b/hurricane/src/hurricane/Warning.cpp index 2c0f2d3a..3683ffd2 100644 --- a/hurricane/src/hurricane/Warning.cpp +++ b/hurricane/src/hurricane/Warning.cpp @@ -16,34 +16,34 @@ namespace Hurricane { Warning::Warning(const string& reason, int code) // ********************************************* -: Inherit(), - _reason(reason), - _code(code) +: Inherit(), + _reason(reason), + _code(code) { } Warning::Warning(const Warning& warning) // ************************************* -: Inherit(), - _reason(warning._reason), - _code(warning._code) +: Inherit(), + _reason(warning._reason), + _code(warning._code) { } Warning& Warning::operator=(const Warning& warning) // ************************************************ { - _reason = warning._reason; - _code = warning._code; - return *this; + _reason = warning._reason; + _code = warning._code; + return *this; } -string Warning::_GetString() const +string Warning::_getString() const // ******************************* { - if (!_code) return "[WARNING] " + _reason; + if (!_code) return "[WARNING] " + _reason; - return "[WARNING:" + GetString(_code) + "] " + _reason; + return "[WARNING:" + getString(_code) + "] " + _reason; } diff --git a/hurricane/src/hurricane/Warning.h b/hurricane/src/hurricane/Warning.h index 2294a9e0..6798e7c8 100644 --- a/hurricane/src/hurricane/Warning.h +++ b/hurricane/src/hurricane/Warning.h @@ -23,37 +23,37 @@ class Warning : public Exception { // Types // ***** - public: typedef Exception Inherit; + public: typedef Exception Inherit; // Attributes // ********** - private: string _reason; - private: int _code; + private: string _reason; + private: int _code; // Constructors // ************ - public: Warning(const string& reason, int code = 0); + public: Warning(const string& reason, int code = 0); - public: Warning(const Warning& warning); + public: Warning(const Warning& warning); // Operators // ********* - public: Warning& operator=(const Warning& warning); + public: Warning& operator=(const Warning& warning); // 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("Warning"); }; - public: virtual string _GetString() const; + public: virtual string _getTypeName() const { return _TName("Warning"); }; + public: virtual string _getString() const; }; diff --git a/hurricane/src/pyext/ProxyProperty.cpp b/hurricane/src/pyext/ProxyProperty.cpp index cfac7d81..d6a804d3 100644 --- a/hurricane/src/pyext/ProxyProperty.cpp +++ b/hurricane/src/pyext/ProxyProperty.cpp @@ -124,7 +124,7 @@ ProxyProperty::ProxyProperty ( void* shadow ) // ------------------------------------------------------------------- // Constructor : "ProxyProperty::Create ()". -ProxyProperty* ProxyProperty::Create ( void* shadow ) +ProxyProperty* ProxyProperty::create ( void* shadow ) { ProxyProperty* property = new ProxyProperty ( shadow ); @@ -138,11 +138,10 @@ ProxyProperty* ProxyProperty::Create ( void* shadow ) // ------------------------------------------------------------------- -// Destructor : "ProxyProperty::_PreDelete ()". +// Destructor : "ProxyProperty::_preDestroy ()". -void ProxyProperty::_PreDelete () -{ - if ( _owner ) _owner->_OnDeleted ( this ); +void ProxyProperty::_preDestroy () { + if ( _owner ) _owner->_onDeleted ( this ); trace << "ProxyProperty::_owner := " << hex << (void*)_owner << endl; @@ -159,12 +158,11 @@ void ProxyProperty::_PreDelete () // ------------------------------------------------------------------- -// Method : "ProxyProperty::OnCapturedBy ()". +// Method : "ProxyProperty::onCapturedBy ()". -void ProxyProperty::OnCapturedBy ( DBo* owner ) -{ +void ProxyProperty::onCapturedBy ( DBo* owner ) { if ( ( _owner != NULL ) && ( _owner != owner ) ) - throw Error ( GetString(this).c_str() ); + throw Error ( getString(this).c_str() ); _owner = owner; } @@ -173,22 +171,20 @@ void ProxyProperty::OnCapturedBy ( DBo* owner ) // ------------------------------------------------------------------- -// Method : "ProxyProperty::OnReleasedBy ()". +// Method : "ProxyProperty::onReleasedBy ()". -void ProxyProperty::OnReleasedBy ( DBo* owner ) -{ - if ( _owner == owner ) OnNotOwned (); +void ProxyProperty::onReleasedBy ( DBo* owner ) { + if ( _owner == owner ) onNotOwned (); } // ------------------------------------------------------------------- -// Method : "ProxyProperty::OnNotOwned ()". +// Method : "ProxyProperty::onNotOwned ()". -void ProxyProperty::OnNotOwned () -{ - Delete (); +void ProxyProperty::onNotOwned () { + destroy (); } @@ -197,8 +193,7 @@ void ProxyProperty::OnNotOwned () // ------------------------------------------------------------------- // Method : "ProxyProperty::SetOffset ()". -void ProxyProperty::SetOffset ( int offset ) -{ +void ProxyProperty::SetOffset ( int offset ) { if ( _offset >= 0 ) throw Error ( twiceSetOffset ); _offset = offset; @@ -208,13 +203,12 @@ void ProxyProperty::SetOffset ( int offset ) // ------------------------------------------------------------------- -// Method : "ProxyProperty::_GetString()". +// Method : "ProxyProperty::_getString()". -string ProxyProperty::_GetString () const -{ +string ProxyProperty::_getString () const { ostringstream os; - os << "<" << _GetTypeName() << " "; + os << "<" << _getTypeName() << " "; if ( _owner ) os << hex << (void*)_owner << " "; else os << "[not owned] "; os << _shadow << ">"; @@ -226,15 +220,15 @@ string ProxyProperty::_GetString () const // ------------------------------------------------------------------- -// Method : "ProxyProperty::_GetRecord()". +// Method : "ProxyProperty::_getRecord()". -Record* ProxyProperty::_GetRecord () const +Record* ProxyProperty::_getRecord () const { - Record* record = Property::_GetRecord (); + Record* record = Property::_getRecord (); if ( record != NULL ) { - record->Add ( GetSlot ( "_owner" , _owner ) ); - record->Add ( GetSlot ( "_shadow", _shadow ) ); + record->Add ( getSlot ( "_owner" , _owner ) ); + record->Add ( getSlot ( "_shadow", _shadow ) ); } return ( record ); diff --git a/hurricane/src/pyext/ProxyProperty.h b/hurricane/src/pyext/ProxyProperty.h index 603c2429..cc1b9864 100644 --- a/hurricane/src/pyext/ProxyProperty.h +++ b/hurricane/src/pyext/ProxyProperty.h @@ -53,12 +53,12 @@ -# ifndef __PROXYPROPERTY__ -# define __PROXYPROPERTY__ +#ifndef __PROXYPROPERTY__ +#define __PROXYPROPERTY__ -# include "DBo.h" -# include "Property.h" +#include "DBo.h" +#include "Property.h" namespace Isobar { @@ -72,10 +72,10 @@ using namespace Hurricane; // ------------------------------------------------------------------- // Miscellaneous. -# define F_PY_OWNED ( 1 << 0 ) +#define F_PY_OWNED ( 1 << 0 ) -# define CHECK_OFFSET(PY_STRUCT) \ - if ( ProxyProperty::GetOffset() < 0 ) \ +#define CHECK_OFFSET(PY_STRUCT) \ + if ( ProxyProperty::getOffset() < 0 ) \ ProxyProperty::SetOffset ( (unsigned long)(&(PY_STRUCT->ACCESS_OBJECT)) \ - (unsigned long)PY_STRUCT ); @@ -98,31 +98,31 @@ using namespace Hurricane; protected: ProxyProperty ( void* _shadow ); private: ProxyProperty ( const ProxyProperty& ); private: ProxyProperty& operator= ( const ProxyProperty& ); - public: static ProxyProperty* Create ( void* _shadow=NULL ); + public: static ProxyProperty* create ( void* _shadow=NULL ); // Accessors. - public: DBo* GetOwner () const { return ( _owner ); }; - public: void* GetShadow () const { return ( _shadow ); }; - public: void* GetShadowMember () const { return ( (void*)((unsigned long)_shadow+_offset) ); }; + public: DBo* getOwner () const { return ( _owner ); }; + public: void* getShadow () const { return ( _shadow ); }; + public: void* getShadowMember () const { return ( (void*)((unsigned long)_shadow+_offset) ); }; public: template - DBoType* GetAsType () { return ( dynamic_cast(_owner) ); }; + DBoType* getAsType () { return ( dynamic_cast(_owner) ); }; // Static methods. - public: static int GetOffset () { return ( _offset ); }; + public: static int getOffset () { return ( _offset ); }; public: static void SetOffset ( int offset ); // Property Managment. - public: static const Name &GetPropertyName () { return ( _name ); } - public: virtual Name GetName () const { return (GetPropertyName()); } - public: virtual void OnCapturedBy ( DBo* owner ); - public: virtual void OnReleasedBy ( DBo* owner ); - public: virtual void OnNotOwned (); - protected: virtual void _PreDelete (); + public: static const Name &getPropertyName () { return ( _name ); } + public: virtual Name getName () const { return (getPropertyName()); } + public: virtual void onCapturedBy ( DBo* owner ); + public: virtual void onReleasedBy ( DBo* owner ); + public: virtual void onNotOwned (); + protected: virtual void _preDestroy (); // Hurricane Managment. - public: virtual string _GetString () const; - public: virtual Record* _GetRecord () const; - public: virtual string _GetTypeName () const { return _TName("ProxyProperty"); }; + public: virtual string _getString () const; + public: virtual Record* _getRecord () const; + public: virtual string _getTypeName () const { return _TName("ProxyProperty"); }; }; @@ -136,4 +136,4 @@ SetNestedSlotAdapter(Isobar::ProxyProperty) -# endif +#endif diff --git a/hurricane/src/pyext/PyBox.cpp b/hurricane/src/pyext/PyBox.cpp index 591ee628..66df67a3 100644 --- a/hurricane/src/pyext/PyBox.cpp +++ b/hurricane/src/pyext/PyBox.cpp @@ -52,8 +52,8 @@ -# include "PyPoint.h" -# include "PyBox.h" +#include "PyPoint.h" +#include "PyBox.h" namespace Isobar { @@ -80,16 +80,16 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyBox_GetXMin ,getXMin ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetYMin ,getYMin ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetXMax ,getXMax ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetYMax ,getYMax ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetXCenter ,getXCenter ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetYCenter ,getYCenter ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetWidth ,getWidth ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetHalfWidth ,getHalfWidth ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetHeight ,getHeight ,PyBox,Box) - DirectGetLongAttribute(PyBox_GetHalfHeight,getHalfHeight,PyBox,Box) + DirectGetLongAttribute(PyBox_getXMin ,getXMin ,PyBox,Box) + DirectGetLongAttribute(PyBox_getYMin ,getYMin ,PyBox,Box) + DirectGetLongAttribute(PyBox_getXMax ,getXMax ,PyBox,Box) + DirectGetLongAttribute(PyBox_getYMax ,getYMax ,PyBox,Box) + DirectGetLongAttribute(PyBox_getXCenter ,getXCenter ,PyBox,Box) + DirectGetLongAttribute(PyBox_getYCenter ,getYCenter ,PyBox,Box) + DirectGetLongAttribute(PyBox_getWidth ,getWidth ,PyBox,Box) + DirectGetLongAttribute(PyBox_getHalfWidth ,getHalfWidth ,PyBox,Box) + DirectGetLongAttribute(PyBox_getHeight ,getHeight ,PyBox,Box) + DirectGetLongAttribute(PyBox_getHalfHeight,getHalfHeight,PyBox,Box) // Standart Predicates (Attributes). @@ -98,18 +98,17 @@ extern "C" { DirectGetBoolAttribute(PyBox_IsPonctual,isPonctual,PyBox,Box) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyBox_Delete,PyBox) + // Standart Destroy (Attribute). + DirectDestroyAttribute(PyBox_destroy, PyBox) // --------------------------------------------------------------- - // Attribute Method : "PyBox_GetCenter ()" + // Attribute Method : "PyBox_getCenter ()" - static PyObject* PyBox_GetCenter ( PyBox *self ) - { - trace << "PyBox_GetCenter()" << endl; + static PyObject* PyBox_getCenter ( PyBox *self ) { + trace << "PyBox_getCenter()" << endl; METHOD_HEAD ( "Box.Center()" ) @@ -128,16 +127,16 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyBox_GetUnion ()" + // Attribute Method : "PyBox_getUnion ()" - static PyObject* PyBox_GetUnion ( PyBox *self, PyObject* args ) + static PyObject* PyBox_getUnion ( PyBox *self, PyObject* args ) { - trace << "PyBox_GetUnion()" << endl; + trace << "PyBox_getUnion()" << endl; - METHOD_HEAD ( "Box.GetUnion()" ) + METHOD_HEAD ( "Box.getUnion()" ) PyBox* otherPyBox; - if ( ! ParseOneArg( "Box.GetUnion", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); + if ( ! ParseOneArg( "Box.getUnion", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); PyBox* unionPyBox = PyObject_NEW ( PyBox, &PyTypeBox ); if (unionPyBox == NULL) { return NULL; } @@ -154,16 +153,16 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyBox_GetIntersection ()" + // Attribute Method : "PyBox_getIntersection ()" - static PyObject* PyBox_GetIntersection ( PyBox *self, PyObject* args ) + static PyObject* PyBox_getIntersection ( PyBox *self, PyObject* args ) { - trace << "PyBox_GetIntersection()" << endl; + trace << "PyBox_getIntersection()" << endl; - METHOD_HEAD ( "Box.GetIntersection()" ) + METHOD_HEAD ( "Box.getIntersection()" ) PyBox* otherPyBox; - if ( ! ParseOneArg ( "Box.GetIntersection", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); + if ( ! ParseOneArg ( "Box.getIntersection", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); PyBox* intersectionPyBox = PyObject_NEW ( PyBox, &PyTypeBox ); if (intersectionPyBox == NULL) { return NULL; } @@ -198,9 +197,9 @@ extern "C" { if ( ! PyArg_ParseTuple(args,"|O&O&:Box.Contains",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == BOX_ARG ) { result = box->contains ( *PYBOX_O(arg0) ); } - else if ( __cs.GetObjectIds() == POINT_ARG ) { result = box->contains ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { result = box->contains ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == BOX_ARG ) { result = box->contains ( *PYBOX_O(arg0) ); } + else if ( __cs.getObjectIds() == POINT_ARG ) { result = box->contains ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { result = box->contains ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Box.Contains constructor." ); @@ -248,7 +247,7 @@ extern "C" { PyBox* otherPyBox; HTRY - if ( ! ParseOneArg ( "Box.GetIsConstrainedBy", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); + if ( ! ParseOneArg ( "Box.getIsConstrainedBy", args, BOX_ARG, (PyObject**)&otherPyBox ) ) return ( NULL ); HCATCH return ( Py_BuildValue("i",(long)box->isConstrainedBy(*PYBOX_O(otherPyBox))) ); @@ -299,10 +298,10 @@ extern "C" { if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Box.Inflate",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == INT_ARG ) { box->inflate ( PyInt_AsLong(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { box->inflate ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == INT_ARG ) { box->inflate ( PyInt_AsLong(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { box->inflate ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } - else if ( __cs.GetObjectIds() == INTS4_ARG ) { box->inflate ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS4_ARG ) { box->inflate ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); } @@ -341,11 +340,11 @@ extern "C" { if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Box.Merge",Converter,&arg0,Converter,&arg1,Converter,&arg2,Converter,&arg3) ) return ( NULL ); - if ( __cs.GetObjectIds() == POINT_ARG ) { box->merge ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == BOX_ARG ) { box->merge ( *PYBOX_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { box->merge ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == POINT_ARG ) { box->merge ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == BOX_ARG ) { box->merge ( *PYBOX_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { box->merge ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } - else if ( __cs.GetObjectIds() == INTS4_ARG ) { box->merge ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS4_ARG ) { box->merge ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); } @@ -389,19 +388,19 @@ extern "C" { // PyBox Attribute Method table. PyMethodDef PyBox_Methods[] = - { { "GetXMin" , (PyCFunction)PyBox_GetXMin , METH_NOARGS , "Return the XMin value." } - , { "GetYMin" , (PyCFunction)PyBox_GetYMin , METH_NOARGS , "Return the YMin value." } - , { "GetXMax" , (PyCFunction)PyBox_GetXMax , METH_NOARGS , "Return the XMax value." } - , { "GetYMax" , (PyCFunction)PyBox_GetYMax , METH_NOARGS , "Return the YMax value." } - , { "GetXCenter" , (PyCFunction)PyBox_GetXCenter , METH_NOARGS , "Return the X box center value." } - , { "GetYCenter" , (PyCFunction)PyBox_GetYCenter , METH_NOARGS , "Return the Y box center value." } - , { "GetCenter" , (PyCFunction)PyBox_GetCenter , METH_NOARGS , "Return the box center Point." } - , { "GetWidth" , (PyCFunction)PyBox_GetWidth , METH_NOARGS , "Return the box width." } - , { "GetHalfWidth" , (PyCFunction)PyBox_GetHalfWidth , METH_NOARGS , "Return the box half width." } - , { "GetHeight" , (PyCFunction)PyBox_GetHeight , METH_NOARGS , "Return the box height." } - , { "GetHalfHeight" , (PyCFunction)PyBox_GetHalfHeight , METH_NOARGS , "Return the box half height." } - , { "GetUnion" , (PyCFunction)PyBox_GetUnion , METH_VARARGS, "Return the smallest enclosing box." } - , { "GetIntersection", (PyCFunction)PyBox_GetIntersection, METH_VARARGS, "Return the overlapping area." } + { { "getXMin" , (PyCFunction)PyBox_getXMin , METH_NOARGS , "Return the XMin value." } + , { "getYMin" , (PyCFunction)PyBox_getYMin , METH_NOARGS , "Return the YMin value." } + , { "getXMax" , (PyCFunction)PyBox_getXMax , METH_NOARGS , "Return the XMax value." } + , { "getYMax" , (PyCFunction)PyBox_getYMax , METH_NOARGS , "Return the YMax value." } + , { "getXCenter" , (PyCFunction)PyBox_getXCenter , METH_NOARGS , "Return the X box center value." } + , { "getYCenter" , (PyCFunction)PyBox_getYCenter , METH_NOARGS , "Return the Y box center value." } + , { "getCenter" , (PyCFunction)PyBox_getCenter , METH_NOARGS , "Return the box center Point." } + , { "getWidth" , (PyCFunction)PyBox_getWidth , METH_NOARGS , "Return the box width." } + , { "getHalfWidth" , (PyCFunction)PyBox_getHalfWidth , METH_NOARGS , "Return the box half width." } + , { "getHeight" , (PyCFunction)PyBox_getHeight , METH_NOARGS , "Return the box height." } + , { "getHalfHeight" , (PyCFunction)PyBox_getHalfHeight , METH_NOARGS , "Return the box half height." } + , { "getUnion" , (PyCFunction)PyBox_getUnion , METH_VARARGS, "Return the smallest enclosing box." } + , { "getIntersection", (PyCFunction)PyBox_getIntersection, METH_VARARGS, "Return the overlapping area." } , { "IsEmpty" , (PyCFunction)PyBox_IsEmpty , METH_NOARGS , "Return true if the box is empty." } , { "IsFlat" , (PyCFunction)PyBox_IsFlat , METH_NOARGS , "Return true if the box is flat." } , { "IsPonctual" , (PyCFunction)PyBox_IsPonctual , METH_NOARGS , "Return true if the box reduced to a point." } @@ -412,8 +411,8 @@ extern "C" { , { "Inflate" , (PyCFunction)PyBox_Inflate , METH_VARARGS, "Expand the box to contains the arguments." } , { "Merge" , (PyCFunction)PyBox_Merge , METH_VARARGS, "Expand or contract the box to contains the arguments." } , { "Translate" , (PyCFunction)PyBox_Translate , METH_VARARGS, "Translate the box od dx ans dy." } - , { "Delete" , (PyCFunction)PyBox_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyBox_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -437,14 +436,14 @@ extern "C" { ,Converter,&arg3 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == NO_ARG ) { box = new Box (); } - else if ( __cs.GetObjectIds() == POINT_ARG ) { box = new Box ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == BOX_ARG ) { box = new Box ( *PYBOX_O(arg0) ); } - else if ( __cs.GetObjectIds() == POINTS2_ARG ) { box = new Box ( *PYPOINT_O(arg0) + if ( __cs.getObjectIds() == NO_ARG ) { box = new Box (); } + else if ( __cs.getObjectIds() == POINT_ARG ) { box = new Box ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == BOX_ARG ) { box = new Box ( *PYBOX_O(arg0) ); } + else if ( __cs.getObjectIds() == POINTS2_ARG ) { box = new Box ( *PYPOINT_O(arg0) , *PYPOINT_O(arg1) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { box = new Box ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS2_ARG ) { box = new Box ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } - else if ( __cs.GetObjectIds() == INTS4_ARG ) { box = new Box ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS4_ARG ) { box = new Box ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); } diff --git a/hurricane/src/pyext/PyCell.cpp b/hurricane/src/pyext/PyCell.cpp index e1776c58..7c4527d8 100644 --- a/hurricane/src/pyext/PyCell.cpp +++ b/hurricane/src/pyext/PyCell.cpp @@ -93,22 +93,22 @@ extern "C" { // Standart Delete (Attribute). - DBoDeleteAttribute(PyCell_Delete,PyCell) + DBoDestroyAttribute(PyCell_destroy,PyCell) // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetLibrary ()" + // Attribute Method : "PyCell_getLibrary ()" - static PyObject* PyCell_GetLibrary ( PyCell *self ) { - trace << "PyCell_GetLibrary ()" << endl; + static PyObject* PyCell_getLibrary ( PyCell *self ) { + trace << "PyCell_getLibrary ()" << endl; Library* library = NULL; HTRY - METHOD_HEAD ( "Cell.GetLibrary()" ) - library = cell->GetLibrary (); + METHOD_HEAD ( "Cell.getLibrary()" ) + library = cell->getLibrary (); HCATCH return PyLibrary_Link ( library ); @@ -116,18 +116,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetName ()" + // Attribute Method : "PyCell_getName ()" - static PyObject* PyCell_GetName(PyCell *self) { - trace << "PyCell_GetName ()" << endl; + static PyObject* PyCell_getName(PyCell *self) { + trace << "PyCell_getName ()" << endl; - METHOD_HEAD ( "Cell.GetName()" ) + METHOD_HEAD ( "Cell.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( cell->GetName() ); + pyName->_object = new Name ( cell->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -135,20 +135,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetInstance ()" + // Attribute Method : "PyCell_getInstance ()" - static PyObject* PyCell_GetInstance ( PyCell *self, PyObject* args ) { - trace << "PyCell_GetInstance ()" << endl; + static PyObject* PyCell_getInstance ( PyCell *self, PyObject* args ) { + trace << "PyCell_getInstance ()" << endl; Instance* instance = NULL; HTRY - METHOD_HEAD ( "Cell.GetInstance()" ) + METHOD_HEAD ( "Cell.getInstance()" ) PyName* arg0; - if ( ! ParseOneArg ( "Cell.GetInstance", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Cell.getInstance", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL ); - instance = cell->GetInstance ( *PYNAME_O(arg0) ); + instance = cell->getInstance ( *PYNAME_O(arg0) ); HCATCH return PyInstance_Link ( instance ); @@ -156,20 +156,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetInstancesLocator ()" + // Attribute Method : "PyCell_getInstancesLocator ()" - static PyObject* PyCell_GetInstancesLocator ( PyCell *self ) { - trace << "PyCell_GetInstancesLocator ()" << endl; + static PyObject* PyCell_getInstancesLocator ( PyCell *self ) { + trace << "PyCell_getInstancesLocator ()" << endl; - METHOD_HEAD ( "Cell.GetInstancesLocator()" ) + METHOD_HEAD ( "Cell.getInstancesLocator()" ) - Instances instances = cell->GetInstances (); + Instances instances = cell->getInstances (); PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator ); if (pyInstanceLocator == NULL) { return NULL; } HTRY - pyInstanceLocator->_object = instances.GetLocator (); + pyInstanceLocator->_object = instances.getLocator (); HCATCH return ( (PyObject*)pyInstanceLocator ); @@ -177,25 +177,25 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetInstancesUnderLocator ()" + // Attribute Method : "PyCell_getInstancesUnderLocator ()" - static PyObject* PyCell_GetInstancesUnderLocator ( PyCell *self, PyObject* args ) { + static PyObject* PyCell_getInstancesUnderLocator ( PyCell *self, PyObject* args ) { PyInstanceLocator* pyInstanceLocator; - trace << "PyCell_GetInstancesUnderLocator ()" << endl; + trace << "PyCell_getInstancesUnderLocator ()" << endl; - METHOD_HEAD ( "Cell.GetInstancesUnderLocator()" ) + METHOD_HEAD ( "Cell.getInstancesUnderLocator()" ) PyBox* arg0; - if ( ! ParseOneArg ( "Cell.GetInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Cell.getInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); - Instances instances = cell->GetInstancesUnder ( *PYBOX_O(arg0) ); + Instances instances = cell->getInstancesUnder ( *PYBOX_O(arg0) ); pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator ); if (pyInstanceLocator == NULL) { return NULL; } HTRY - pyInstanceLocator->_object = instances.GetLocator (); + pyInstanceLocator->_object = instances.getLocator (); HCATCH return ( (PyObject*)pyInstanceLocator ); @@ -203,20 +203,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetSlaveInstancesLocator ()" + // Attribute Method : "PyCell_getSlaveInstancesLocator ()" - static PyObject* PyCell_GetSlaveInstancesLocator ( PyCell *self ) { - trace << "PyCell_GetSlaveInstancesLocator ()" << endl; + static PyObject* PyCell_getSlaveInstancesLocator ( PyCell *self ) { + trace << "PyCell_getSlaveInstancesLocator ()" << endl; - METHOD_HEAD ( "Cell.GetSlaveInstancesLocator()" ) + METHOD_HEAD ( "Cell.getSlaveInstancesLocator()" ) - Instances instances = cell->GetSlaveInstances (); + Instances instances = cell->getSlaveInstances (); PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator ); if (pyInstanceLocator == NULL) { return NULL; } HTRY - pyInstanceLocator->_object = instances.GetLocator (); + pyInstanceLocator->_object = instances.getLocator (); HCATCH return ( (PyObject*)pyInstanceLocator ); @@ -224,20 +224,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetOccurrencesLocator ()" + // Attribute Method : "PyCell_getOccurrencesLocator ()" - static PyObject* PyCell_GetOccurrencesLocator ( PyCell *self ) { - trace << "PyCell_GetOccurrencesLocator ()" << endl; + static PyObject* PyCell_getOccurrencesLocator ( PyCell *self ) { + trace << "PyCell_getOccurrencesLocator ()" << endl; - METHOD_HEAD ( "Cell.GetOccurrencesLocator()" ) + METHOD_HEAD ( "Cell.getOccurrencesLocator()" ) - Occurrences occurrences = cell->GetOccurrences (); + Occurrences occurrences = cell->getOccurrences (); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } HTRY - pyOccurrenceLocator->_object = occurrences.GetLocator (); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -246,22 +246,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetOccurrencesUnderLocator ()" + // Attribute Method : "PyCell_getOccurrencesUnderLocator ()" - static PyObject* PyCell_GetOccurrencesUnderLocator ( PyCell *self, PyObject* args ) { - trace << "PyCell_GetOccurrencesUnderLocator ()" << endl; + static PyObject* PyCell_getOccurrencesUnderLocator ( PyCell *self, PyObject* args ) { + trace << "PyCell_getOccurrencesUnderLocator ()" << endl; - METHOD_HEAD ( "Cell.GetOccurrencesUnderLocator()" ) + METHOD_HEAD ( "Cell.getOccurrencesUnderLocator()" ) PyBox* arg0; - if ( ! ParseOneArg ( "Cell.GetInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Cell.getInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } HTRY - Occurrences occurrences = cell->GetOccurrencesUnder ( *PYBOX_O(arg0) ); - pyOccurrenceLocator->_object = occurrences.GetLocator (); + Occurrences occurrences = cell->getOccurrencesUnder ( *PYBOX_O(arg0) ); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -269,20 +269,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetLeafInstanceOccurrencesLocator ()" + // Attribute Method : "PyCell_getLeafInstanceOccurrencesLocator ()" - static PyObject* PyCell_GetLeafInstanceOccurrencesLocator ( PyCell *self ) { - trace << "PyCell_GetLeafInstanceOccurrencesLocator ()" << endl; + static PyObject* PyCell_getLeafInstanceOccurrencesLocator ( PyCell *self ) { + trace << "PyCell_getLeafInstanceOccurrencesLocator ()" << endl; - METHOD_HEAD ( "Cell.GetLeafInstanceOccurrencesLocator()" ) + METHOD_HEAD ( "Cell.getLeafInstanceOccurrencesLocator()" ) - Occurrences occurrences = cell->GetLeafInstanceOccurrences (); + Occurrences occurrences = cell->getLeafInstanceOccurrences (); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } HTRY - pyOccurrenceLocator->_object = occurrences.GetLocator (); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -290,23 +290,23 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetLeafInstanceOccurrencesUnderLocator ()" + // Attribute Method : "PyCell_getLeafInstanceOccurrencesUnderLocator ()" - static PyObject* PyCell_GetLeafInstanceOccurrencesUnderLocator ( PyCell *self, PyObject* args ) { - trace << "PyCell_GetLeafInstanceOccurrencesUnderLocator ()" << endl; + static PyObject* PyCell_getLeafInstanceOccurrencesUnderLocator ( PyCell *self, PyObject* args ) { + trace << "PyCell_getLeafInstanceOccurrencesUnderLocator ()" << endl; - METHOD_HEAD ( "Cell.GetLeafInstanceOccurrencesUnderLocator()" ) + METHOD_HEAD ( "Cell.getLeafInstanceOccurrencesUnderLocator()" ) PyBox* arg0; - if ( ! ParseOneArg ( "Cell.GetLeafInstanceOccurencesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Cell.getLeafInstanceOccurencesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL ); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } HTRY - Occurrences occurrences = cell->GetLeafInstanceOccurrencesUnder ( *PYBOX_O(arg0) ); - //pyOccurrenceLocator->_object = new locator ( instances.GetLocator () ); - pyOccurrenceLocator->_object = occurrences.GetLocator (); + Occurrences occurrences = cell->getLeafInstanceOccurrencesUnder ( *PYBOX_O(arg0) ); + //pyOccurrenceLocator->_object = new locator ( instances.getLocator () ); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -314,20 +314,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetReferencesLocator ()" + // Attribute Method : "PyCell_getReferencesLocator ()" - static PyObject* PyCell_GetReferencesLocator ( PyCell *self ) { - trace << "PyCell_GetReferencesLocator ()" << endl; + static PyObject* PyCell_getReferencesLocator ( PyCell *self ) { + trace << "PyCell_getReferencesLocator ()" << endl; - METHOD_HEAD ( "Cell.GetReferencesLocator()" ) + METHOD_HEAD ( "Cell.getReferencesLocator()" ) - References references = cell->GetReferences (); + References references = cell->getReferences (); PyReferenceLocator* pyReferenceLocator = PyObject_NEW ( PyReferenceLocator, &PyTypeReferenceLocator ); if (pyReferenceLocator == NULL) { return NULL; } HTRY - pyReferenceLocator->_object = references.GetLocator (); + pyReferenceLocator->_object = references.getLocator (); HCATCH return ( (PyObject*)pyReferenceLocator ); @@ -335,20 +335,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetHyperNetsLocator ()" + // Attribute Method : "PyCell_getHyperNetsLocator ()" - static PyObject* PyCell_GetHyperNetsLocator ( PyCell *self ) { - trace << "PyCell_GetHyperNetsLocator ()" << endl; + static PyObject* PyCell_getHyperNetsLocator ( PyCell *self ) { + trace << "PyCell_getHyperNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetHyperNetsLocator()" ) + METHOD_HEAD ( "Cell.getHyperNetsLocator()" ) - Occurrences occurrences = cell->GetHyperNetRootNetOccurrences(); + Occurrences occurrences = cell->getHyperNetRootNetOccurrences(); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } HTRY - pyOccurrenceLocator->_object = occurrences.GetLocator (); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -356,20 +356,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetNet ()" + // Attribute Method : "PyCell_getNet ()" - static PyObject* PyCell_GetNet ( PyCell *self, PyObject* args ) { - trace << "PyCell_GetNet ()" << endl; + static PyObject* PyCell_getNet ( PyCell *self, PyObject* args ) { + trace << "PyCell_getNet ()" << endl; Net* net = NULL; HTRY - METHOD_HEAD ( "Cell.GetNet()" ) + METHOD_HEAD ( "Cell.getNet()" ) PyName* arg0; - if ( ! ParseOneArg ( "Cell.GetNet", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Cell.getNet", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL ); - net = cell->GetNet ( *PYNAME_O(arg0) ); + net = cell->getNet ( *PYNAME_O(arg0) ); HCATCH return PyNet_Link ( net ); @@ -377,22 +377,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetNetsLocator ()" + // Attribute Method : "PyCell_getNetsLocator ()" - static PyObject* PyCell_GetNetsLocator ( PyCell *self ) { - trace << "PyCell_GetNetsLocator ()" << endl; + static PyObject* PyCell_getNetsLocator ( PyCell *self ) { + trace << "PyCell_getNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetNetsLocator()" ) + METHOD_HEAD ( "Cell.getNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetNets (); + Nets nets = cell->getNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); @@ -400,44 +400,44 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetExternalNetsLocator ()" + // Attribute Method : "PyCell_getExternalNetsLocator ()" - static PyObject* PyCell_GetExternalNetsLocator ( PyCell *self ) { - trace << "PyCell_GetExternalNetsLocator ()" << endl; + static PyObject* PyCell_getExternalNetsLocator ( PyCell *self ) { + trace << "PyCell_getExternalNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetExternalNetsLocator()" ) + METHOD_HEAD ( "Cell.getExternalNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetExternalNets (); + Nets nets = cell->getExternalNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); } // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetClockNetsLocator ()" + // Attribute Method : "PyCell_getClockNetsLocator ()" - static PyObject* PyCell_GetClockNetsLocator ( PyCell *self ) { - trace << "PyCell_GetClockNetsLocator ()" << endl; + static PyObject* PyCell_getClockNetsLocator ( PyCell *self ) { + trace << "PyCell_getClockNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetClockNetsLocator()" ) + METHOD_HEAD ( "Cell.getClockNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetClockNets (); + Nets nets = cell->getClockNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); @@ -446,22 +446,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetSupplyNetsLocator ()" + // Attribute Method : "PyCell_getSupplyNetsLocator ()" - static PyObject* PyCell_GetSupplyNetsLocator ( PyCell *self ) { - trace << "PyCell_GetSupplyNetsLocator ()" << endl; + static PyObject* PyCell_getSupplyNetsLocator ( PyCell *self ) { + trace << "PyCell_getSupplyNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetSupplyNetsLocator()" ) + METHOD_HEAD ( "Cell.getSupplyNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetSupplyNets (); + Nets nets = cell->getSupplyNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); @@ -469,23 +469,23 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetPowerNetsLocator ()" + // Attribute Method : "PyCell_getPowerNetsLocator ()" - static PyObject* PyCell_GetPowerNetsLocator ( PyCell *self ) + static PyObject* PyCell_getPowerNetsLocator ( PyCell *self ) { - trace << "PyCell_GetPowerNetsLocator ()" << endl; + trace << "PyCell_getPowerNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetPowerNetsLocator()" ) + METHOD_HEAD ( "Cell.getPowerNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetPowerNets (); + Nets nets = cell->getPowerNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); @@ -493,22 +493,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetGroundNetsLocator ()" + // Attribute Method : "PyCell_getGroundNetsLocator ()" - static PyObject* PyCell_GetGroundNetsLocator ( PyCell *self ) { - trace << "PyCell_GetGroundNetsLocator ()" << endl; + static PyObject* PyCell_getGroundNetsLocator ( PyCell *self ) { + trace << "PyCell_getGroundNetsLocator ()" << endl; - METHOD_HEAD ( "Cell.GetGroundNetsLocator()" ) + METHOD_HEAD ( "Cell.getGroundNetsLocator()" ) PyNetLocator* pyNetLocator = NULL; HTRY - Nets nets = cell->GetGroundNets (); + Nets nets = cell->getGroundNets (); pyNetLocator = PyObject_NEW ( PyNetLocator, &PyTypeNetLocator ); if (pyNetLocator == NULL) { return NULL; } - pyNetLocator->_object = nets.GetLocator (); + pyNetLocator->_object = nets.getLocator (); HCATCH return ( (PyObject*)pyNetLocator ); @@ -516,18 +516,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyCell_GetAbutmentBox ()" + // Attribute Method : "PyCell_getAbutmentBox ()" - static PyObject* PyCell_GetAbutmentBox ( PyCell *self ) { - trace << "PyCell_GetAbutmentBox()" << endl; + static PyObject* PyCell_getAbutmentBox ( PyCell *self ) { + trace << "PyCell_getAbutmentBox()" << endl; - METHOD_HEAD ( "Cell.GetAbutmentBox()" ) + METHOD_HEAD ( "Cell.getAbutmentBox()" ) PyBox* abutmentBox = PyObject_NEW ( PyBox, &PyTypeBox ); if (abutmentBox == NULL) { return NULL; } HTRY - abutmentBox->_object = new Box ( cell->GetAbutmentBox() ); + abutmentBox->_object = new Box ( cell->getAbutmentBox() ); HCATCH return ( (PyObject*)abutmentBox ); @@ -599,31 +599,31 @@ extern "C" { // PyCell Attribute Method table. PyMethodDef PyCell_Methods[] = - { { "GetLibrary" , (PyCFunction)PyCell_GetLibrary , METH_NOARGS , "Returns the library owning the cell." } - , { "GetName" , (PyCFunction)PyCell_GetName , METH_NOARGS , "Returns the name of the cell." } - , { "GetInstance" , (PyCFunction)PyCell_GetInstance , METH_VARARGS, "Returns the instance of name if it exists, else NULL." } - , { "GetInstancesLocator" , (PyCFunction)PyCell_GetInstancesLocator , METH_NOARGS , "Returns the locator of the collection of all instances called by the cell." } // GetInstances - , { "GetInstancesUnderLocator" , (PyCFunction)PyCell_GetInstancesUnderLocator , METH_VARARGS, "Returns the locator of the collection of all instances of the cell intersecting the given rectangular area." } // GetInstancesUnder - , { "GetSlaveInstancesLocator" , (PyCFunction)PyCell_GetSlaveInstancesLocator , METH_NOARGS , "Returns the locator of the collection of instances whose master is this cell." } // GetSlaveInstances - , { "GetOccurrencesLocator" , (PyCFunction)PyCell_GetOccurrencesLocator , METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." } - , { "GetOccurrencesUnderLocator", (PyCFunction)PyCell_GetOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." } - , { "GetLeafInstanceOccurrencesLocator", (PyCFunction)PyCell_GetLeafInstanceOccurrencesLocator, METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." } - , { "GetLeafInstanceOccurrencesUnderLocator", (PyCFunction)PyCell_GetLeafInstanceOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." } - , { "GetReferencesLocator" , (PyCFunction)PyCell_GetReferencesLocator , METH_VARARGS, "Returns the collection of all references belonging to the cell." } - , { "GetHyperNetsLocator" , (PyCFunction)PyCell_GetHyperNetsLocator , METH_VARARGS, "Returns the collection of all hyperNets belonging to the cell." } - , { "GetNet" , (PyCFunction)PyCell_GetNet , METH_VARARGS, "Returns the net of name if it exists, else NULL." } - , { "GetNetsLocator" , (PyCFunction)PyCell_GetNetsLocator , METH_NOARGS , "Returns the collection of all nets of the cell." } - //, { "GetGlobalNets" , (PyCFunction)PyCell_GetGlobalNets , METH_NOARGS , "Returns the collection of all global nets of the cell." } - , { "GetExternalNetsLocator", (PyCFunction)PyCell_GetExternalNetsLocator, METH_NOARGS , "Returns the collection of all external nets of the cell." } - //, { "GetInternalNets" , (PyCFunction)PyCell_GetInternalNets , METH_NOARGS , "Returns the collection of all internal nets of the cell." } - , { "GetClockNetsLocator" , (PyCFunction)PyCell_GetClockNetsLocator , METH_NOARGS , "Returns the collection of all clock nets of the cell." } - , { "GetSupplyNetsLocator", (PyCFunction)PyCell_GetSupplyNetsLocator, METH_NOARGS , "Returns the collection of all supply nets of the cell." } - , { "GetPowerNetsLocator" , (PyCFunction)PyCell_GetPowerNetsLocator , METH_NOARGS , "Returns the collection of all power nets of the cell." } - , { "GetGroundNetsLocator", (PyCFunction)PyCell_GetGroundNetsLocator, METH_NOARGS , "Returns the collection of all ground nets of the cell." } - //, { "GetComponents" , (PyCFunction)PyCell_GetComponents , METH_NOARGS , "Returns the collection of all components of the cell." } - //, { "GetComponentsUnder" , (PyCFunction)PyCell_GetComponentsUnder , METH_VARARGS, "Returns the collection of cell components which intersect the given rectangular area." } - , { "GetAbutmentBox" , (PyCFunction)PyCell_GetAbutmentBox , METH_NOARGS , "Returns the abutment box of the cell(which is defined by the designer unlike the bounding box which is managed dynamically)" } - //, { "GetSymbol" , (PyCFunction)PyCell_GetSymbol , METH_NOARGS , "Returns the symbol associated to the cell." } + { { "getLibrary" , (PyCFunction)PyCell_getLibrary , METH_NOARGS , "Returns the library owning the cell." } + , { "getName" , (PyCFunction)PyCell_getName , METH_NOARGS , "Returns the name of the cell." } + , { "getInstance" , (PyCFunction)PyCell_getInstance , METH_VARARGS, "Returns the instance of name if it exists, else NULL." } + , { "getInstancesLocator" , (PyCFunction)PyCell_getInstancesLocator , METH_NOARGS , "Returns the locator of the collection of all instances called by the cell." } // getInstances + , { "getInstancesUnderLocator" , (PyCFunction)PyCell_getInstancesUnderLocator , METH_VARARGS, "Returns the locator of the collection of all instances of the cell intersecting the given rectangular area." } // getInstancesUnder + , { "getSlaveInstancesLocator" , (PyCFunction)PyCell_getSlaveInstancesLocator , METH_NOARGS , "Returns the locator of the collection of instances whose master is this cell." } // getSlaveInstances + , { "getOccurrencesLocator" , (PyCFunction)PyCell_getOccurrencesLocator , METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." } + , { "getOccurrencesUnderLocator", (PyCFunction)PyCell_getOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." } + , { "getLeafInstanceOccurrencesLocator", (PyCFunction)PyCell_getLeafInstanceOccurrencesLocator, METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." } + , { "getLeafInstanceOccurrencesUnderLocator", (PyCFunction)PyCell_getLeafInstanceOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." } + , { "getReferencesLocator" , (PyCFunction)PyCell_getReferencesLocator , METH_VARARGS, "Returns the collection of all references belonging to the cell." } + , { "getHyperNetsLocator" , (PyCFunction)PyCell_getHyperNetsLocator , METH_VARARGS, "Returns the collection of all hyperNets belonging to the cell." } + , { "getNet" , (PyCFunction)PyCell_getNet , METH_VARARGS, "Returns the net of name if it exists, else NULL." } + , { "getNetsLocator" , (PyCFunction)PyCell_getNetsLocator , METH_NOARGS , "Returns the collection of all nets of the cell." } + //, { "getGlobalNets" , (PyCFunction)PyCell_getGlobalNets , METH_NOARGS , "Returns the collection of all global nets of the cell." } + , { "getExternalNetsLocator", (PyCFunction)PyCell_getExternalNetsLocator, METH_NOARGS , "Returns the collection of all external nets of the cell." } + //, { "getInternalNets" , (PyCFunction)PyCell_getInternalNets , METH_NOARGS , "Returns the collection of all internal nets of the cell." } + , { "getClockNetsLocator" , (PyCFunction)PyCell_getClockNetsLocator , METH_NOARGS , "Returns the collection of all clock nets of the cell." } + , { "getSupplyNetsLocator", (PyCFunction)PyCell_getSupplyNetsLocator, METH_NOARGS , "Returns the collection of all supply nets of the cell." } + , { "getPowerNetsLocator" , (PyCFunction)PyCell_getPowerNetsLocator , METH_NOARGS , "Returns the collection of all power nets of the cell." } + , { "getGroundNetsLocator", (PyCFunction)PyCell_getGroundNetsLocator, METH_NOARGS , "Returns the collection of all ground nets of the cell." } + //, { "getComponents" , (PyCFunction)PyCell_getComponents , METH_NOARGS , "Returns the collection of all components of the cell." } + //, { "getComponentsUnder" , (PyCFunction)PyCell_getComponentsUnder , METH_VARARGS, "Returns the collection of cell components which intersect the given rectangular area." } + , { "getAbutmentBox" , (PyCFunction)PyCell_getAbutmentBox , METH_NOARGS , "Returns the abutment box of the cell(which is defined by the designer unlike the bounding box which is managed dynamically)" } + //, { "getSymbol" , (PyCFunction)PyCell_getSymbol , METH_NOARGS , "Returns the symbol associated to the cell." } //, { "IsCalledBy" , (PyCFunction)PyCell_IsCalledBy , METH_VARARGS, "Returns true if the cell is directly or indirectly called by the cell ." } , { "IsTerminal" , (PyCFunction)PyCell_IsTerminal , METH_NOARGS , "Returns true if the cell is marked as terminal, else false." } , { "IsLeaf" , (PyCFunction)PyCell_IsLeaf , METH_NOARGS , "Returns true if the cell is a leaf of the hierarchy, else false." } @@ -634,8 +634,8 @@ extern "C" { //, { "SetSymbol" , (PyCFunction)PyCell_SetSymbol , METH_VARARGS, "Associates the symbol to the cell." } //, { "Materialize" , (PyCFunction)PyCell_Materialize , METH_NOARGS , "Materializes all components of all the nets of the cell." } //, { "Unmaterialize" , (PyCFunction)PyCell_Unmaterialize , METH_NOARGS , "De-materializes all components of all the nets of the cell." } - , { "Delete" , (PyCFunction)PyCell_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "destroy" , (PyCFunction)PyCell_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -659,7 +659,7 @@ extern "C" { Cell* cell = NULL; HTRY - cell = Cell::Create(PYLIBRARY_O(arg0), GetString(*PYNAME_O(arg1))); + cell = Cell::Create(PYLIBRARY_O(arg0), getString(*PYNAME_O(arg1))); HCATCH return PyCell_Link(cell); @@ -671,14 +671,14 @@ extern "C" { if ( self->ACCESS_OBJECT != NULL ) { ProxyProperty* proxy = dynamic_cast - ( self->ACCESS_OBJECT->GetProperty ( ProxyProperty::GetPropertyName() ) ); \ + ( self->ACCESS_OBJECT->getProperty ( ProxyProperty::getPropertyName() ) ); \ if (proxy == NULL) { ostringstream message; message << "deleting a Python object with no Proxy attached "; cerr << "yes man" << endl; PyErr_SetString ( ProxyError, message.str().c_str() ); } - self->ACCESS_OBJECT->Remove ( proxy ); + self->ACCESS_OBJECT->remove ( proxy ); } else { cerr << "ACCESS_OBJECT is NULL" << endl; } diff --git a/hurricane/src/pyext/PyCellLocator.cpp b/hurricane/src/pyext/PyCellLocator.cpp index 497a1fe8..3cd5a233 100644 --- a/hurricane/src/pyext/PyCellLocator.cpp +++ b/hurricane/src/pyext/PyCellLocator.cpp @@ -92,8 +92,8 @@ extern "C" { LocatorGetCloneAttribute(Cell) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyCellLocator_Delete,PyCellLocator) + // Standard destroy (Attribute). + DirectDestroyAttribute(PyCellLocator_destroy, PyCellLocator) @@ -103,10 +103,10 @@ extern "C" { PyMethodDef PyCellLocator_Methods[] = { { "IsValid" , (PyCFunction)PyCellLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyCellLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyCellLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyCellLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyCellLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyCellLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyCellLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyCellLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyComponent.cpp b/hurricane/src/pyext/PyComponent.cpp index 8fd8c0be..baf6f9d3 100644 --- a/hurricane/src/pyext/PyComponent.cpp +++ b/hurricane/src/pyext/PyComponent.cpp @@ -89,25 +89,25 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyComponent_GetX,GetX,PyComponent,Component) - DirectGetLongAttribute(PyComponent_GetY,GetY,PyComponent,Component) + DirectGetLongAttribute(PyComponent_getX,getX,PyComponent,Component) + DirectGetLongAttribute(PyComponent_getY,getY,PyComponent,Component) - // Standart Delete (Attribute). - DBoDeleteAttribute(PyComponent_Delete,PyComponent) + // Standart Destroy (Attribute). + DBoDestroyAttribute(PyComponent_destroy,PyComponent) // --------------------------------------------------------------- - // Attribute Method : "PyComponent_GetPosition ()" - static PyObject* PyComponent_GetPosition ( PyComponent *self ) + // Attribute Method : "PyComponent_getPosition ()" + static PyObject* PyComponent_getPosition ( PyComponent *self ) { - trace << "PyComponent_GetPosition ()" << endl; - METHOD_HEAD ( "Component.GetPosition()" ) + trace << "PyComponent_getPosition ()" << endl; + METHOD_HEAD ( "Component.getPosition()" ) PyPoint* pyPoint = PyObject_NEW ( PyPoint, &PyTypePoint ); if (pyPoint == NULL) { return NULL; } HTRY - pyPoint->_object = new Point ( component->GetPosition() ); + pyPoint->_object = new Point ( component->getPosition() ); HCATCH return ( (PyObject*)pyPoint ); @@ -115,35 +115,35 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyComponent_GetNet ()" + // Attribute Method : "PyComponent_getNet ()" - static PyObject* PyComponent_GetNet ( PyComponent *self ) + static PyObject* PyComponent_getNet ( PyComponent *self ) { - trace << "PyComponent_GetNet ()" << endl; + trace << "PyComponent_getNet ()" << endl; Net* net = NULL; HTRY - METHOD_HEAD ( "Component.GetNet()" ) + METHOD_HEAD ( "Component.getNet()" ) - net = component->GetNet ( ); + net = component->getNet ( ); HCATCH return PyNet_Link ( net ); } // --------------------------------------------------------------- - // Attribute Method : "PyComponent_GetLayer ()" + // Attribute Method : "PyComponent_getLayer ()" - static PyObject* PyComponent_GetLayer ( PyComponent *self ) + static PyObject* PyComponent_getLayer ( PyComponent *self ) { - trace << "PyComponent_GetLayer ()" << endl; - METHOD_HEAD ( "Component.GetLayer()" ) + trace << "PyComponent_getLayer ()" << endl; + METHOD_HEAD ( "Component.getLayer()" ) Layer* layer = NULL; HTRY - layer = component->GetLayer (); + layer = component->getLayer (); HCATCH return PyLayer_Link ( layer ); @@ -151,19 +151,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyComponent_GetBoundingBox ()" + // Attribute Method : "PyComponent_getBoundingBox ()" - static PyObject* PyComponent_GetBoundingBox ( PyComponent *self ) + static PyObject* PyComponent_getBoundingBox ( PyComponent *self ) { - trace << "PyComponent_GetBoundingBox ()" << endl; - METHOD_HEAD ( "Component.GetBoundingBox()" ) + trace << "PyComponent_getBoundingBox ()" << endl; + METHOD_HEAD ( "Component.getBoundingBox()" ) PyBox* pyBox = PyObject_NEW ( PyBox, &PyTypeBox ); if (pyBox == NULL) { return NULL; } trace_out (); HTRY - pyBox->_object = new Box ( component->GetBoundingBox() ); + pyBox->_object = new Box ( component->getBoundingBox() ); HCATCH return ( (PyObject*)pyBox ); @@ -175,14 +175,14 @@ extern "C" { // PyComponent Attribute Method table. PyMethodDef PyComponent_Methods[] = - { { "GetX" , (PyCFunction)PyComponent_GetX , METH_NOARGS , "Return the Component X value." } - , { "GetY" , (PyCFunction)PyComponent_GetY , METH_NOARGS , "Return the Component Y value." } - , { "GetPosition" , (PyCFunction)PyComponent_GetPosition , METH_NOARGS , "Return the Component position." } - , { "GetNet" , (PyCFunction)PyComponent_GetNet , METH_NOARGS , "Returns the net owning the component." } - , { "GetLayer" , (PyCFunction)PyComponent_GetLayer , METH_NOARGS , "Return the component layer." } - , { "GetBoundingBox" , (PyCFunction)PyComponent_GetBoundingBox, METH_NOARGS , "Return the component boundingBox." } - , { "Delete" , (PyCFunction)PyComponent_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + { { "getX" , (PyCFunction)PyComponent_getX , METH_NOARGS , "Return the Component X value." } + , { "getY" , (PyCFunction)PyComponent_getY , METH_NOARGS , "Return the Component Y value." } + , { "getPosition" , (PyCFunction)PyComponent_getPosition , METH_NOARGS , "Return the Component position." } + , { "getNet" , (PyCFunction)PyComponent_getNet , METH_NOARGS , "Returns the net owning the component." } + , { "getLayer" , (PyCFunction)PyComponent_getLayer , METH_NOARGS , "Return the component layer." } + , { "getBoundingBox" , (PyCFunction)PyComponent_getBoundingBox, METH_NOARGS , "Return the component boundingBox." } + , { "destroy" , (PyCFunction)PyComponent_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyComponentLocator.cpp b/hurricane/src/pyext/PyComponentLocator.cpp index f9c41269..bf4fe8a3 100644 --- a/hurricane/src/pyext/PyComponentLocator.cpp +++ b/hurricane/src/pyext/PyComponentLocator.cpp @@ -90,7 +90,7 @@ extern "C" { LocatorGetCloneAttribute(Component) // Standart Delete (Attribute). - DirectDeleteAttribute(PyComponentLocator_Delete,PyComponentLocator) + DirectDestroyAttribute(PyComponentLocator_destroy, PyComponentLocator) @@ -101,10 +101,10 @@ extern "C" { PyMethodDef PyComponentLocator_Methods[] = { { "IsValid" , (PyCFunction)PyComponentLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyComponentLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyComponentLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyComponentLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyComponentLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyComponentLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyComponentLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyComponentLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyContact.cpp b/hurricane/src/pyext/PyContact.cpp index 430177a6..3d31ad32 100644 --- a/hurricane/src/pyext/PyContact.cpp +++ b/hurricane/src/pyext/PyContact.cpp @@ -88,31 +88,31 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyContact_GetWidth , GetWidth , PyContact,Contact) - DirectGetLongAttribute(PyContact_GetHalfWidth , GetHalfWidth , PyContact,Contact) - DirectGetLongAttribute(PyContact_GetHeight , GetHeight , PyContact,Contact) - DirectGetLongAttribute(PyContact_GetHalfHeight, GetHalfHeight, PyContact,Contact) + DirectGetLongAttribute(PyContact_getWidth , getWidth , PyContact,Contact) + DirectGetLongAttribute(PyContact_getHalfWidth , getHalfWidth , PyContact,Contact) + DirectGetLongAttribute(PyContact_getHeight , getHeight , PyContact,Contact) + DirectGetLongAttribute(PyContact_getHalfHeight, getHalfHeight, PyContact,Contact) - DirectGetLongAttribute(PyContact_GetDx, GetDx, PyContact,Contact) - DirectGetLongAttribute(PyContact_GetDy, GetDy, PyContact,Contact) + DirectGetLongAttribute(PyContact_getDx, getDx, PyContact,Contact) + DirectGetLongAttribute(PyContact_getDy, getDy, PyContact,Contact) - // Standart Delete (Attribute). - DBoDeleteAttribute(PyContact_Delete, PyContact) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyContact_destroy, PyContact) // --------------------------------------------------------------- // PyContact Attribute Method table. PyMethodDef PyContact_Methods[] = - { { "Delete" , (PyCFunction)PyContact_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } - , { "GetWidth" , (PyCFunction)PyContact_GetWidth , METH_NOARGS , "Return the contact width." } - , { "GetHalfWidth" , (PyCFunction)PyContact_GetHalfWidth , METH_NOARGS , "Return the contact half width." } - , { "GetHeight" , (PyCFunction)PyContact_GetHeight , METH_NOARGS , "Return the contact height." } - , { "GetHalfHeight" , (PyCFunction)PyContact_GetHalfHeight , METH_NOARGS , "Return the contact half height." } - , { "GetDx" , (PyCFunction)PyContact_GetDx , METH_NOARGS , "Return the contact dx value." } - , { "GetDy" , (PyCFunction)PyContact_GetDy , METH_NOARGS , "Return the contact dy value." } + { { "destroy" , (PyCFunction)PyContact_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } + , { "getWidth" , (PyCFunction)PyContact_getWidth , METH_NOARGS , "Return the contact width." } + , { "getHalfWidth" , (PyCFunction)PyContact_getHalfWidth , METH_NOARGS , "Return the contact half width." } + , { "getHeight" , (PyCFunction)PyContact_getHeight , METH_NOARGS , "Return the contact height." } + , { "getHalfHeight" , (PyCFunction)PyContact_getHalfHeight , METH_NOARGS , "Return the contact half height." } + , { "getDx" , (PyCFunction)PyContact_getDx , METH_NOARGS , "Return the contact dx value." } + , { "getDy" , (PyCFunction)PyContact_getDy , METH_NOARGS , "Return the contact dy value." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -150,21 +150,21 @@ extern "C" { ) ) return ( NULL ); - //cerr << "Format := " << __cs.GetObjectIds() << endl; - if ( __cs.GetObjectIds() == NET_LAYER_INTS2_ARG ) + //cerr << "Format := " << __cs.getObjectIds() << endl; + if ( __cs.getObjectIds() == NET_LAYER_INTS2_ARG ) contact = Contact::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS3_ARG ) contact = Contact::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS4_ARG ) contact = Contact::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) @@ -172,20 +172,20 @@ extern "C" { , PyInt_AsLong(arg4) , PyInt_AsLong(arg5) ); - else if ( __cs.GetObjectIds() == COMP_LAYER_INTS2_ARG ) + else if ( __cs.getObjectIds() == COMP_LAYER_INTS2_ARG ) contact = Contact::Create ( PYCOMPONENT_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == COMP_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == COMP_LAYER_INTS3_ARG ) contact = Contact::Create ( PYCOMPONENT_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == COMP_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == COMP_LAYER_INTS4_ARG ) contact = Contact::Create ( PYCOMPONENT_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) diff --git a/hurricane/src/pyext/PyDataBase.cpp b/hurricane/src/pyext/PyDataBase.cpp index d77e5c1c..b952efbe 100644 --- a/hurricane/src/pyext/PyDataBase.cpp +++ b/hurricane/src/pyext/PyDataBase.cpp @@ -82,15 +82,15 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyDataBase_GetDataBase ()" + // Attribute Method : "PyDataBase_getDataBase ()" - PyObject* PyDataBase_GetDataBase ( PyObject* module ) { - trace << "PyDataBase_GetDataBase()" << endl; + PyObject* PyDataBase_getDataBase ( PyObject* module ) { + trace << "PyDataBase_getDataBase()" << endl; DataBase* db = NULL; HTRY - db = GetDataBase (); + db = getDataBase (); if ( db == NULL ) PyErr_SetString ( HurricaneError, "DataBase has not been created yet" ); HCATCH @@ -99,17 +99,17 @@ extern "C" { } // --------------------------------------------------------------- - // Attribute Method : "PyDataBase_GetTechnology ()" + // Attribute Method : "PyDataBase_getTechnology ()" - PyObject* PyDataBase_GetTechnology ( PyDataBase* self ) { - trace << "PyDataBase_GetTechnology()" << endl; + PyObject* PyDataBase_getTechnology ( PyDataBase* self ) { + trace << "PyDataBase_getTechnology()" << endl; Technology* techno = NULL; HTRY - METHOD_HEAD("DataBase.GetTechnology()") + METHOD_HEAD("DataBase.getTechnology()") - techno = db->GetTechnology (); + techno = db->getTechnology (); if ( techno == NULL ) Py_RETURN_NONE; @@ -122,8 +122,8 @@ extern "C" { // Standart Accessors (Attributes). - // Standart Delete (Attribute). - DBoDeleteAttribute(PyDataBase_Delete,PyDataBase) + // Standart Destroy (Attribute). + DBoDestroyAttribute(PyDataBase_destroy,PyDataBase) @@ -132,9 +132,9 @@ extern "C" { // PyDataBase Attribute Method table. PyMethodDef PyDataBase_Methods[] = - { { "GetTechnology", (PyCFunction)PyDataBase_GetTechnology, METH_NOARGS, "Return the Technology" } - , { "Delete" , (PyCFunction)PyDataBase_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + { { "getTechnology", (PyCFunction)PyDataBase_getTechnology, METH_NOARGS, "Return the Technology" } + , { "destroy" , (PyCFunction)PyDataBase_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyDataBase.h b/hurricane/src/pyext/PyDataBase.h index e534b963..27170693 100644 --- a/hurricane/src/pyext/PyDataBase.h +++ b/hurricane/src/pyext/PyDataBase.h @@ -85,7 +85,7 @@ extern "C" { extern PyTypeObject PyTypeDataBase; extern PyMethodDef PyDataBase_Methods[]; - extern PyObject* PyDataBase_GetDataBase ( PyObject* module ); + extern PyObject* PyDataBase_getDataBase ( PyObject* module ); extern PyObject* PyDataBase_Link ( H::DataBase* db ); extern void PyDataBase_LinkPyType (); extern void PyDataBase_Constructor (); diff --git a/hurricane/src/pyext/PyEntity.cpp b/hurricane/src/pyext/PyEntity.cpp index d1dd3c02..2ca1af90 100644 --- a/hurricane/src/pyext/PyEntity.cpp +++ b/hurricane/src/pyext/PyEntity.cpp @@ -85,21 +85,21 @@ extern "C" { // | "PyEntity" Attribute Methods | // x-------------------------------------------------------------x - // Standart Delete (Attribute). - DBoDeleteAttribute(PyEntity_Delete,PyEntity) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyEntity_destroy ,PyEntity) // --------------------------------------------------------------- - // Attribute Method : "PyEntity_GetCell ()" + // Attribute Method : "PyEntity_getCell ()" - static PyObject* PyEntity_GetCell ( PyEntity *self ) + static PyObject* PyEntity_getCell ( PyEntity *self ) { - trace << "PyEntity_GetCell ()" << endl; + trace << "PyEntity_getCell ()" << endl; Cell* cell = NULL; HTRY - METHOD_HEAD ( "Entity.GetCell()" ) - cell = entity->GetCell (); + METHOD_HEAD ( "Entity.getCell()" ) + cell = entity->getCell (); HCATCH return PyCell_Link ( cell ); @@ -112,9 +112,9 @@ extern "C" { // PyEntity Attribute Method table. PyMethodDef PyEntity_Methods[] = - { { "GetCell" , (PyCFunction)PyEntity_GetCell , METH_NOARGS , "Returns the entity cell." } - , { "Delete" , (PyCFunction)PyEntity_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + { { "getCell" , (PyCFunction)PyEntity_getCell , METH_NOARGS , "Returns the entity cell." } + , { "destroy" , (PyCFunction)PyEntity_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyHorizontal.cpp b/hurricane/src/pyext/PyHorizontal.cpp index cbcc5da0..c219b86f 100644 --- a/hurricane/src/pyext/PyHorizontal.cpp +++ b/hurricane/src/pyext/PyHorizontal.cpp @@ -85,16 +85,16 @@ extern "C" { // x-------------------------------------------------------------x - // Standart Delete (Attribute). - DBoDeleteAttribute(PyHorizontal_Delete,PyHorizontal) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyHorizontal_destroy, PyHorizontal) // --------------------------------------------------------------- // PyHorizontal Attribute Method table. PyMethodDef PyHorizontal_Methods[] = - { { "Delete" , (PyCFunction)PyHorizontal_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + { { "destroy" , (PyCFunction)PyHorizontal_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -133,47 +133,47 @@ extern "C" { ,Converter,&arg6 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == NET_LAYER_INT_ARG ) + if ( __cs.getObjectIds() == NET_LAYER_INT_ARG ) horizontal = Horizontal::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS2_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS2_ARG ) horizontal = Horizontal::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INT_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INT_ARG ) horizontal = Horizontal::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS3_ARG ) horizontal = Horizontal::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS2_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS2_ARG ) horizontal = Horizontal::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS4_ARG ) horizontal = Horizontal::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) , PyInt_AsLong(arg5) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS3_ARG ) horizontal = Horizontal::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) , PyInt_AsLong(arg5) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS4_ARG ) horizontal = Horizontal::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) @@ -182,7 +182,7 @@ extern "C" { , PyInt_AsLong(arg5) , PyInt_AsLong(arg6) ); else { - cerr << __cs.GetObjectIds() << endl; + cerr << __cs.getObjectIds() << endl; PyErr_SetString ( ConstructorError, "invalid number of parameters for Horizontal constructor." ); return ( NULL ); } @@ -199,7 +199,7 @@ extern "C" { PyTypeObjectConstructor(Horizontal) -# else // End of Python Module Code Part. +#else // End of Python Module Code Part. // x=================================================================x @@ -221,7 +221,7 @@ extern "C" { PyTypeInheritedObjectDefinitions(Horizontal, Segment) -# endif // End of Shared Library Code Part. +#endif // End of Shared Library Code Part. } // End of extern "C". diff --git a/hurricane/src/pyext/PyHurricane.cpp b/hurricane/src/pyext/PyHurricane.cpp index 8607bb2b..1981cf84 100644 --- a/hurricane/src/pyext/PyHurricane.cpp +++ b/hurricane/src/pyext/PyHurricane.cpp @@ -93,7 +93,7 @@ namespace Isobar { -# if !defined(__PYTHON_MODULE__) +#if !defined(__PYTHON_MODULE__) // x=================================================================x // | "PyHurricane" Shared Library Code Part | @@ -151,7 +151,7 @@ USING_NAMESPACE_HURRICANE bool ConverterState::ObjectType::PyEqual ( PyTypeObject* pyType ) { if ( _pyType == pyType ) return true; if ( _idBase[0] == '\0' ) return false; - return ( __cs.GetObject(_idBase)->PyEqual(pyType) ); + return ( __cs.getObject(_idBase)->PyEqual(pyType) ); } @@ -171,7 +171,7 @@ USING_NAMESPACE_HURRICANE { if ( _idBase[0] == '\0' ) return this; if ( ! strcmp(_id,_inheritStop) ) return this; - return ( __cs.GetObject(_idBase)->PyBase() ); + return ( __cs.getObject(_idBase)->PyBase() ); } @@ -184,7 +184,7 @@ USING_NAMESPACE_HURRICANE { if ( _idBase[0] == '\0' ) return _id; if ( ! strcmp(_id,_inheritStop) ) return _id; - return ( __cs.GetObject(_idBase)->PyBase(pyType)->_id ); + return ( __cs.getObject(_idBase)->PyBase(pyType)->_id ); } @@ -231,9 +231,9 @@ USING_NAMESPACE_HURRICANE // ------------------------------------------------------------------- -// Method : "::ConverterState::GetObjectType ()" +// Method : "::ConverterState::getObjectType ()" - string ConverterState::GetObjectType ( string objectsTypes, unsigned n ) { + string ConverterState::getObjectType ( string objectsTypes, unsigned n ) { string temp; size_t end, head, tail, start; @@ -261,9 +261,9 @@ USING_NAMESPACE_HURRICANE // ------------------------------------------------------------------- -// Method : "::ConverterState::GetObjectId ()" +// Method : "::ConverterState::getObjectId ()" - char* ConverterState::GetObjectId ( PyObject* object ) { + char* ConverterState::getObjectId ( PyObject* object ) { for ( unsigned i=0 ; i < _types.size() ; i++ ) { if ( ( ! strcmp ( _types[i]->_id, "function" ) ) && ( PyCallable_Check(object) ) ) return ( _types[i]->_id ); @@ -281,9 +281,9 @@ USING_NAMESPACE_HURRICANE // ------------------------------------------------------------------- -// Method : "::ConverterState::GetObject ()" +// Method : "::ConverterState::getObject ()" - ConverterState::ObjectType* ConverterState::GetObject ( char* id ) { + ConverterState::ObjectType* ConverterState::getObject ( char* id ) { for ( unsigned i=0 ; i < _types.size() ; i++ ) { if ( ! strcmp ( id, _types[i]->_id ) ) return ( _types[i] ); } @@ -292,9 +292,9 @@ USING_NAMESPACE_HURRICANE } // ------------------------------------------------------------------- -// Method : "::ConverterState::GetObjectName ()" +// Method : "::ConverterState::getObjectName ()" - char *ConverterState::GetObjectName ( string id ) { + char *ConverterState::getObjectName ( string id ) { for ( unsigned i=0 ; i < _types.size() ; i++ ) { if ( ! strcmp ( id.c_str(), _types[i]->_id ) ) return ( _types[i]->_name ); } @@ -322,18 +322,18 @@ USING_NAMESPACE_HURRICANE string unboundObject = ""; ConverterState::ObjectType* baseType; - for ( unsigned i=0 ; i < __cs.GetTypes().size() ; i++ ) { - baseType = __cs.GetTypes()[i]->PyBase ( object->ob_type ); + for ( unsigned i=0 ; i < __cs.getTypes().size() ; i++ ) { + baseType = __cs.getTypes()[i]->PyBase ( object->ob_type ); if ( PyCallable_Check(object) || baseType ) { *pArg = object; i = baseType->_index; __cs.AddId ( baseType->_id ); - if ( ! __cs.GetTypes()[i]->_isPythonType ) { + if ( ! __cs.getTypes()[i]->_isPythonType ) { void** member = ( (void**)( (unsigned long)object + __objectOffset ) ); if ( *member == NULL ) { - unboundObject = __cs.GetTypes()[i]->_name; + unboundObject = __cs.getTypes()[i]->_name; break; } } @@ -343,15 +343,15 @@ USING_NAMESPACE_HURRICANE } if ( unboundObject.size() ) { - message << "Attempt to call " << __cs.GetFunction() + message << "Attempt to call " << __cs.getFunction() << "() with an unbound " << unboundObject << " argument"; PyErr_SetString ( ProxyError, message.str().c_str() ); return ( 0 ); } - message << "Argument " << __cs.GetSize() + 1 - << " of call to " << __cs.GetFunction() + message << "Argument " << __cs.getSize() + 1 + << " of call to " << __cs.getFunction() << "() is of unmanaged type " << object->ob_type->tp_name; PyErr_SetString ( ProxyError, message.str().c_str() ); @@ -369,12 +369,12 @@ USING_NAMESPACE_HURRICANE __cs.Init ( function ); if ( ! PyArg_ParseTuple(args,"O&",Converter,arg) ) return ( false ); - string firstArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 0 ); - string firstArgTypeExp = ConverterState::GetObjectType ( format , 0 ); + string firstArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 0 ); + string firstArgTypeExp = ConverterState::getObjectType ( format , 0 ); if ( firstArgType != firstArgTypeExp ) { - message << "First argument of call to " << __cs.GetFunction() + message << "First argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( firstArgTypeExp ); + << ", must be of type " << __cs.getObjectName( firstArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); @@ -395,21 +395,21 @@ USING_NAMESPACE_HURRICANE __cs.Init ( function ); if ( ! PyArg_ParseTuple(args,"O&O&",Converter,arg0,Converter,arg1) ) return ( false ); - string firstArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 0 ); - string firstArgTypeExp = ConverterState::GetObjectType ( format , 0 ); + string firstArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 0 ); + string firstArgTypeExp = ConverterState::getObjectType ( format , 0 ); if ( firstArgType != firstArgTypeExp ) { - message << "First argument of call to " << __cs.GetFunction() + message << "First argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg0)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( firstArgTypeExp ); + << ", must be of type " << __cs.getObjectName( firstArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); } - string secondArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 1 ); - string secondArgTypeExp = ConverterState::GetObjectType ( format , 1 ); + string secondArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 1 ); + string secondArgTypeExp = ConverterState::getObjectType ( format , 1 ); if ( secondArgType != secondArgTypeExp ) { - message << "Second argument of call to " << __cs.GetFunction() + message << "Second argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg1)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( secondArgTypeExp ); + << ", must be of type " << __cs.getObjectName( secondArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); } @@ -430,30 +430,30 @@ USING_NAMESPACE_HURRICANE __cs.Init ( function ); if ( ! PyArg_ParseTuple(args,"O&O&O&",Converter,arg0,Converter,arg1,Converter,arg2) ) return ( false ); - string firstArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 0 ); - string firstArgTypeExp = ConverterState::GetObjectType ( format , 0 ); + string firstArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 0 ); + string firstArgTypeExp = ConverterState::getObjectType ( format , 0 ); if ( firstArgType != firstArgTypeExp ) { - message << "First argument of call to " << __cs.GetFunction() + message << "First argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg0)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( firstArgTypeExp ); + << ", must be of type " << __cs.getObjectName( firstArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); } - string secondArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 1 ); - string secondArgTypeExp = ConverterState::GetObjectType ( format , 1 ); + string secondArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 1 ); + string secondArgTypeExp = ConverterState::getObjectType ( format , 1 ); if ( secondArgType != secondArgTypeExp ) { - message << "Second argument of call to " << __cs.GetFunction() + message << "Second argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg1)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( secondArgTypeExp ); + << ", must be of type " << __cs.getObjectName( secondArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); } - string thirdArgType = ConverterState::GetObjectType ( __cs.GetObjectIds(), 2 ); - string thirdArgTypeExp = ConverterState::GetObjectType ( format , 2 ); + string thirdArgType = ConverterState::getObjectType ( __cs.getObjectIds(), 2 ); + string thirdArgTypeExp = ConverterState::getObjectType ( format , 2 ); if ( thirdArgType != thirdArgTypeExp ) { - message << "Third argument of call to " << __cs.GetFunction() + message << "Third argument of call to " << __cs.getFunction() << "() is of unexpected type " << (*arg2)->ob_type->tp_name - << ", must be of type " << __cs.GetObjectName( thirdArgTypeExp ); + << ", must be of type " << __cs.getObjectName( thirdArgTypeExp ); PyErr_SetString ( ProxyError, message.str().c_str() ); return ( false ); } @@ -493,25 +493,25 @@ extern "C" { extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyNetExternalComponents_GetNetExternalComponents ()" + // Attribute Method : "PyNetExternalComponents_getNetExternalComponents ()" - PyObject* PyNetExternalComponents_GetExternalComponents ( PyObject* module, PyObject* args ) + PyObject* PyNetExternalComponents_getExternalComponents ( PyObject* module, PyObject* args ) { - trace << "PyNetExternalComponents_GetExternalComponents()" << endl; + trace << "PyNetExternalComponents_getExternalComponents()" << endl; PyObject* arg0; - if ( ! ParseOneArg ( "GetExternalComponents", args, ":ent", &arg0) ) return ( NULL ); + if ( ! ParseOneArg ( "getExternalComponents", args, ":ent", &arg0) ) return ( NULL ); PyComponentLocator* pyComponentLocator = NULL; HTRY - Components components = GetExternalComponents ( PYNET_O ( arg0 ) ); + Components components = getExternalComponents ( PYNET_O ( arg0 ) ); pyComponentLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator ); if (pyComponentLocator == NULL) { return NULL; } - pyComponentLocator->_object = components.GetLocator (); + pyComponentLocator->_object = components.getLocator (); HCATCH @@ -523,12 +523,12 @@ extern "C" { // x-------------------------------------------------------------x static PyMethodDef PyHurricane_Methods[] = - { { "GetUnit" , PyUnit_GetUnit , METH_VARARGS, "Convert to Unit." } - , { "GetValue" , PyUnit_GetValue , METH_VARARGS, "Convert a Unit to a value." } - , { "GetDataBase" , (PyCFunction)PyDataBase_GetDataBase , METH_NOARGS , "Get the current DataBase." } + { { "getUnit" , PyUnit_getUnit , METH_VARARGS, "Convert to Unit." } + , { "getValue" , PyUnit_getValue , METH_VARARGS, "Convert a Unit to a value." } + , { "getDataBase" , (PyCFunction)PyDataBase_getDataBase , METH_NOARGS , "Get the current DataBase." } , { "OpenUpdateSession" , (PyCFunction)PyUpdateSession_OpenUpdateSession , METH_NOARGS , "Open an UpdateSession." } , { "CloseUpdateSession" , (PyCFunction)PyUpdateSession_CloseUpdateSession, METH_NOARGS , "Close an UpdateSession." } - , { "GetExternalComponents" , (PyCFunction)PyNetExternalComponents_GetExternalComponents, METH_VARARGS, "Returns the components collection of an external net" } + , { "getExternalComponents" , (PyCFunction)PyNetExternalComponents_getExternalComponents, METH_VARARGS, "Returns the components collection of an external net" } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -718,7 +718,7 @@ extern "C" { } // End of extern "C". -# endif // End of Python Module Code Part. +#endif // End of Python Module Code Part. diff --git a/hurricane/src/pyext/PyHurricane.h b/hurricane/src/pyext/PyHurricane.h index cb28c2b5..4c77294d 100644 --- a/hurricane/src/pyext/PyHurricane.h +++ b/hurricane/src/pyext/PyHurricane.h @@ -114,19 +114,19 @@ using namespace std; { } public: ~ConverterState (); - public: ObjectType* GetObject ( char* id ); - public: char* GetObjectId ( PyObject* object ); - public: char* GetObjectName ( string id ); - public: string GetObjectIds () const { return ( _objectIds ); }; - public: char* GetFunction () const { return ( _function ); }; - public: int GetSize () const { return ( _objectIds.size() ); }; - public: const ObjectTypeVector& GetTypes () const { return ( _types ); }; - public: void AddObject ( PyObject* object ) { _objectIds += GetObjectId ( object ); }; + public: ObjectType* getObject ( char* id ); + public: char* getObjectId ( PyObject* object ); + public: char* getObjectName ( string id ); + public: string getObjectIds () const { return ( _objectIds ); }; + public: char* getFunction () const { return ( _function ); }; + public: int getSize () const { return ( _objectIds.size() ); }; + public: const ObjectTypeVector& getTypes () const { return ( _types ); }; + public: void AddObject ( PyObject* object ) { _objectIds += getObjectId ( object ); }; public: void AddId ( char* id ) { _objectIds += ":"; _objectIds += id; }; public: void SetFunction ( char* function ) { _function = function; }; public: void Init ( char* function, char* inheritStop="comp" ); public: void AddType ( char* id, PyTypeObject* pyType, char* name, bool isPythonType, char* idBase="" ); - public: static string GetObjectType ( string objectsTypes, unsigned n ); + public: static string getObjectType ( string objectsTypes, unsigned n ); }; @@ -318,7 +318,7 @@ extern "C" { // ------------------------------------------------------------------- // Attribute Macro For Deletion. -# define DirectDeleteAttribute(PY_FUNC_NAME,PY_SELF_TYPE) \ +# define DirectDestroyAttribute(PY_FUNC_NAME,PY_SELF_TYPE) \ static PyObject* PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* args ) \ { \ if ( self->ACCESS_OBJECT != NULL ) { \ @@ -363,7 +363,7 @@ extern "C" { // ------------------------------------------------------------------- -// Attribute Method For Getting Attributes. +// Attribute Method For getting Attributes. # define DirectGetAttrMethod(PY_FUNC_NAME,PY_OBJECT_METHODS) \ static PyObject* PY_FUNC_NAME ( PyObject* self, char* name ) \ @@ -406,18 +406,18 @@ extern "C" { // ------------------------------------------------------------------- -// Locator Attribute Method For GetElement. +// Locator Attribute Method For getElement. # define LocatorGetElementAttribute(SELF_TYPE) \ - static PyObject* Py##SELF_TYPE##Locator_GetElement ( Py##SELF_TYPE##Locator *self ) \ + static PyObject* Py##SELF_TYPE##Locator_getElement ( Py##SELF_TYPE##Locator *self ) \ { \ - trace << #SELF_TYPE "Locator.GetElement()" << endl; \ - METHOD_HEAD ( #SELF_TYPE "Locator.GetElement()" ) \ + trace << #SELF_TYPE "Locator.getElement()" << endl; \ + METHOD_HEAD ( #SELF_TYPE "Locator.getElement()" ) \ \ SELF_TYPE* element = NULL; \ \ HTRY \ - element = locator->GetElement (); \ + element = locator->getElement (); \ HCATCH \ \ return Py##SELF_TYPE##_Link ( element ); \ @@ -427,18 +427,18 @@ extern "C" { // ------------------------------------------------------------------- -// Locator Attribute Method For GetElement (element is PyEntity). +// Locator Attribute Method For getElement (element is PyEntity). # define LocatorGetElementEntityAttribute(SELF_TYPE) \ - static PyObject* Py##SELF_TYPE##Locator_GetElement ( Py##SELF_TYPE##Locator *self ) \ + static PyObject* Py##SELF_TYPE##Locator_getElement ( Py##SELF_TYPE##Locator *self ) \ { \ - trace << #SELF_TYPE "Locator.GetElement()" << endl; \ - METHOD_HEAD ( #SELF_TYPE "Locator.GetElement()" ) \ + trace << #SELF_TYPE "Locator.getElement()" << endl; \ + METHOD_HEAD ( #SELF_TYPE "Locator.getElement()" ) \ \ PyObject* pyElement = NULL; \ \ HTRY \ - SELF_TYPE* element = locator->GetElement (); \ + SELF_TYPE* element = locator->getElement (); \ if ( element == NULL ) \ Py_RETURN_NONE; \ pyElement = PyEntity_NEW ( element ); \ @@ -451,13 +451,13 @@ extern "C" { // ------------------------------------------------------------------- -// Locator Attribute Method For GetClone. +// Locator Attribute Method For getClone. # define LocatorGetCloneAttribute(SELF_TYPE) \ - static PyObject* Py##SELF_TYPE##Locator_GetClone ( Py##SELF_TYPE##Locator *self ) \ + static PyObject* Py##SELF_TYPE##Locator_getClone ( Py##SELF_TYPE##Locator *self ) \ { \ - trace << #SELF_TYPE "Locator.GetClone()" << endl; \ - METHOD_HEAD ( #SELF_TYPE "Locator.GetClone()" ) \ + trace << #SELF_TYPE "Locator.getClone()" << endl; \ + METHOD_HEAD ( #SELF_TYPE "Locator.getClone()" ) \ \ Py##SELF_TYPE##Locator* cloneLocator = NULL; \ \ @@ -465,7 +465,7 @@ extern "C" { cloneLocator = PyObject_NEW ( Py##SELF_TYPE##Locator, &PyType##SELF_TYPE##Locator ); \ if (cloneLocator == NULL) { return NULL; } \ \ - cloneLocator->_object = locator->GetClone(); \ + cloneLocator->_object = locator->getClone(); \ HCATCH \ \ return ( (PyObject*)cloneLocator ); \ @@ -487,7 +487,7 @@ extern "C" { return ( PyString_FromString("") ); \ \ ostringstream repr; \ - repr << "[" << hex << self << "<->" << (void*)object << " " << GetString(object) << "]"; \ + repr << "[" << hex << self << "<->" << (void*)object << " " << getString(object) << "]"; \ \ return ( PyString_FromString(repr.str().c_str()) ); \ } @@ -507,7 +507,7 @@ extern "C" { if ( object == NULL ) \ return ( PyString_FromString("") ); \ \ - return ( PyString_FromString(GetString(object).c_str()) ); \ + return ( PyString_FromString(getString(object).c_str()) ); \ } @@ -543,7 +543,7 @@ extern "C" { // ------------------------------------------------------------------- // Attribute Macro For DBo Deletion. -# define DBoDeleteAttribute(PY_FUNC_NAME,PY_SELF_TYPE) \ +# define DBoDestroyAttribute(PY_FUNC_NAME,PY_SELF_TYPE) \ static PyObject* PY_FUNC_NAME ( PY_SELF_TYPE *self ) \ { \ HTRY \ @@ -554,14 +554,14 @@ extern "C" { return ( NULL ); \ } \ ProxyProperty* proxy = dynamic_cast \ - ( self->ACCESS_OBJECT->GetProperty ( ProxyProperty::GetPropertyName() ) ); \ + ( self->ACCESS_OBJECT->getProperty ( ProxyProperty::getPropertyName() ) ); \ if (proxy == NULL) { \ ostringstream message; \ message << "Trying to Delete a Hurricane object of with no Proxy attached "; \ PyErr_SetString ( ProxyError, message.str().c_str() ); \ return ( NULL ); \ } \ - self->ACCESS_OBJECT->Delete (); \ + self->ACCESS_OBJECT->destroy(); \ HCATCH \ Py_RETURN_NONE; \ } @@ -577,18 +577,18 @@ extern "C" { PY_SELF_TYPE* pyObject = NULL; \ HTRY \ ProxyProperty* proxy = dynamic_cast \ - ( object->GetProperty ( ProxyProperty::GetPropertyName() ) ); \ + ( object->getProperty ( ProxyProperty::getPropertyName() ) ); \ if ( proxy == NULL ) { \ pyObject = PyObject_NEW(PY_SELF_TYPE, &PY_SELF_CLASS); \ if (pyObject == NULL) { return NULL; } \ \ - proxy = ProxyProperty::Create ( (void*)pyObject ); \ + proxy = ProxyProperty::create ( (void*)pyObject ); \ CHECK_OFFSET ( pyObject ) \ \ pyObject->ACCESS_OBJECT = object; \ - object->Put ( proxy ); \ + object->put ( proxy ); \ } else { \ - pyObject = (PY_SELF_TYPE*)proxy->GetShadow (); \ + pyObject = (PY_SELF_TYPE*)proxy->getShadow (); \ Py_INCREF ( ACCESS_CLASS(pyObject) ); \ } \ HCATCH \ @@ -607,13 +607,13 @@ extern "C" { \ if ( self->ACCESS_OBJECT != NULL ) { \ ProxyProperty* proxy = dynamic_cast \ - ( self->ACCESS_OBJECT->GetProperty ( ProxyProperty::GetPropertyName() ) ); \ + ( self->ACCESS_OBJECT->getProperty ( ProxyProperty::getPropertyName() ) ); \ if (proxy == NULL) { \ ostringstream message; \ message << "deleting a Python object with no Proxy attached "; \ PyErr_SetString ( ProxyError, message.str().c_str() ); \ } \ - self->ACCESS_OBJECT->Remove ( proxy ); \ + self->ACCESS_OBJECT->remove ( proxy ); \ } \ PyObject_DEL ( self ); \ } @@ -683,16 +683,16 @@ extern "C" { } // ------------------------------------------------------------------- -// Direct GetCEngine() Method (no argument) +// Direct getCEngine() Method (no argument) #define DirectGetCEngine(CENGINE) \ - PyObject* Py##CENGINE##_Get##CENGINE ( PyObject* module, PyObject* args ) \ + PyObject* Py##CENGINE##_get##CENGINE ( PyObject* module, PyObject* args ) \ { \ PyObject* arg0; \ CENGINE* cengine = NULL; \ HTRY \ - if (!ParseOneArg("Get" #CENGINE, args, CELL_ARG, &arg0 ) ) return ( NULL ); \ + if (!ParseOneArg("get" #CENGINE, args, CELL_ARG, &arg0 ) ) return ( NULL ); \ Cell* cell = PYCELL_O(arg0); \ - cengine = dynamic_cast(GetCEngine(cell, Name(#CENGINE))); \ + cengine = dynamic_cast(getCEngine(cell, Name(#CENGINE))); \ if (!cengine) { \ cengine = CENGINE::Create (cell); \ } \ @@ -832,11 +832,11 @@ extern "C" { # define HCATCH \ } \ catch ( Error& e ) { \ - PyErr_SetString ( HurricaneError, GetString(e).c_str() ); \ + PyErr_SetString ( HurricaneError, getString(e).c_str() ); \ return ( NULL ); \ } \ catch ( Warning& w ) { \ - PyErr_Warn ( HurricaneWarning, const_cast(GetString(w).c_str()) ); \ + PyErr_Warn ( HurricaneWarning, const_cast(getString(w).c_str()) ); \ } } // End of extern "C". diff --git a/hurricane/src/pyext/PyHyperNet.cpp b/hurricane/src/pyext/PyHyperNet.cpp index 266ef8de..f0fba1ba 100644 --- a/hurricane/src/pyext/PyHyperNet.cpp +++ b/hurricane/src/pyext/PyHyperNet.cpp @@ -91,21 +91,21 @@ extern "C" { // Standart Delete (Attribute). - DirectDeleteAttribute(PyHyperNet_Delete,PyHyperNet) + DirectDestroyAttribute(PyHyperNet_destroy, PyHyperNet) // --------------------------------------------------------------- - // Attribute Method : "PyHyperNet_GetPlugsLocator ()" + // Attribute Method : "PyHyperNet_getPlugsLocator ()" - static PyObject* PyHyperNet_GetLeafPlugOccurrenceLocator ( PyHyperNet *self ) + static PyObject* PyHyperNet_getLeafPlugOccurrenceLocator ( PyHyperNet *self ) { - trace << "PyHyperNet_GetLeafPlugOccurrenceLocator ()" << endl; + trace << "PyHyperNet_getLeafPlugOccurrenceLocator ()" << endl; - METHOD_HEAD ( "HyperNet.GetLeafPlugOccurrenceLocator()" ) + METHOD_HEAD ( "HyperNet.getLeafPlugOccurrenceLocator()" ) - Occurrences occurrences = hyperNet->GetLeafPlugOccurrences (); + Occurrences occurrences = hyperNet->getLeafPlugOccurrences (); PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if (pyOccurrenceLocator == NULL) { return NULL; } @@ -116,7 +116,7 @@ extern "C" { HTRY - pyOccurrenceLocator->_object = occurrences.GetLocator (); + pyOccurrenceLocator->_object = occurrences.getLocator (); HCATCH @@ -125,17 +125,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyHyperNet_GetCell ()" + // Attribute Method : "PyHyperNet_getCell ()" - static PyObject* PyHyperNet_GetCell ( PyHyperNet *self ) + static PyObject* PyHyperNet_getCell ( PyHyperNet *self ) { - trace << "PyHyperNet_GetCell ()" << endl; + trace << "PyHyperNet_getCell ()" << endl; Cell* cell = NULL; HTRY - METHOD_HEAD ( "HyperNet.GetCell()" ) - cell = hyperNet->GetCell (); + METHOD_HEAD ( "HyperNet.getCell()" ) + cell = hyperNet->getCell (); HCATCH return PyCell_Link ( cell ); @@ -149,12 +149,12 @@ extern "C" { // PyHyperNet Attribute Method table. PyMethodDef PyHyperNet_Methods[] = - { { "GetCell" , (PyCFunction)PyHyperNet_GetCell , METH_NOARGS , "Returns the hyperNet cell." } + { { "getCell" , (PyCFunction)PyHyperNet_getCell , METH_NOARGS , "Returns the hyperNet cell." } , { "IsValid" , (PyCFunction)PyHyperNet_IsValid , METH_NOARGS , "Returns trus if the HyperNet isValid." } - , { "GetLeafPlugOccurrenceLocator", (PyCFunction)PyHyperNet_GetLeafPlugOccurrenceLocator, METH_NOARGS + , { "getLeafPlugOccurrenceLocator", (PyCFunction)PyHyperNet_getLeafPlugOccurrenceLocator, METH_NOARGS , "Returns the collection of leaf occurrences" } - , { "Delete" , (PyCFunction)PyHyperNet_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyHyperNet_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyInstance.cpp b/hurricane/src/pyext/PyInstance.cpp index c805a630..3021a672 100644 --- a/hurricane/src/pyext/PyInstance.cpp +++ b/hurricane/src/pyext/PyInstance.cpp @@ -134,24 +134,24 @@ extern "C" { // Standart Accessors (Attributes). - // Standart Delete (Attribute). - DBoDeleteAttribute(PyInstance_Delete,PyInstance) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyInstance_destroy,PyInstance) // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetName ()" + // Attribute Method : "PyInstance_getName ()" - static PyObject* PyInstance_GetName ( PyInstance *self ) { - trace << "PyInstance_GetName ()" << endl; - METHOD_HEAD ( "Instance.GetName()" ) + static PyObject* PyInstance_getName ( PyInstance *self ) { + trace << "PyInstance_getName ()" << endl; + METHOD_HEAD ( "Instance.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( instance->GetName() ); + pyName->_object = new Name ( instance->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -161,32 +161,32 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetMasterCell ()" + // Attribute Method : "PyInstance_getMasterCell ()" - static PyObject* PyInstance_GetMasterCell ( PyInstance *self ) { - trace << "PyInstance_GetMasterCell ()" << endl; + static PyObject* PyInstance_getMasterCell ( PyInstance *self ) { + trace << "PyInstance_getMasterCell ()" << endl; Cell* cell = NULL; HTRY - METHOD_HEAD ( "Instance.GetMasterCell()" ) - cell = instance->GetMasterCell (); + METHOD_HEAD ( "Instance.getMasterCell()" ) + cell = instance->getMasterCell (); HCATCH return PyCell_Link ( cell ); } // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetPlacementStatus ()" + // Attribute Method : "PyInstance_getPlacementStatus ()" - static PyObject* PyInstance_GetPlacementStatus ( PyInstance *self ) { - trace << "PyInstance_GetPlacementStatus ()" << endl; + static PyObject* PyInstance_getPlacementStatus ( PyInstance *self ) { + trace << "PyInstance_getPlacementStatus ()" << endl; - METHOD_HEAD ( "Instance.GetPlacementStatus()" ); + METHOD_HEAD ( "Instance.getPlacementStatus()" ); PyObject* pyObject = NULL; HTRY - pyObject = (PyObject*)Py_BuildValue("i",(long)instance->GetPlacementStatus().GetCode()); + pyObject = (PyObject*)Py_BuildValue("i",(long)instance->getPlacementStatus().getCode()); HCATCH return pyObject; @@ -213,17 +213,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetTransformation ()" + // Attribute Method : "PyInstance_getTransformation ()" - static PyObject* PyInstance_GetTransformation ( PyInstance *self ) { - trace << "PyInstance_GetTransformation ()" << endl; - METHOD_HEAD ( "Instance.GetTransformation()" ); + static PyObject* PyInstance_getTransformation ( PyInstance *self ) { + trace << "PyInstance_getTransformation ()" << endl; + METHOD_HEAD ( "Instance.getTransformation()" ); PyTransformation* resultPyTransf = PyObject_NEW ( PyTransformation, &PyTypeTransformation ); if ( resultPyTransf == NULL ) { return NULL; } HTRY - resultPyTransf->_object = new Transformation ( instance->GetTransformation () ); + resultPyTransf->_object = new Transformation ( instance->getTransformation () ); HCATCH return ( (PyObject*)resultPyTransf ); @@ -233,20 +233,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetPlug ()" + // Attribute Method : "PyInstance_getPlug ()" - static PyObject* PyInstance_GetPlug ( PyInstance *self, PyObject* args ) { - trace << "PyInstance_GetPlug ()" << endl; + static PyObject* PyInstance_getPlug ( PyInstance *self, PyObject* args ) { + trace << "PyInstance_getPlug ()" << endl; Plug* plug = NULL; HTRY - METHOD_HEAD ( "Instance.GetPlug()" ) + METHOD_HEAD ( "Instance.getPlug()" ) PyNet* masterNet; - if ( ! ParseOneArg ( "Instance.GetPlug", args, NET_ARG, (PyObject**)&masterNet ) ) return ( NULL ); + if ( ! ParseOneArg ( "Instance.getPlug", args, NET_ARG, (PyObject**)&masterNet ) ) return ( NULL ); - plug = instance->GetPlug( PYNET_O(masterNet) ); + plug = instance->getPlug( PYNET_O(masterNet) ); HCATCH return PyPlug_Link ( plug ); @@ -256,21 +256,21 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetPlugsLocator ()" + // Attribute Method : "PyInstance_getPlugsLocator ()" - static PyObject* PyInstance_GetPlugsLocator ( PyInstance *self ) { - trace << "PyInstance_GetPlugsLocator ()" << endl; - METHOD_HEAD ( "Instance.GetPlugsLocator()" ) + static PyObject* PyInstance_getPlugsLocator ( PyInstance *self ) { + trace << "PyInstance_getPlugsLocator ()" << endl; + METHOD_HEAD ( "Instance.getPlugsLocator()" ) PyPlugLocator* pyPlugLocator = NULL; HTRY - Plugs plugs = instance->GetPlugs (); + Plugs plugs = instance->getPlugs (); pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator ); if (pyPlugLocator == NULL) { return NULL; } - pyPlugLocator->_object = plugs.GetLocator (); + pyPlugLocator->_object = plugs.getLocator (); HCATCH return ( (PyObject*)pyPlugLocator ); @@ -280,22 +280,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetConnectedPlugsLocator ()" + // Attribute Method : "PyInstance_getConnectedPlugsLocator ()" - static PyObject* PyInstance_GetConnectedPlugsLocator ( PyInstance *self ) + static PyObject* PyInstance_getConnectedPlugsLocator ( PyInstance *self ) { - trace << "PyInstance_GetConnectedPlugsLocator ()" << endl; - METHOD_HEAD ( "Instance.GetConnectedPlugsLocator()" ) + trace << "PyInstance_getConnectedPlugsLocator ()" << endl; + METHOD_HEAD ( "Instance.getConnectedPlugsLocator()" ) PyPlugLocator* pyPlugLocator = NULL; HTRY - Plugs plugs = instance->GetConnectedPlugs (); + Plugs plugs = instance->getConnectedPlugs (); pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator ); if (pyPlugLocator == NULL) { return NULL; } - pyPlugLocator->_object = plugs.GetLocator (); + pyPlugLocator->_object = plugs.getLocator (); HCATCH return ( (PyObject*)pyPlugLocator ); @@ -305,22 +305,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetUnconnectedPlugsLocator ()" + // Attribute Method : "PyInstance_getUnconnectedPlugsLocator ()" - static PyObject* PyInstance_GetUnconnectedPlugsLocator ( PyInstance *self ) + static PyObject* PyInstance_getUnconnectedPlugsLocator ( PyInstance *self ) { - trace << "PyInstance_GetUnconnectedPlugsLocator ()" << endl; - METHOD_HEAD ( "Instance.GetUnconnectedPlugsLocator()" ) + trace << "PyInstance_getUnconnectedPlugsLocator ()" << endl; + METHOD_HEAD ( "Instance.getUnconnectedPlugsLocator()" ) PyPlugLocator* pyPlugLocator = NULL; HTRY - Plugs plugs = instance->GetUnconnectedPlugs (); + Plugs plugs = instance->getUnconnectedPlugs (); pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator ); if (pyPlugLocator == NULL) { return NULL; } - pyPlugLocator->_object = plugs.GetLocator (); + pyPlugLocator->_object = plugs.getLocator (); HCATCH return ( (PyObject*)pyPlugLocator ); @@ -330,18 +330,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyInstance_GetAbutmentBox ()" + // Attribute Method : "PyInstance_getAbutmentBox ()" - static PyObject* PyInstance_GetAbutmentBox ( PyInstance *self ) + static PyObject* PyInstance_getAbutmentBox ( PyInstance *self ) { - trace << "PyInstance_GetAbutmentBox ()" << endl; - METHOD_HEAD ( "Instance.GetAbutmentBox()" ) + trace << "PyInstance_getAbutmentBox ()" << endl; + METHOD_HEAD ( "Instance.getAbutmentBox()" ) PyBox* pyBox = PyObject_NEW ( PyBox, &PyTypeBox ); if (pyBox == NULL) { return NULL; } HTRY - pyBox->_object = new Box ( instance->GetAbutmentBox() ); + pyBox->_object = new Box ( instance->getAbutmentBox() ); HCATCH return ( (PyObject*)pyBox ); @@ -421,17 +421,17 @@ extern "C" { // PyInstance Attribute Method table. PyMethodDef PyInstance_Methods[] = - { { "GetName" , (PyCFunction)PyInstance_GetName , METH_NOARGS , "Returns the instance name." } - , { "GetMasterCell" , (PyCFunction)PyInstance_GetMasterCell , METH_NOARGS , "Returns the cell model referenced by the instance." } - , { "GetTransformation" , (PyCFunction)PyInstance_GetTransformation , METH_NOARGS , "Returns the transformation associated to the instance." } - , { "GetPlacementStatus" , (PyCFunction)PyInstance_GetPlacementStatus , METH_NOARGS , "Returns the placement status of the instance." } - , { "GetPlug" , (PyCFunction)PyInstance_GetPlug , METH_VARARGS, "Returns the plug associated to the if it exists or else NULL (if the net is not external)." } - , { "GetPlugsLocator" , (PyCFunction)PyInstance_GetPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs." } - , { "GetConnectedPlugsLocator" , (PyCFunction)PyInstance_GetConnectedPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." } - , { "GetUnconnectedPlugsLocator", (PyCFunction)PyInstance_GetUnconnectedPlugsLocator, METH_NOARGS , "Returns the collection of instance plugs which are not connected." } - //, { "GetPath" , (PyCFunction)PyInstance_GetPath , METH_NOARGS , "Returns the path composed of the instance solely." } - //, { "GetPath" , (PyCFunction)PyInstance_GetPath , METH_VARARGS, "Returns the path resulting of the concatenation of the instance and the tail path (possibly empty)." } - , { "GetAbutmentBox" , (PyCFunction)PyInstance_GetAbutmentBox , METH_NOARGS , "Returns the abutment box of the instance, that is the abutment box of the master cell to which has been applied the instance transformation." } + { { "getName" , (PyCFunction)PyInstance_getName , METH_NOARGS , "Returns the instance name." } + , { "getMasterCell" , (PyCFunction)PyInstance_getMasterCell , METH_NOARGS , "Returns the cell model referenced by the instance." } + , { "getTransformation" , (PyCFunction)PyInstance_getTransformation , METH_NOARGS , "Returns the transformation associated to the instance." } + , { "getPlacementStatus" , (PyCFunction)PyInstance_getPlacementStatus , METH_NOARGS , "Returns the placement status of the instance." } + , { "getPlug" , (PyCFunction)PyInstance_getPlug , METH_VARARGS, "Returns the plug associated to the if it exists or else NULL (if the net is not external)." } + , { "getPlugsLocator" , (PyCFunction)PyInstance_getPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs." } + , { "getConnectedPlugsLocator" , (PyCFunction)PyInstance_getConnectedPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." } + , { "getUnconnectedPlugsLocator", (PyCFunction)PyInstance_getUnconnectedPlugsLocator, METH_NOARGS , "Returns the collection of instance plugs which are not connected." } + //, { "getPath" , (PyCFunction)PyInstance_getPath , METH_NOARGS , "Returns the path composed of the instance solely." } + //, { "getPath" , (PyCFunction)PyInstance_getPath , METH_VARARGS, "Returns the path resulting of the concatenation of the instance and the tail path (possibly empty)." } + , { "getAbutmentBox" , (PyCFunction)PyInstance_getAbutmentBox , METH_NOARGS , "Returns the abutment box of the instance, that is the abutment box of the master cell to which has been applied the instance transformation." } , { "IsTerminal" , (PyCFunction)PyInstance_IsTerminal , METH_NOARGS , "Returns true if the instance is a terminal instance." } , { "IsLeaf" , (PyCFunction)PyInstance_IsLeaf , METH_NOARGS , "Returns true if the instance is a leaf instance." } , { "IsBound" , (PyCFunction)PyInstance_IsPyBound , METH_NOARGS, "Returns true if the instance is bounded to the hurricane instance" } @@ -439,8 +439,8 @@ extern "C" { , { "SetTransformation" , (PyCFunction)PyInstance_SetTransformation , METH_VARARGS, "Allows to modify the instance transformation." } , { "SetPlacementStatus" , (PyCFunction)PyInstance_SetPlacementStatus , METH_VARARGS, "Allows to modify the instance placement status." } , { "SetMasterCell" , (PyCFunction)PyInstance_SetMasterCell , METH_VARARGS, "Allows to change the cell referenced by this instance." } - , { "Delete" , (PyCFunction)PyInstance_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "destroy" , (PyCFunction)PyInstance_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -472,15 +472,15 @@ extern "C" { ,Converter,&arg3 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == CELL_NAME_CELL_ARG ) { instance = Instance::Create ( PYCELL_O(arg0) + if ( __cs.getObjectIds() == CELL_NAME_CELL_ARG ) { instance = Instance::Create ( PYCELL_O(arg0) , *PYNAME_O(arg1) , PYCELL_O(arg2) ); } - else if ( __cs.GetObjectIds() == CELL_NAME_CELL_TRANS_ARG ) { instance = Instance::Create ( PYCELL_O(arg0) + else if ( __cs.getObjectIds() == CELL_NAME_CELL_TRANS_ARG ) { instance = Instance::Create ( PYCELL_O(arg0) , *PYNAME_O(arg1) , PYCELL_O(arg2) , *PYTRANSFORMATION_O(arg3) , Instance::PlacementStatus::PLACED); } else { - cerr << __cs.GetObjectIds() << endl; + cerr << __cs.getObjectIds() << endl; PyErr_SetString ( ConstructorError, "invalid number of parameters for Instance constructor." ); return ( NULL ); } diff --git a/hurricane/src/pyext/PyInstanceLocator.cpp b/hurricane/src/pyext/PyInstanceLocator.cpp index 937bf80f..d7981fb2 100644 --- a/hurricane/src/pyext/PyInstanceLocator.cpp +++ b/hurricane/src/pyext/PyInstanceLocator.cpp @@ -93,8 +93,8 @@ extern "C" { LocatorGetCloneAttribute(Instance) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyInstanceLocator_Delete,PyInstanceLocator) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyInstanceLocator_destroy, PyInstanceLocator) @@ -105,10 +105,10 @@ extern "C" { PyMethodDef PyInstanceLocator_Methods[] = { { "IsValid" , (PyCFunction)PyInstanceLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyInstanceLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyInstanceLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyInstanceLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyInstanceLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyInstanceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyInstanceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyInstanceLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyLayer.cpp b/hurricane/src/pyext/PyLayer.cpp index 227291e8..af5cbf66 100644 --- a/hurricane/src/pyext/PyLayer.cpp +++ b/hurricane/src/pyext/PyLayer.cpp @@ -83,22 +83,22 @@ extern "C" { // Standart Accessors (Attributes). - // Standart Delete (Attribute). - DBoDeleteAttribute(PyLayer_Delete,PyLayer) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyLayer_destroy, PyLayer) // --------------------------------------------------------------- - // Attribute Method : "PyLayer_GetTechnology ()" + // Attribute Method : "PyLayer_getTechnology ()" - static PyObject* PyLayer_GetTechnology ( PyLayer *self ) + static PyObject* PyLayer_getTechnology ( PyLayer *self ) { - trace << "PyLayer_GetTechnology ()" << endl; + trace << "PyLayer_getTechnology ()" << endl; Technology* techno = NULL; HTRY - METHOD_HEAD ( "Layer.GetTechnology()" ) - techno = layer->GetTechnology (); + METHOD_HEAD ( "Layer.getTechnology()" ) + techno = layer->getTechnology (); HCATCH return PyTechnology_Link ( techno ); @@ -107,19 +107,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyLayer_GetName ()" + // Attribute Method : "PyLayer_getName ()" - static PyObject* PyLayer_GetName ( PyLayer *self ) + static PyObject* PyLayer_getName ( PyLayer *self ) { - trace << "Layer_GetName ()" << endl; - METHOD_HEAD ( "Layer.GetName()" ) + trace << "Layer_getName ()" << endl; + METHOD_HEAD ( "Layer.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( layer->GetName() ); + pyName->_object = new Name ( layer->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -139,7 +139,7 @@ extern "C" { PyName* name; if ( ! ParseOneArg ( "Layer.SetName", args, NAME_ARG, (PyObject**)&name ) ) return ( NULL ); - layer->SetName ( *PYNAME_O(name) ); + layer->setName ( *PYNAME_O(name) ); HCATCH Py_RETURN_NONE; @@ -151,11 +151,11 @@ extern "C" { // PyLayer Attribute Method table. PyMethodDef PyLayer_Methods[] = - { { "GetTechnology" , (PyCFunction)PyLayer_GetTechnology , METH_NOARGS , "Returns the technology owning the layer." } - , { "GetName" , (PyCFunction)PyLayer_GetName , METH_NOARGS , "Returns the name of the layer." } + { { "getTechnology" , (PyCFunction)PyLayer_getTechnology , METH_NOARGS , "Returns the technology owning the layer." } + , { "getName" , (PyCFunction)PyLayer_getName , METH_NOARGS , "Returns the name of the layer." } , { "SetName" , (PyCFunction)PyLayer_SetName , METH_VARARGS, "Allows to change the layer name." } - , { "Delete" , (PyCFunction)PyLayer_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "destroy" , (PyCFunction)PyLayer_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyLibrary.cpp b/hurricane/src/pyext/PyLibrary.cpp index 6e09d2ad..ef2d3d61 100644 --- a/hurricane/src/pyext/PyLibrary.cpp +++ b/hurricane/src/pyext/PyLibrary.cpp @@ -84,17 +84,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyLibrary_GetName ()" + // Attribute Method : "PyLibrary_getName ()" - static PyObject* PyLibrary_GetName ( PyLibrary *self ) { - trace << "PyLibrary_GetName ()" << endl; - METHOD_HEAD ( "Library.GetName()" ) + static PyObject* PyLibrary_getName ( PyLibrary *self ) { + trace << "PyLibrary_getName ()" << endl; + METHOD_HEAD ( "Library.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( lib->GetName() ); + pyName->_object = new Name ( lib->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -103,20 +103,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyLibrary_GetCell ()" + // Attribute Method : "PyLibrary_getCell ()" - PyObject* PyLibrary_GetCell ( PyLibrary* self, PyObject* args ) { - trace << "PyLibrary_GetCell ()" << endl; + PyObject* PyLibrary_getCell ( PyLibrary* self, PyObject* args ) { + trace << "PyLibrary_getCell ()" << endl; Cell* cell = NULL; HTRY - METHOD_HEAD ( "Library.GetCell()" ) + METHOD_HEAD ( "Library.getCell()" ) PyObject* arg0; - if ( ! ParseOneArg ( "Library.GetCell", args, NAME_ARG, &arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Library.getCell", args, NAME_ARG, &arg0 ) ) return ( NULL ); - cell = lib->GetCell ( *PYNAME_O(arg0) ); + cell = lib->getCell ( *PYNAME_O(arg0) ); HCATCH return PyCell_Link ( cell ); @@ -125,19 +125,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyLibrary_GetCellsLocator ()" + // Attribute Method : "PyLibrary_getCellsLocator ()" - static PyObject* PyLibrary_GetCellsLocator ( PyLibrary *self ) { - trace << "PyLibrary_GetCellsLocator ()" << endl; - METHOD_HEAD ( "Library.GetCellsLocator()" ) + static PyObject* PyLibrary_getCellsLocator ( PyLibrary *self ) { + trace << "PyLibrary_getCellsLocator ()" << endl; + METHOD_HEAD ( "Library.getCellsLocator()" ) - Cells cells = lib->GetCells (); + Cells cells = lib->getCells (); PyCellLocator* pyCellLocator = PyObject_NEW ( PyCellLocator, &PyTypeCellLocator ); if (pyCellLocator == NULL) { return NULL; } HTRY - pyCellLocator->_object = cells.GetLocator (); + pyCellLocator->_object = cells.getLocator (); HCATCH return ( (PyObject*)pyCellLocator ); @@ -147,19 +147,19 @@ extern "C" { // Standart Accessors (Attributes). - // Standart Delete (Attribute). - DBoDeleteAttribute(PyLibrary_Delete,PyLibrary) + // Standart Destroy (Attribute). + DBoDestroyAttribute(PyLibrary_destroy, PyLibrary) // --------------------------------------------------------------- // PyLibrary Attribute Method table. PyMethodDef PyLibrary_Methods[] = { - { "GetName" , (PyCFunction)PyLibrary_GetName , METH_NOARGS , "Returns the name of the library." } - , { "GetCell" , (PyCFunction)PyLibrary_GetCell , METH_VARARGS, "Get the cell of name " } - , { "GetCellsLocator", (PyCFunction)PyLibrary_GetCellsLocator, METH_NOARGS , "Returns the collection of all cells of the library." } - , { "Delete" , (PyCFunction)PyLibrary_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + { "getName" , (PyCFunction)PyLibrary_getName , METH_NOARGS , "Returns the name of the library." } + , { "getCell" , (PyCFunction)PyLibrary_getCell , METH_VARARGS, "Get the cell of name " } + , { "getCellsLocator", (PyCFunction)PyLibrary_getCellsLocator, METH_NOARGS , "Returns the collection of all cells of the library." } + , { "destroy" , (PyCFunction)PyLibrary_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyName.cpp b/hurricane/src/pyext/PyName.cpp index 5ff9a27c..ab03a623 100644 --- a/hurricane/src/pyext/PyName.cpp +++ b/hurricane/src/pyext/PyName.cpp @@ -74,14 +74,9 @@ extern "C" { // | "PyName" Attribute Methods | // x-------------------------------------------------------------x - - - - // Standart Delete (Attribute). //DirectGetBoolAttribute(PyName_IsEmpty,IsEmpty,PyName,Name) - static PyObject* PyName_IsEmpty ( PyName *self ) - { + static PyObject* PyName_IsEmpty ( PyName *self ) { trace << "PyName_IsEmpty()" << endl; METHOD_HEAD ( "Name.IsEmpty()" ) @@ -89,8 +84,8 @@ extern "C" { } - // Standart Delete (Attribute). - DirectDeleteAttribute(PyName_Delete,PyName) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyName_destroy, PyName) @@ -100,8 +95,8 @@ extern "C" { PyMethodDef PyName_Methods[] = { { "IsEmpty" , (PyCFunction)PyName_IsEmpty , METH_NOARGS , "True if empty." } - , { "Delete" , (PyCFunction)PyName_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "destroy" , (PyCFunction)PyName_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -118,8 +113,8 @@ extern "C" { if (!PyArg_ParseTuple(args,"|O&:Name.new",Converter,&arg0) ) return ( NULL ); HTRY - if (__cs.GetObjectIds() == NO_ARG ) { name = new Name (); } - else if (__cs.GetObjectIds() == STRING_ARG ) { name = new Name ( PyString_AsString(arg0) ); } + if (__cs.getObjectIds() == NO_ARG ) { name = new Name (); } + else if (__cs.getObjectIds() == STRING_ARG ) { name = new Name ( PyString_AsString(arg0) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Name constructor." ); return(NULL); diff --git a/hurricane/src/pyext/PyNet.cpp b/hurricane/src/pyext/PyNet.cpp index 3cda7e60..a8358529 100644 --- a/hurricane/src/pyext/PyNet.cpp +++ b/hurricane/src/pyext/PyNet.cpp @@ -164,8 +164,8 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyNet_GetX,GetX,PyNet,Net) - DirectGetLongAttribute(PyNet_GetY,GetY,PyNet,Net) + DirectGetLongAttribute(PyNet_getX,getX,PyNet,Net) + DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net) // Standart Predicates (Attributes). DirectGetBoolAttribute(PyNet_IsGlobal ,IsGlobal ,PyNet,Net) @@ -178,20 +178,19 @@ extern "C" { GetBoundStateAttribute(PyNet_IsPyBound ,PyNet,Net) - // Standart Delete (Attribute). - DBoDeleteAttribute(PyNet_Delete,PyNet) + // Standart destroy (Attribute). + DBoDestroyAttribute(PyNet_destroy, PyNet) // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetName ()" + // Attribute Method : "PyNet_getName ()" - static PyObject* PyNet_GetName ( PyNet *self ) - { - trace << "PyNet_GetName ()" << endl; + static PyObject* PyNet_getName ( PyNet *self ) { + trace << "PyNet_getName ()" << endl; - METHOD_HEAD ( "Net.GetName()" ) + METHOD_HEAD ( "Net.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } @@ -202,7 +201,7 @@ extern "C" { HTRY - pyName->_object = new Name ( net->GetName() ); + pyName->_object = new Name ( net->getName() ); HCATCH @@ -212,42 +211,42 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetType ()" + // Attribute Method : "PyNet_getType ()" - static PyObject* PyNet_GetType ( PyNet *self ) + static PyObject* PyNet_getType ( PyNet *self ) { - trace << "PyNet_GetType ()" << endl; + trace << "PyNet_getType ()" << endl; - METHOD_HEAD ( "Net.GetType()" ) + METHOD_HEAD ( "Net.getType()" ) - return ( (PyObject*)Py_BuildValue("i",(long)net->GetType().GetCode()) ); + return ( (PyObject*)Py_BuildValue("i",(long)net->getType().getCode()) ); } // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetDirection ()" + // Attribute Method : "PyNet_getDirection ()" - static PyObject* PyNet_GetDirection ( PyNet *self ) + static PyObject* PyNet_getDirection ( PyNet *self ) { - trace << "PyNet_GetDirection ()" << endl; + trace << "PyNet_getDirection ()" << endl; - METHOD_HEAD ( "Net.GetDirection()" ) + METHOD_HEAD ( "Net.getDirection()" ) - return ( (PyObject*)Py_BuildValue("i",(long)net->GetDirection().GetCode()) ); + return ( (PyObject*)Py_BuildValue("i",(long)net->getDirection().getCode()) ); } // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetPlugsLocator ()" + // Attribute Method : "PyNet_getPlugsLocator ()" - static PyObject* PyNet_GetPlugsLocator ( PyNet *self ) + static PyObject* PyNet_getPlugsLocator ( PyNet *self ) { - trace << "PyNet_GetPlugsLocator ()" << endl; + trace << "PyNet_getPlugsLocator ()" << endl; - METHOD_HEAD ( "Net.GetPlugsLocator()" ) + METHOD_HEAD ( "Net.getPlugsLocator()" ) - Plugs plugs = net->GetPlugs (); + Plugs plugs = net->getPlugs (); PyPlugLocator* pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator ); if (pyPlugLocator == NULL) { return NULL; } @@ -258,7 +257,7 @@ extern "C" { HTRY - pyPlugLocator->_object = plugs.GetLocator (); + pyPlugLocator->_object = plugs.getLocator (); HCATCH @@ -267,15 +266,15 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetSegmentsLocator ()" + // Attribute Method : "PyNet_getSegmentsLocator ()" - static PyObject* PyNet_GetSegmentsLocator ( PyNet *self ) + static PyObject* PyNet_getSegmentsLocator ( PyNet *self ) { - trace << "PyNet_GetSegmentsLocator ()" << endl; + trace << "PyNet_getSegmentsLocator ()" << endl; - METHOD_HEAD ( "Net.GetSegmentsLocator()" ) + METHOD_HEAD ( "Net.getSegmentsLocator()" ) - Segments segments = net->GetSegments (); + Segments segments = net->getSegments (); PySegmentLocator* pySegmentLocator = PyObject_NEW ( PySegmentLocator, &PyTypeSegmentLocator ); if (pySegmentLocator == NULL) { return NULL; } @@ -286,7 +285,7 @@ extern "C" { HTRY - pySegmentLocator->_object = segments.GetLocator (); + pySegmentLocator->_object = segments.getLocator (); HCATCH @@ -295,15 +294,15 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetPinsLocator ()" + // Attribute Method : "PyNet_getPinsLocator ()" - static PyObject* PyNet_GetPinsLocator ( PyNet *self ) + static PyObject* PyNet_getPinsLocator ( PyNet *self ) { - trace << "PyNet_GetPinsLocator ()" << endl; + trace << "PyNet_getPinsLocator ()" << endl; - METHOD_HEAD ( "Net.GetPinsLocator()" ) + METHOD_HEAD ( "Net.getPinsLocator()" ) - Pins pins = net->GetPins (); + Pins pins = net->getPins (); PyPinLocator* pyPinLocator = PyObject_NEW ( PyPinLocator, &PyTypePinLocator ); if (pyPinLocator == NULL) { return NULL; } @@ -314,7 +313,7 @@ extern "C" { HTRY - pyPinLocator->_object = pins.GetLocator (); + pyPinLocator->_object = pins.getLocator (); HCATCH @@ -322,15 +321,15 @@ extern "C" { } // --------------------------------------------------------------- - // Attribute Method : "PyNet_GetExternalComponentsLocator ()" + // Attribute Method : "PyNet_getExternalComponentsLocator ()" - static PyObject* PyNet_GetExternalComponentsLocator ( PyNet *self ) + static PyObject* PyNet_getExternalComponentsLocator ( PyNet *self ) { - trace << "PyNet_GetExternalComponentsLocator ()" << endl; + trace << "PyNet_getExternalComponentsLocator ()" << endl; - METHOD_HEAD ( "Net.GetExternalcomponentsLocator()" ) + METHOD_HEAD ( "Net.getExternalcomponentsLocator()" ) - Components externalComponents = GetExternalComponents(net); + Components externalComponents = getExternalComponents(net); PyComponentLocator* pyExternalComponentsLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator ); if (pyExternalComponentsLocator == NULL) { return NULL; } @@ -341,7 +340,7 @@ extern "C" { HTRY - pyExternalComponentsLocator->_object = externalComponents.GetLocator (); + pyExternalComponentsLocator->_object = externalComponents.getLocator (); HCATCH @@ -517,31 +516,31 @@ extern "C" { // PyNet Attribute Method table. PyMethodDef PyNet_Methods[] = - { { "GetName" , (PyCFunction)PyNet_GetName , METH_NOARGS , "Returns the net name." } - //, { "GetArity" , (PyCFunction)PyNet_GetArity , METH_NOARGS , "Returns the signal arity." } - , { "GetType" , (PyCFunction)PyNet_GetType , METH_NOARGS + { { "getName" , (PyCFunction)PyNet_getName , METH_NOARGS , "Returns the net name." } + //, { "getArity" , (PyCFunction)PyNet_getArity , METH_NOARGS , "Returns the signal arity." } + , { "getType" , (PyCFunction)PyNet_getType , METH_NOARGS , "Returns the signal type (by default set to UNDEFINED)." } - , { "GetDirection" , (PyCFunction)PyNet_GetDirection , METH_NOARGS + , { "getDirection" , (PyCFunction)PyNet_getDirection , METH_NOARGS , "Returns the signal direction (by default set to UNDEFINED)." } - //, { "GetPosition" , (PyCFunction)PyNet_GetPosition , METH_NOARGS + //, { "getPosition" , (PyCFunction)PyNet_getPosition , METH_NOARGS // , "Returns the X,Y position of the net. This position is used for computing the location of the plugs (on slave instances calling the cell owning this net) having that net as master." } - , { "GetX" , (PyCFunction)PyNet_GetX , METH_NOARGS , "Returns net abscissa." } - , { "GetY" , (PyCFunction)PyNet_GetY , METH_NOARGS , "Returns net ordinate." } - //, { "GetRubbers" , (PyCFunction)PyNet_GetRubbers , METH_NOARGS , "Returns the collection of net's rubbers." } - //, { "GetComponents" , (PyCFunction)PyNet_GetComponents , METH_NOARGS , "Returns the collection of net's components." } - , { "GetExternalComponents", (PyCFunction)PyNet_GetExternalComponentsLocator , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" } - , { "GetPlugsLocator" , (PyCFunction)PyNet_GetPlugsLocator , METH_NOARGS , "Returns the collection of net's plugs." } - //, { "GetContacts" , (PyCFunction)PyNet_GetContacts , METH_NOARGS , "Returns the collection of net's contacts." } - , { "GetPinsLocator" , (PyCFunction)PyNet_GetPinsLocator , METH_NOARGS , "Returns the collection of net's pins." } - , { "GetSegmentsLocator" , (PyCFunction)PyNet_GetSegmentsLocator , METH_NOARGS , "Returns the collection of net's segments." } - //, { "GetSegments" , (PyCFunction)PyNet_GetSegments , METH_NOARGS , "Returns the collection of net's segments." } - //, { "GetVerticals" , (PyCFunction)PyNet_GetVerticals , METH_NOARGS , "Returns the collection of net's vertical segments." } - //, { "GetHorizontals" , (PyCFunction)PyNet_GetHorizontals , METH_NOARGS , "Returns the collection of net's horizontal segments." } - //, { "GetPads" , (PyCFunction)PyNet_GetPads , METH_NOARGS , "Returns the collection of net's pads." } - //, { "GetSavePlugs" , (PyCFunction)PyNet_GetSavePlugs , METH_NOARGS , "Returns the collection of plugs which have this net as master." } - //, { "GetConnectedSavePlugs", (PyCFunction)PyNet_GetConnectedSavePlugs , METH_NOARGS + , { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." } + , { "getY" , (PyCFunction)PyNet_getY , METH_NOARGS , "Returns net ordinate." } + //, { "getRubbers" , (PyCFunction)PyNet_getRubbers , METH_NOARGS , "Returns the collection of net's rubbers." } + //, { "getComponents" , (PyCFunction)PyNet_getComponents , METH_NOARGS , "Returns the collection of net's components." } + , { "getExternalComponents", (PyCFunction)PyNet_getExternalComponentsLocator , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" } + , { "getPlugsLocator" , (PyCFunction)PyNet_getPlugsLocator , METH_NOARGS , "Returns the collection of net's plugs." } + //, { "getContacts" , (PyCFunction)PyNet_getContacts , METH_NOARGS , "Returns the collection of net's contacts." } + , { "getPinsLocator" , (PyCFunction)PyNet_getPinsLocator , METH_NOARGS , "Returns the collection of net's pins." } + , { "getSegmentsLocator" , (PyCFunction)PyNet_getSegmentsLocator , METH_NOARGS , "Returns the collection of net's segments." } + //, { "getSegments" , (PyCFunction)PyNet_getSegments , METH_NOARGS , "Returns the collection of net's segments." } + //, { "getVerticals" , (PyCFunction)PyNet_getVerticals , METH_NOARGS , "Returns the collection of net's vertical segments." } + //, { "getHorizontals" , (PyCFunction)PyNet_getHorizontals , METH_NOARGS , "Returns the collection of net's horizontal segments." } + //, { "getPads" , (PyCFunction)PyNet_getPads , METH_NOARGS , "Returns the collection of net's pads." } + //, { "getSavePlugs" , (PyCFunction)PyNet_getSavePlugs , METH_NOARGS , "Returns the collection of plugs which have this net as master." } + //, { "getConnectedSavePlugs", (PyCFunction)PyNet_getConnectedSavePlugs , METH_NOARGS // , "Returns the collection of connected plugs which have this net as master." } - //, { "GetUnconnectedSavePlugs", (PyCFunction)PyNet_GetUnconnectedSavePlugs, METH_NOARGS + //, { "getUnconnectedSavePlugs", (PyCFunction)PyNet_getUnconnectedSavePlugs, METH_NOARGS // , "Returns the collection of unconnected plugs which have this net as master." } , { "IsGlobal" , (PyCFunction)PyNet_IsGlobal , METH_NOARGS, "return true if the net is global" } , { "IsExternal" , (PyCFunction)PyNet_IsExternal , METH_NOARGS, "return true if the the net is external." } @@ -564,8 +563,8 @@ extern "C" { // , "De-materializes all the rubbers and components of a net." } , { "Merge" , (PyCFunction)PyNet_Merge , METH_VARARGS , "Merges the net to the net which keeps its characteristics (arity, global, external and direction)." } - , { "Delete" , (PyCFunction)PyNet_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyNet_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyNetLocator.cpp b/hurricane/src/pyext/PyNetLocator.cpp index 299f8551..d31de4e9 100644 --- a/hurricane/src/pyext/PyNetLocator.cpp +++ b/hurricane/src/pyext/PyNetLocator.cpp @@ -96,8 +96,8 @@ extern "C" { LocatorGetCloneAttribute(Net) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyNetLocator_Delete,PyNetLocator) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyNetLocator_destroy, PyNetLocator) @@ -107,10 +107,10 @@ extern "C" { PyMethodDef PyNetLocator_Methods[] = { { "IsValid" , (PyCFunction)PyNetLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyNetLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyNetLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyNetLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyNetLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyNetLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyNetLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyNetLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyOccurrence.cpp b/hurricane/src/pyext/PyOccurrence.cpp index 95e98e36..ed281b3d 100644 --- a/hurricane/src/pyext/PyOccurrence.cpp +++ b/hurricane/src/pyext/PyOccurrence.cpp @@ -90,25 +90,24 @@ extern "C" { DirectGetBoolAttribute(PyOccurrence_HasProperty,HasProperty,PyOccurrence,Occurrence) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyOccurrence_Delete,PyOccurrence) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyOccurrence_destroy, PyOccurrence) // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetEntity ()" + // Attribute Method : "PyOccurrence_getEntity ()" - static PyObject* PyOccurrence_GetEntity ( PyOccurrence *self ) - { - trace << "PyOccurrence_GetEntity()" << endl; + static PyObject* PyOccurrence_getEntity ( PyOccurrence *self ) { + trace << "PyOccurrence_getEntity()" << endl; - METHOD_HEAD ( "Occurrence.GetEntity()" ) + METHOD_HEAD ( "Occurrence.getEntity()" ) PyObject* pyEntity = NULL; HTRY - Entity* entity = occurrence->GetEntity(); + Entity* entity = occurrence->getEntity(); if ( entity == NULL ) Py_RETURN_NONE; @@ -120,18 +119,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetOwnerCell ()" + // Attribute Method : "PyOccurrence_getOwnerCell ()" - static PyObject* PyOccurrence_GetOwnerCell ( PyOccurrence *self ) - { - trace << "PyOccurrence_GetOwnerCell()" << endl; + static PyObject* PyOccurrence_getOwnerCell ( PyOccurrence *self ) { + trace << "PyOccurrence_getOwnerCell()" << endl; - METHOD_HEAD ( "Occurernce.GetOwnerCell()" ) + METHOD_HEAD ( "Occurernce.getOwnerCell()" ) Cell* cell = NULL; HTRY - cell = occurrence->GetOwnerCell(); + cell = occurrence->getOwnerCell(); HCATCH return PyCell_Link ( cell ); @@ -139,18 +137,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetMasterCell ()" + // Attribute Method : "PyOccurrence_getMasterCell ()" - static PyObject* PyOccurrence_GetMasterCell ( PyOccurrence *self ) + static PyObject* PyOccurrence_getMasterCell ( PyOccurrence *self ) { - trace << "PyOccurrence_GetMasterCell()" << endl; + trace << "PyOccurrence_getMasterCell()" << endl; - METHOD_HEAD ( "Occurrence.GetMasterCell()" ) + METHOD_HEAD ( "Occurrence.getMasterCell()" ) Cell* cell = NULL; HTRY - cell = occurrence->GetMasterCell(); + cell = occurrence->getMasterCell(); HCATCH return PyCell_Link ( cell ); @@ -158,19 +156,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetPath ()" + // Attribute Method : "PyOccurrence_getPath ()" - static PyObject* PyOccurrence_GetPath ( PyOccurrence *self ) + static PyObject* PyOccurrence_getPath ( PyOccurrence *self ) { - trace << "PyOccurrence_GetPath ()" << endl; + trace << "PyOccurrence_getPath ()" << endl; - METHOD_HEAD ( "Occurrence.GetPath()" ) + METHOD_HEAD ( "Occurrence.getPath()" ) PyPath* pyPath = PyObject_NEW ( PyPath, &PyTypePath ); if ( pyPath == NULL ) { return NULL; } HTRY - pyPath->_object = new Path ( occurrence->GetPath() ); + pyPath->_object = new Path ( occurrence->getPath() ); HCATCH return ( (PyObject*)pyPath ); @@ -178,19 +176,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetName ()" + // Attribute Method : "PyOccurrence_getName ()" - static PyObject* PyOccurrence_GetName ( PyOccurrence *self ) + static PyObject* PyOccurrence_getName ( PyOccurrence *self ) { - trace << "PyOccurrence_GetName ()" << endl; + trace << "PyOccurrence_getName ()" << endl; - METHOD_HEAD ( "Occurrence.GetName()" ) + METHOD_HEAD ( "Occurrence.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( occurrence->GetName() ); + pyName->_object = new Name ( occurrence->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -198,19 +196,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrence_GetBoundingBox ()" + // Attribute Method : "PyOccurrence_getBoundingBox ()" - static PyObject* PyOccurrence_GetBoundingBox ( PyOccurrence *self ) + static PyObject* PyOccurrence_getBoundingBox ( PyOccurrence *self ) { - trace << "PyOccurrence_GetBoundingBox ()" << endl; + trace << "PyOccurrence_getBoundingBox ()" << endl; - METHOD_HEAD ( "Occurrence.GetBoundingBox()" ) + METHOD_HEAD ( "Occurrence.getBoundingBox()" ) PyBox* pyBox = PyObject_NEW ( PyBox, &PyTypeBox ); if ( pyBox == NULL ) { return NULL; } HTRY - pyBox->_object = new Box ( occurrence->GetBoundingBox() ); + pyBox->_object = new Box ( occurrence->getBoundingBox() ); HCATCH return ( (PyObject*)pyBox ); @@ -223,16 +221,16 @@ extern "C" { // PyOccurrence Attribute Method table. PyMethodDef PyOccurrence_Methods[] = - { { "GetEntity" , (PyCFunction)PyOccurrence_GetEntity , METH_NOARGS, "Returns the referenced entity." } - , { "GetPath" , (PyCFunction)PyOccurrence_GetPath , METH_NOARGS, "Returns the hierarchical instaciation path." } - , { "GetName" , (PyCFunction)PyOccurrence_GetName , METH_NOARGS, "Returns the occurrence name (concatenation of path and entity name." } - , { "GetOwnerCell" , (PyCFunction)PyOccurrence_GetOwnerCell , METH_NOARGS, "Returns the occurrence owner cell." } - , { "GetMasterCell" , (PyCFunction)PyOccurrence_GetMasterCell , METH_NOARGS, "Returns the cell owning the referenced entity." } - , { "GetBoundingBox", (PyCFunction)PyOccurrence_GetBoundingBox, METH_NOARGS, "Returns the occurrence bounding box." } + { { "getEntity" , (PyCFunction)PyOccurrence_getEntity , METH_NOARGS, "Returns the referenced entity." } + , { "getPath" , (PyCFunction)PyOccurrence_getPath , METH_NOARGS, "Returns the hierarchical instaciation path." } + , { "getName" , (PyCFunction)PyOccurrence_getName , METH_NOARGS, "Returns the occurrence name (concatenation of path and entity name." } + , { "getOwnerCell" , (PyCFunction)PyOccurrence_getOwnerCell , METH_NOARGS, "Returns the occurrence owner cell." } + , { "getMasterCell" , (PyCFunction)PyOccurrence_getMasterCell , METH_NOARGS, "Returns the cell owning the referenced entity." } + , { "getBoundingBox", (PyCFunction)PyOccurrence_getBoundingBox, METH_NOARGS, "Returns the occurrence bounding box." } , { "IsValid" , (PyCFunction)PyOccurrence_IsValid , METH_NOARGS, "Returns true if the occurrence is valid." } , { "HasProperty" , (PyCFunction)PyOccurrence_HasProperty , METH_NOARGS, "Returns true if the occurrence owns some properties." } - , { "Delete" , (PyCFunction)PyOccurrence_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyOccurrence_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -259,11 +257,11 @@ extern "C" { ,Converter,&arg1 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == NO_ARG ) { occurrence = new Occurrence (); } - else if ( __cs.GetObjectIds() == ENT_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) ); } - else if ( __cs.GetObjectIds() == COMP_PATH_ARG) { occurrence = new Occurrence ( PYSEGMENT_O(arg0) + if ( __cs.getObjectIds() == NO_ARG ) { occurrence = new Occurrence (); } + else if ( __cs.getObjectIds() == ENT_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) ); } + else if ( __cs.getObjectIds() == COMP_PATH_ARG) { occurrence = new Occurrence ( PYSEGMENT_O(arg0) , *PYPATH_O(arg1) ); } - else if ( __cs.GetObjectIds() == ENT_PATH_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) + else if ( __cs.getObjectIds() == ENT_PATH_ARG ) { occurrence = new Occurrence ( PYENTITY_O(arg0) , *PYPATH_O(arg1) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Occurrence constructor. " ); @@ -287,7 +285,7 @@ extern "C" { PyTypeObjectConstructor(Occurrence) -# else // End of Python Module Code Part. +#else // End of Python Module Code Part. // x=================================================================x @@ -304,7 +302,7 @@ extern "C" { PyTypeRootObjectDefinitions(Occurrence) -# endif // End of Shared Library Code Part. +#endif // End of Shared Library Code Part. } // End of extern "C". @@ -313,4 +311,3 @@ extern "C" { } // End of Isobar namespace. - diff --git a/hurricane/src/pyext/PyOccurrenceLocator.cpp b/hurricane/src/pyext/PyOccurrenceLocator.cpp index deb69c01..34910df0 100644 --- a/hurricane/src/pyext/PyOccurrenceLocator.cpp +++ b/hurricane/src/pyext/PyOccurrenceLocator.cpp @@ -70,7 +70,7 @@ extern "C" { // | "PyOccurrenceLocator" Python Module Code Part | // x=================================================================x -# if defined(__PYTHON_MODULE__) +#if defined(__PYTHON_MODULE__) // x-------------------------------------------------------------x @@ -78,23 +78,17 @@ extern "C" { // x-------------------------------------------------------------x - // --------------------------------------------------------------- - // Attribute Method : "PyOccurrenceLocator_Create ()" - - // Standart Accessors (Attributes). - // Standart Predicates (Attributes). DirectGetBoolAttribute(PyOccurrenceLocator_IsValid,IsValid,PyOccurrenceLocator,Locator) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyOccurrenceLocator_Delete,PyOccurrenceLocator) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyOccurrenceLocator_destroy, PyOccurrenceLocator) // --------------------------------------------------------------- // Attribute Method : "PyOccurrenceLocator_Progress ()" - static PyObject* PyOccurrenceLocator_Progress ( PyOccurrenceLocator *self ) - { + static PyObject* PyOccurrenceLocator_Progress ( PyOccurrenceLocator *self ) { trace << "OccurrenceLocator.Progress()" << endl; HTRY @@ -108,19 +102,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrenceLocator_GetElement ()" + // Attribute Method : "PyOccurrenceLocator_getElement ()" - static PyObject* PyOccurrenceLocator_GetElement ( PyOccurrenceLocator *self ) - { - trace << "OccurrenceLocator.GetElement()" << endl; + static PyObject* PyOccurrenceLocator_getElement ( PyOccurrenceLocator *self ) { + trace << "OccurrenceLocator.getElement()" << endl; - METHOD_HEAD ( "OccurrenceLocator.GetElement()" ) + METHOD_HEAD ( "OccurrenceLocator.getElement()" ) PyOccurrence* pyOccurrence = PyObject_NEW ( PyOccurrence, &PyTypeOccurrence ); if ( pyOccurrence == NULL ) return NULL; HTRY - Occurrence occurrence = locator->GetElement (); + Occurrence occurrence = locator->getElement (); if ( occurrence == NULL ) Py_RETURN_NONE; @@ -132,13 +125,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyOccurrenceLocator_GetClone ()" + // Attribute Method : "PyOccurrenceLocator_getClone ()" - static PyObject* PyOccurrenceLocator_GetClone ( PyOccurrenceLocator *self ) + static PyObject* PyOccurrenceLocator_getClone ( PyOccurrenceLocator *self ) { - trace << "OccurrenceLocator.GetClone()" << endl; + trace << "OccurrenceLocator.getClone()" << endl; - METHOD_HEAD ( "OccurrenceLocator.GetClone()" ) + METHOD_HEAD ( "OccurrenceLocator.getClone()" ) PyOccurrenceLocator* pyOccurrenceLocator = NULL; @@ -146,7 +139,7 @@ extern "C" { pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator ); if ( pyOccurrenceLocator == NULL ) { return NULL; } - pyOccurrenceLocator->_object = locator->GetClone(); + pyOccurrenceLocator->_object = locator->getClone(); HCATCH return ( (PyObject*)pyOccurrenceLocator ); @@ -159,10 +152,10 @@ extern "C" { PyMethodDef PyOccurrenceLocator_Methods[] = { { "IsValid" , (PyCFunction)PyOccurrenceLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyOccurrenceLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyOccurrenceLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyOccurrenceLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyOccurrenceLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyOccurrenceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyOccurrenceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyOccurrenceLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyPath.cpp b/hurricane/src/pyext/PyPath.cpp index a9c3988c..ed9b3e76 100644 --- a/hurricane/src/pyext/PyPath.cpp +++ b/hurricane/src/pyext/PyPath.cpp @@ -87,25 +87,24 @@ extern "C" { DirectGetBoolAttribute(PyPath_IsEmpty ,IsEmpty ,PyPath,Path) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyPath_Delete,PyPath) + // Standart Destroy (Attribute). + DirectDestroyAttribute(PyPath_destroy, PyPath) // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetHeadInstance ()" + // Attribute Method : "PyPath_getHeadInstance ()" - static PyObject* PyPath_GetHeadInstance ( PyPath *self ) - { - trace << "PyPath_GetHeadInstance()" << endl; + static PyObject* PyPath_getHeadInstance ( PyPath *self ) { + trace << "PyPath_getHeadInstance()" << endl; - METHOD_HEAD ( "Path.GetHeadInstance()" ) + METHOD_HEAD ( "Path.getHeadInstance()" ) Instance* instance = NULL; HTRY - instance = path->GetHeadInstance(); + instance = path->getHeadInstance(); HCATCH return PyInstance_Link ( instance ); @@ -113,18 +112,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetTailInstance ()" + // Attribute Method : "PyPath_getTailInstance ()" - static PyObject* PyPath_GetTailInstance ( PyPath *self ) - { - trace << "PyPath_GetTailInstance()" << endl; + static PyObject* PyPath_getTailInstance ( PyPath *self ) { + trace << "PyPath_getTailInstance()" << endl; - METHOD_HEAD ( "Path.GetTailInstance()" ) + METHOD_HEAD ( "Path.getTailInstance()" ) Instance* instance = NULL; HTRY - instance = path->GetTailInstance(); + instance = path->getTailInstance(); HCATCH return PyInstance_Link ( instance ); @@ -132,18 +130,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetOwnerCell ()" + // Attribute Method : "PyPath_getOwnerCell ()" - static PyObject* PyPath_GetOwnerCell ( PyPath *self ) - { - trace << "PyPath_GetOwnerCell()" << endl; + static PyObject* PyPath_getOwnerCell ( PyPath *self ) { + trace << "PyPath_getOwnerCell()" << endl; - METHOD_HEAD ( "Path.GetOwnerCell()" ) + METHOD_HEAD ( "Path.getOwnerCell()" ) Cell* cell = NULL; HTRY - cell = path->GetOwnerCell(); + cell = path->getOwnerCell(); HCATCH return PyCell_Link ( cell ); @@ -151,18 +148,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetMasterCell ()" + // Attribute Method : "PyPath_getMasterCell ()" - static PyObject* PyPath_GetMasterCell ( PyPath *self ) - { - trace << "PyPath_GetMasterCell()" << endl; + static PyObject* PyPath_getMasterCell ( PyPath *self ) { + trace << "PyPath_getMasterCell()" << endl; - METHOD_HEAD ( "Path.GetMasterCell()" ) + METHOD_HEAD ( "Path.getMasterCell()" ) Cell* cell = NULL; HTRY - cell = path->GetMasterCell(); + cell = path->getMasterCell(); HCATCH return PyCell_Link ( cell ); @@ -170,19 +166,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetName ()" + // Attribute Method : "PyPath_getName ()" - static PyObject* PyPath_GetName ( PyPath *self ) - { - trace << "PyPath_GetName ()" << endl; + static PyObject* PyPath_getName ( PyPath *self ) { + trace << "PyPath_getName ()" << endl; - METHOD_HEAD ( "Path.GetName()" ) + METHOD_HEAD ( "Path.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( path->GetName() ); + pyName->_object = new Name ( path->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -190,20 +185,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetHeadPath ()" + // Attribute Method : "PyPath_getHeadPath ()" - static PyObject* PyPath_GetHeadPath ( PyPath *self ) - { + static PyObject* PyPath_getHeadPath ( PyPath *self ) { - trace << "PyPath_GetHeadPath ()" << endl; + trace << "PyPath_getHeadPath ()" << endl; - METHOD_HEAD ( "Path.GetHeadPath()" ) + METHOD_HEAD ( "Path.getHeadPath()" ) PyPath* pyPath = PyObject_NEW ( PyPath, &PyTypePath ); if ( pyPath == NULL ) { return NULL; } HTRY - pyPath->_object = new Path ( path->GetHeadPath() ); + pyPath->_object = new Path ( path->getHeadPath() ); HCATCH return ( (PyObject*)pyPath ); @@ -211,20 +205,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetTailPath ()" + // Attribute Method : "PyPath_getTailPath ()" - static PyObject* PyPath_GetTailPath ( PyPath *self ) + static PyObject* PyPath_getTailPath ( PyPath *self ) { - trace << "PyPath_GetTailPath ()" << endl; + trace << "PyPath_getTailPath ()" << endl; - METHOD_HEAD ( "Path.GetTailPath()" ) + METHOD_HEAD ( "Path.getTailPath()" ) PyPath* pyPath = PyObject_NEW ( PyPath, &PyTypePath ); if ( pyPath == NULL ) { return NULL; } HTRY - pyPath->_object = new Path ( path->GetTailPath() ); + pyPath->_object = new Path ( path->getTailPath() ); HCATCH return ( (PyObject*)pyPath ); @@ -232,26 +226,26 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetTransformation ()" + // Attribute Method : "PyPath_getTransformation ()" - static PyObject* PyPath_GetTransformation ( PyPath *self, PyObject* args ) + static PyObject* PyPath_getTransformation ( PyPath *self, PyObject* args ) { - trace << "PyPath_GetTransformation ()" << endl; + trace << "PyPath_getTransformation ()" << endl; - METHOD_HEAD ( "Instance.GetTransformation()" ); + METHOD_HEAD ( "Instance.getTransformation()" ); PyObject* arg0; PyTransformation* pyTransf = PyObject_NEW ( PyTransformation, &PyTypeTransformation ); if ( pyTransf == NULL ) { return NULL; } - __cs.Init ("Path.GetTransformation"); - if ( ! PyArg_ParseTuple(args,"|O&:Path.GetTransformation",Converter,&arg0) ) return ( NULL ); + __cs.Init ("Path.getTransformation"); + if ( ! PyArg_ParseTuple(args,"|O&:Path.getTransformation",Converter,&arg0) ) return ( NULL ); HTRY - if ( __cs.GetObjectIds() == NO_ARG ) - { pyTransf->_object = new Transformation ( path->GetTransformation () ); } - else if ( __cs.GetObjectIds() == TRANS_ARG ) - { pyTransf->_object = new Transformation ( path->GetTransformation (*PYTRANSFORMATION_O(arg0)) ); } + if ( __cs.getObjectIds() == NO_ARG ) + { pyTransf->_object = new Transformation ( path->getTransformation () ); } + else if ( __cs.getObjectIds() == TRANS_ARG ) + { pyTransf->_object = new Transformation ( path->getTransformation (*PYTRANSFORMATION_O(arg0)) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." ); return ( NULL ); @@ -264,22 +258,22 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPath_GetInstancesLocator ()" + // Attribute Method : "PyPath_getInstancesLocator ()" - static PyObject* PyPath_GetInstancesLocator ( PyPath *self ) + static PyObject* PyPath_getInstancesLocator ( PyPath *self ) { - trace << "PyPath_GetInstancesLocator ()" << endl; + trace << "PyPath_getInstancesLocator ()" << endl; - METHOD_HEAD ( "Path.GetInstancesLocator()" ) + METHOD_HEAD ( "Path.getInstancesLocator()" ) - Instances instances = path->GetInstances (); + Instances instances = path->getInstances (); PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator ); if (pyInstanceLocator == NULL) { return NULL; } HTRY - pyInstanceLocator->_object = instances.GetLocator (); + pyInstanceLocator->_object = instances.getLocator (); HCATCH return ( (PyObject*)pyInstanceLocator ); @@ -292,18 +286,18 @@ extern "C" { // PyPath Attribute Method table. PyMethodDef PyPath_Methods[] = - { { "GetHeadInstance" , (PyCFunction)PyPath_GetHeadInstance , METH_NOARGS , "Return the head instance." } - , { "GetTailInstance" , (PyCFunction)PyPath_GetTailInstance , METH_NOARGS , "Return the tail instance." } - , { "GetHeadPath" , (PyCFunction)PyPath_GetHeadPath , METH_NOARGS , "Return the head path." } - , { "GetTailPath" , (PyCFunction)PyPath_GetTailPath , METH_NOARGS , "Return the tail path." } - , { "GetOwnerCell" , (PyCFunction)PyPath_GetOwnerCell , METH_NOARGS , "Return the cell owning the head instance." } - , { "GetMasterCell" , (PyCFunction)PyPath_GetMasterCell , METH_NOARGS , "Returns the master cell referenced by the last instance of the path." } - , { "GetName" , (PyCFunction)PyPath_GetName , METH_NOARGS , "Returns the concatenation of instances names." } - , { "GetTransformation" , (PyCFunction)PyPath_GetTransformation , METH_VARARGS, "Return the resulting transformation." } - , { "GetInstancesLocator", (PyCFunction)PyPath_GetInstancesLocator, METH_NOARGS , "Returns the collection of instances defining the path." } + { { "getHeadInstance" , (PyCFunction)PyPath_getHeadInstance , METH_NOARGS , "Return the head instance." } + , { "getTailInstance" , (PyCFunction)PyPath_getTailInstance , METH_NOARGS , "Return the tail instance." } + , { "getHeadPath" , (PyCFunction)PyPath_getHeadPath , METH_NOARGS , "Return the head path." } + , { "getTailPath" , (PyCFunction)PyPath_getTailPath , METH_NOARGS , "Return the tail path." } + , { "getOwnerCell" , (PyCFunction)PyPath_getOwnerCell , METH_NOARGS , "Return the cell owning the head instance." } + , { "getMasterCell" , (PyCFunction)PyPath_getMasterCell , METH_NOARGS , "Returns the master cell referenced by the last instance of the path." } + , { "getName" , (PyCFunction)PyPath_getName , METH_NOARGS , "Returns the concatenation of instances names." } + , { "getTransformation" , (PyCFunction)PyPath_getTransformation , METH_VARARGS, "Return the resulting transformation." } + , { "getInstancesLocator", (PyCFunction)PyPath_getInstancesLocator, METH_NOARGS , "Returns the collection of instances defining the path." } , { "IsEmpty" , (PyCFunction)PyPath_IsEmpty , METH_NOARGS , "Return true if the path is empty." } - , { "Delete" , (PyCFunction)PyPath_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyPath_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -333,13 +327,13 @@ extern "C" { HTRY - if ( __cs.GetObjectIds() == NO_ARG ) { path = new Path (); } - else if ( __cs.GetObjectIds() == INST_ARG ) { path = new Path ( PYINSTANCE_O(arg0) ); } - else if ( __cs.GetObjectIds() == INST_PATH_ARG ) { path = new Path ( PYINSTANCE_O(arg0) + if ( __cs.getObjectIds() == NO_ARG ) { path = new Path (); } + else if ( __cs.getObjectIds() == INST_ARG ) { path = new Path ( PYINSTANCE_O(arg0) ); } + else if ( __cs.getObjectIds() == INST_PATH_ARG ) { path = new Path ( PYINSTANCE_O(arg0) , *PYPATH_O(arg1) ); } - else if ( __cs.GetObjectIds() == PATH_INST_ARG ) { path = new Path ( *PYPATH_O(arg0) + else if ( __cs.getObjectIds() == PATH_INST_ARG ) { path = new Path ( *PYPATH_O(arg0) , PYINSTANCE_O(arg1) ); } - else if ( __cs.GetObjectIds() == CELL_STRING_ARG ) { path = new Path ( PYCELL_O(arg0) + else if ( __cs.getObjectIds() == CELL_STRING_ARG ) { path = new Path ( PYCELL_O(arg0) , PyString_AsString(arg1) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Path constructor." ); diff --git a/hurricane/src/pyext/PyPin.cpp b/hurricane/src/pyext/PyPin.cpp index 0ff424ba..4d66955b 100644 --- a/hurricane/src/pyext/PyPin.cpp +++ b/hurricane/src/pyext/PyPin.cpp @@ -104,12 +104,12 @@ extern "C" { // Standart Accessors (Attributes). - PyObject* PyPin_GetAccessDirection( PyPin* self ) { - trace << "PyNet_GetAccessDirection ()" << endl; + PyObject* PyPin_getAccessDirection( PyPin* self ) { + trace << "PyNet_getAccessDirection ()" << endl; - METHOD_HEAD ( "Net.GetAccessDirection()" ) + METHOD_HEAD ( "Net.getAccessDirection()" ) - return (PyObject *)Py_BuildValue("l", pin->GetAccessDirection().GetCode() ); + return (PyObject *)Py_BuildValue("l", pin->getAccessDirection().getCode() ); } @@ -118,7 +118,7 @@ extern "C" { // PyPin Attribute Method table. PyMethodDef PyPin_Methods[] = - { { "GetAccessDirection" , (PyCFunction)PyPin_GetAccessDirection , METH_NOARGS + { { "getAccessDirection" , (PyCFunction)PyPin_getAccessDirection , METH_NOARGS , "Returns the pin accessdirection (by default set to UNDEFINED) ." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -188,7 +188,7 @@ extern "C" { string pin_arg1 = ":ent:name:int:int:layer:int:int:int:int"; string pin_arg2 = ":ent:name:int:int:layer:int:int:int"; string pin_arg3 = ":ent:name:int:int:layer:int:int"; - if ( __cs.GetObjectIds() == pin_arg1 ) { pin = Pin::Create ( PYNET_O ( arg0 ) + if ( __cs.getObjectIds() == pin_arg1 ) { pin = Pin::Create ( PYNET_O ( arg0 ) , *PYNAME_O ( arg1 ) , PyInt_AsAccessDirection ( arg2 ) , PyInt_AsPlacementStatus ( arg3 ) @@ -197,7 +197,7 @@ extern "C" { , PyInt_AsLong ( arg6 ) , PyInt_AsLong ( arg7 ) , PyInt_AsLong ( arg8 ) ); } - else if ( __cs.GetObjectIds() == pin_arg2 ) { pin = Pin::Create ( PYNET_O ( arg0 ) + else if ( __cs.getObjectIds() == pin_arg2 ) { pin = Pin::Create ( PYNET_O ( arg0 ) , *PYNAME_O ( arg1 ) , PyInt_AsAccessDirection ( arg2 ) , PyInt_AsPlacementStatus ( arg3 ) @@ -205,7 +205,7 @@ extern "C" { , PyInt_AsLong ( arg5 ) , PyInt_AsLong ( arg6 ) , PyInt_AsLong ( arg7 ) ); } - else if ( __cs.GetObjectIds() == pin_arg3 ) { pin = Pin::Create ( PYNET_O ( arg0 ) + else if ( __cs.getObjectIds() == pin_arg3 ) { pin = Pin::Create ( PYNET_O ( arg0 ) , *PYNAME_O ( arg1 ) , PyInt_AsAccessDirection ( arg2 ) , PyInt_AsPlacementStatus ( arg3 ) diff --git a/hurricane/src/pyext/PyPinLocator.cpp b/hurricane/src/pyext/PyPinLocator.cpp index 684c273f..e11c0105 100644 --- a/hurricane/src/pyext/PyPinLocator.cpp +++ b/hurricane/src/pyext/PyPinLocator.cpp @@ -94,8 +94,8 @@ extern "C" { LocatorGetCloneAttribute(Pin) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyPinLocator_Delete,PyPinLocator) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyPinLocator_destroy, PyPinLocator) @@ -106,10 +106,10 @@ extern "C" { PyMethodDef PyPinLocator_Methods[] = { { "IsValid" , (PyCFunction)PyPinLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyPinLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyPinLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyPinLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyPinLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyPinLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyPinLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyPinLocator_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyPlug.cpp b/hurricane/src/pyext/PyPlug.cpp index 244757df..2c2cfb15 100644 --- a/hurricane/src/pyext/PyPlug.cpp +++ b/hurricane/src/pyext/PyPlug.cpp @@ -92,17 +92,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPlug_GetInstance ()" + // Attribute Method : "PyPlug_getInstance ()" - static PyObject* PyPlug_GetInstance ( PyPlug *self ) + static PyObject* PyPlug_getInstance ( PyPlug *self ) { - trace << "PyPlug_GetInstance ()" << endl; + trace << "PyPlug_getInstance ()" << endl; Instance* instance = NULL; HTRY - METHOD_HEAD ( "Plug.GetInstance()" ) - instance = plug->GetInstance ( ); + METHOD_HEAD ( "Plug.getInstance()" ) + instance = plug->getInstance ( ); HCATCH return PyInstance_Link ( instance ); @@ -110,17 +110,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPlug_GetMasterNet ()" + // Attribute Method : "PyPlug_getMasterNet ()" - static PyObject* PyPlug_GetMasterNet ( PyPlug *self ) + static PyObject* PyPlug_getMasterNet ( PyPlug *self ) { - trace << "PyPlug_GetMasterNet ()" << endl; + trace << "PyPlug_getMasterNet ()" << endl; Net* net = NULL; HTRY - METHOD_HEAD ( "Plug.GetMasterNet()" ) - net = plug->GetMasterNet ( ); + METHOD_HEAD ( "Plug.getMasterNet()" ) + net = plug->getMasterNet ( ); HCATCH return PyNet_Link ( net ); @@ -129,17 +129,17 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyPlug_GetNet ()" + // Attribute Method : "PyPlug_getNet ()" - static PyObject* PyPlug_GetNet ( PyPlug *self ) + static PyObject* PyPlug_getNet ( PyPlug *self ) { - trace << "PyPlug_GetNet ()" << endl; + trace << "PyPlug_getNet ()" << endl; Net* net = NULL; HTRY - METHOD_HEAD ( "Plug.GetNet()" ) - net = plug->GetNet ( ); + METHOD_HEAD ( "Plug.getNet()" ) + net = plug->getNet ( ); HCATCH return PyNet_Link ( net ); @@ -177,9 +177,9 @@ extern "C" { // PyPlug Attribute Method table. PyMethodDef PyPlug_Methods[] = - { { "GetInstance" , (PyCFunction)PyPlug_GetInstance , METH_NOARGS , "Return the instance to which belongs the plug." } - , { "GetMasterNet" , (PyCFunction)PyPlug_GetMasterNet , METH_NOARGS , "Returns the external net referenced by the plug in the master cell of its instance." } - , { "GetNet" , (PyCFunction)PyPlug_GetNet , METH_NOARGS , "Returns the net connected by the plug in the cell of its instance." } + { { "getInstance" , (PyCFunction)PyPlug_getInstance , METH_NOARGS , "Return the instance to which belongs the plug." } + , { "getMasterNet" , (PyCFunction)PyPlug_getMasterNet , METH_NOARGS , "Returns the external net referenced by the plug in the master cell of its instance." } + , { "getNet" , (PyCFunction)PyPlug_getNet , METH_NOARGS , "Returns the net connected by the plug in the cell of its instance." } , { "IsConnected" , (PyCFunction)PyPlug_IsConnected , METH_NOARGS , "Returns true if the plug is connected, else false." } , { "SetNet" , (PyCFunction)PyPlug_SetNet , METH_VARARGS, "This method allows to connect or change the net of a plug." } , {NULL, NULL, 0, NULL} /* sentinel */ diff --git a/hurricane/src/pyext/PyPlugLocator.cpp b/hurricane/src/pyext/PyPlugLocator.cpp index 98f8b1b5..79c7e40c 100644 --- a/hurricane/src/pyext/PyPlugLocator.cpp +++ b/hurricane/src/pyext/PyPlugLocator.cpp @@ -52,8 +52,8 @@ -# include "PyPlugLocator.h" -# include "PyPlug.h" +#include "PyPlugLocator.h" +#include "PyPlug.h" namespace Isobar { @@ -65,16 +65,16 @@ USING_NAMESPACE_HURRICANE extern "C" { -# undef ACCESS_OBJECT -# define ACCESS_OBJECT _object -# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator,locator,function) +#undef ACCESS_OBJECT +#define ACCESS_OBJECT _object +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator,locator,function) // x=================================================================x // | "PyPlugLocator" Python Module Code Part | // x=================================================================x -# if defined(__PYTHON_MODULE__) +#if defined(__PYTHON_MODULE__) // x-------------------------------------------------------------x @@ -103,8 +103,8 @@ extern "C" { PyMethodDef PyPlugLocator_Methods[] = { { "IsValid" , (PyCFunction)PyPlugLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyPlugLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyPlugLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyPlugLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "getElement" , (PyCFunction)PyPlugLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyPlugLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -120,7 +120,7 @@ extern "C" { -# else // End of Python Module Code Part. +#else // End of Python Module Code Part. // x=================================================================x @@ -133,7 +133,7 @@ extern "C" { PyTypeRootObjectDefinitions(PlugLocator) -# endif // End of Shared Library Code Part. +#endif // End of Shared Library Code Part. } // End of extern "C". diff --git a/hurricane/src/pyext/PyPoint.cpp b/hurricane/src/pyext/PyPoint.cpp index 666459a7..d6dc0b4c 100644 --- a/hurricane/src/pyext/PyPoint.cpp +++ b/hurricane/src/pyext/PyPoint.cpp @@ -105,14 +105,14 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyPoint_GetX,getX,PyPoint,Point) - DirectGetLongAttribute(PyPoint_GetY,getY,PyPoint,Point) + DirectGetLongAttribute(PyPoint_getX,getX,PyPoint,Point) + DirectGetLongAttribute(PyPoint_getY,getY,PyPoint,Point) DirectSetLongAttribute(PyPoint_SetX,setX,"Point.setX",PyPoint,Point) DirectSetLongAttribute(PyPoint_SetY,setY,"Point.setY",PyPoint,Point) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyPoint_Delete,PyPoint) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyPoint_destroy, PyPoint) @@ -121,13 +121,13 @@ extern "C" { // PyPoint Attribute Method table. PyMethodDef PyPoint_Methods[] = - { { "GetX" , (PyCFunction)PyPoint_GetX , METH_NOARGS , "Return the Point X value." } - , { "GetY" , (PyCFunction)PyPoint_GetY , METH_NOARGS , "Return the Point Y value." } + { { "getX" , (PyCFunction)PyPoint_getX , METH_NOARGS , "Return the Point X value." } + , { "getY" , (PyCFunction)PyPoint_getY , METH_NOARGS , "Return the Point Y value." } , { "SetX" , (PyCFunction)PyPoint_SetX , METH_VARARGS, "Modify the Point X value." } , { "SetY" , (PyCFunction)PyPoint_SetY , METH_VARARGS, "Modify the Point Y value." } , { "Translate", (PyCFunction)PyPoint_Translate, METH_VARARGS, "Translate the point of dx and dy." } - , { "Delete" , (PyCFunction)PyPoint_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "destroy" , (PyCFunction)PyPoint_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -151,9 +151,9 @@ extern "C" { ,Converter,&arg1 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == NO_ARG ) { point = new Point (); } - else if ( __cs.GetObjectIds() == POINT_ARG ) { point = new Point ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { point = new Point ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == NO_ARG ) { point = new Point (); } + else if ( __cs.getObjectIds() == POINT_ARG ) { point = new Point ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { point = new Point ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Point constructor." ); diff --git a/hurricane/src/pyext/PyReference.cpp b/hurricane/src/pyext/PyReference.cpp index a7a7888d..59c4d890 100644 --- a/hurricane/src/pyext/PyReference.cpp +++ b/hurricane/src/pyext/PyReference.cpp @@ -68,18 +68,18 @@ USING_NAMESPACE_HURRICANE extern "C" { -# undef ACCESS_OBJECT -# undef ACCESS_CLASS -# define ACCESS_OBJECT _baseObject._object -# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject) -# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Reference,reference,function) +#undef ACCESS_OBJECT +#undef ACCESS_CLASS +#define ACCESS_OBJECT _baseObject._object +#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject) +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Reference,reference,function) // x=================================================================x // | "PyReference" Python Module Code Part | // x=================================================================x -# if defined(__PYTHON_MODULE__) +#if defined(__PYTHON_MODULE__) // x-------------------------------------------------------------x @@ -87,24 +87,16 @@ extern "C" { // x-------------------------------------------------------------x - // Standart Accessors (Attributes). - - - // Standart Delete (Attribute). - DBoDeleteAttribute(PyReference_Delete,PyReference) - - - + DBoDestroyAttribute(PyReference_destroy, PyReference) // --------------------------------------------------------------- - // Attribute Method : "PyReference_GetName ()" + // Attribute Method : "PyReference_getName ()" - static PyObject* PyReference_GetName ( PyReference *self ) - { + static PyObject* PyReference_getName ( PyReference *self ) { - trace << "PyReference_GetName ()" << endl; + trace << "PyReference_getName ()" << endl; - METHOD_HEAD ( "Reference.GetName()" ) + METHOD_HEAD ( "Reference.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } @@ -115,7 +107,7 @@ extern "C" { trace << "new PyName [" << hex << pyName << "]" << endl; trace_out (); - pyName->_object = new Name ( reference->GetName() ); + pyName->_object = new Name ( reference->getName() ); HCATCH @@ -126,19 +118,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyReference_GetPoint ()" + // Attribute Method : "PyReference_getPoint ()" - static PyObject* PyReference_GetPoint ( PyReference *self ) + static PyObject* PyReference_getPoint ( PyReference *self ) { - trace << "PyReference_GetPoint()" << endl; + trace << "PyReference_getPoint()" << endl; - METHOD_HEAD ( "Reference.GetPoint()" ) + METHOD_HEAD ( "Reference.getPoint()" ) PyPoint* pyPoint = PyObject_NEW ( PyPoint, &PyTypePoint ); if (pyPoint == NULL) { return NULL; } HTRY - pyPoint->_object = new Point ( reference->GetPoint() ); + pyPoint->_object = new Point ( reference->getPoint() ); HCATCH return ( (PyObject*)pyPoint ); @@ -177,10 +169,10 @@ extern "C" { // PyReference Attribute Method table. PyMethodDef PyReference_Methods[] = - { { "Delete" , (PyCFunction)PyReference_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } - , { "GetName" , (PyCFunction)PyReference_GetName , METH_NOARGS , "Returns the name of the reference." } - , { "GetPoint" , (PyCFunction)PyReference_GetPoint , METH_NOARGS , "Return the reference point." } + { { "destroy" , (PyCFunction)PyReference_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } + , { "getName" , (PyCFunction)PyReference_getName , METH_NOARGS , "Returns the name of the reference." } + , { "getPoint" , (PyCFunction)PyReference_getPoint , METH_NOARGS , "Return the reference point." } , { "Translate" , (PyCFunction)PyReference_Translate , METH_VARARGS, "Translate the reference of dx and dy." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -214,12 +206,12 @@ extern "C" { ,Converter,&arg3 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == CELL_NAME_INTS2_ARG ) + if ( __cs.getObjectIds() == CELL_NAME_INTS2_ARG ) reference = Reference::Create ( PYCELL_O(arg0) , *PYNAME_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == CELL_NAME_POINT_ARG ) + else if ( __cs.getObjectIds() == CELL_NAME_POINT_ARG ) reference = Reference::Create ( PYCELL_O(arg0) , *PYNAME_O(arg1) , *PYPOINT_O(arg2) ); diff --git a/hurricane/src/pyext/PyReferenceLocator.cpp b/hurricane/src/pyext/PyReferenceLocator.cpp index 71cb35e9..a5216be4 100644 --- a/hurricane/src/pyext/PyReferenceLocator.cpp +++ b/hurricane/src/pyext/PyReferenceLocator.cpp @@ -91,8 +91,8 @@ extern "C" { LocatorGetCloneAttribute(Reference) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyReferenceLocator_Delete,PyReferenceLocator) + // Standart destroy (Attribute). + DirectDestroyAttribute(PyReferenceLocator_destroy, PyReferenceLocator) @@ -103,10 +103,10 @@ extern "C" { PyMethodDef PyReferenceLocator_Methods[] = { { "IsValid" , (PyCFunction)PyReferenceLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PyReferenceLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PyReferenceLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PyReferenceLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PyReferenceLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PyReferenceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PyReferenceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PyReferenceLocator_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PySegment.cpp b/hurricane/src/pyext/PySegment.cpp index 5ee65121..7558fa2a 100644 --- a/hurricane/src/pyext/PySegment.cpp +++ b/hurricane/src/pyext/PySegment.cpp @@ -52,12 +52,12 @@ -# include "PyNet.h" -# include "PyLayer.h" -# include "PySegment.h" -# include "PyHorizontal.h" -# include "PyVertical.h" -# include "PyPoint.h" +#include "PyNet.h" +#include "PyLayer.h" +#include "PySegment.h" +#include "PyHorizontal.h" +#include "PyVertical.h" +#include "PyPoint.h" namespace Isobar { @@ -69,18 +69,18 @@ USING_NAMESPACE_HURRICANE extern "C" { -# undef ACCESS_OBJECT -# undef ACCESS_CLASS -# define ACCESS_OBJECT _baseObject._baseObject._object -# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject._baseObject) -# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Segment,segment,function) +#undef ACCESS_OBJECT +#undef ACCESS_CLASS +#define ACCESS_OBJECT _baseObject._baseObject._object +#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject._baseObject) +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Segment,segment,function) // x=================================================================x // | "PySegment" Python Module Code Part | // x=================================================================x -# if defined(__PYTHON_MODULE__) +#if defined(__PYTHON_MODULE__) // x-------------------------------------------------------------x @@ -88,23 +88,23 @@ extern "C" { // x-------------------------------------------------------------x - // Standart Accessors (Attributes). - DirectGetLongAttribute(PySegment_GetSourceX,GetSourceX,PySegment,Segment) - DirectGetLongAttribute(PySegment_GetSourceY,GetSourceY,PySegment,Segment) - DirectGetLongAttribute(PySegment_GetWidth ,GetWidth, PySegment,Segment) + // Standard Accessors (Attributes). + DirectGetLongAttribute(PySegment_getSourceX,getSourceX,PySegment,Segment) + DirectGetLongAttribute(PySegment_getSourceY,getSourceY,PySegment,Segment) + DirectGetLongAttribute(PySegment_getWidth ,getWidth, PySegment,Segment) - // Standart Delete (Attribute). - DBoDeleteAttribute(PySegment_Delete,PySegment) + // Standard Destroy (Attribute). + DBoDestroyAttribute(PySegment_destroy, PySegment) // --------------------------------------------------------------- - // Attribute Method : "PySegment_GetSourcePosition ()" + // Attribute Method : "PySegment_getSourcePosition ()" - static PyObject* PySegment_GetSourcePosition ( PySegment *self ) + static PyObject* PySegment_getSourcePosition ( PySegment *self ) { - trace << "PySegment_GetSourcePosition()" << endl; + trace << "PySegment_getSourcePosition()" << endl; METHOD_HEAD ( "Segment.SourcePosition()" ) @@ -112,7 +112,7 @@ extern "C" { if (pyPoint == NULL) { return NULL; } HTRY - pyPoint->_object = new Point ( segment->GetSourcePosition() ); + pyPoint->_object = new Point ( segment->getSourcePosition() ); HCATCH return ( (PyObject*)pyPoint ); @@ -120,11 +120,11 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PySegment_GetTargetPosition ()" + // Attribute Method : "PySegment_getTargetPosition ()" - static PyObject* PySegment_GetTargetPosition ( PySegment *self ) + static PyObject* PySegment_getTargetPosition ( PySegment *self ) { - trace << "PySegment_GetTargetPosition()" << endl; + trace << "PySegment_getTargetPosition()" << endl; METHOD_HEAD ( "Segment.TargetPosition()" ) @@ -132,7 +132,7 @@ extern "C" { if (pyPoint == NULL) { return NULL; } HTRY - pyPoint->_object = new Point ( segment->GetTargetPosition() ); + pyPoint->_object = new Point ( segment->getTargetPosition() ); HCATCH return ( (PyObject*)pyPoint ); @@ -143,13 +143,13 @@ extern "C" { // PySegment Attribute Method table. PyMethodDef PySegment_Methods[] = - { { "GetSourceX" , (PyCFunction)PySegment_GetSourceX , METH_NOARGS , "Return the Segment source X value." } - , { "GetSourceY" , (PyCFunction)PySegment_GetSourceY , METH_NOARGS , "Return the Segment source Y value." } - , { "GetSourcePosition" , (PyCFunction)PySegment_GetSourcePosition, METH_NOARGS , "Return the Segment source point value." } - , { "GetTargetPosition" , (PyCFunction)PySegment_GetTargetPosition, METH_NOARGS , "Return the Segment target point value." } - , { "GetWidth" , (PyCFunction)PySegment_GetWidth , METH_NOARGS , "Return the segment width." } - , { "Delete" , (PyCFunction)PySegment_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + { { "getSourceX" , (PyCFunction)PySegment_getSourceX , METH_NOARGS , "Return the Segment source X value." } + , { "getSourceY" , (PyCFunction)PySegment_getSourceY , METH_NOARGS , "Return the Segment source Y value." } + , { "getSourcePosition" , (PyCFunction)PySegment_getSourcePosition, METH_NOARGS , "Return the Segment source point value." } + , { "getTargetPosition" , (PyCFunction)PySegment_getTargetPosition, METH_NOARGS , "Return the Segment target point value." } + , { "getWidth" , (PyCFunction)PySegment_getWidth , METH_NOARGS , "Return the segment width." } + , { "destroy" , (PyCFunction)PySegment_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PySegmentLocator.cpp b/hurricane/src/pyext/PySegmentLocator.cpp index e7ab674a..66d77fb2 100644 --- a/hurricane/src/pyext/PySegmentLocator.cpp +++ b/hurricane/src/pyext/PySegmentLocator.cpp @@ -93,8 +93,8 @@ extern "C" { LocatorGetCloneAttribute(Segment) - // Standart Delete (Attribute). - DirectDeleteAttribute(PySegmentLocator_Delete,PySegmentLocator) + // Standard Destroy (Attribute). + DirectDestroyAttribute(PySegmentLocator_destroy, PySegmentLocator) @@ -105,10 +105,10 @@ extern "C" { PyMethodDef PySegmentLocator_Methods[] = { { "IsValid" , (PyCFunction)PySegmentLocator_IsValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." } , { "Progress" , (PyCFunction)PySegmentLocator_Progress , METH_NOARGS , "Moves forward the locator to the following element." } - , { "GetElement" , (PyCFunction)PySegmentLocator_GetElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } - , { "GetClone" , (PyCFunction)PySegmentLocator_GetClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } - , { "Delete" , (PyCFunction)PySegmentLocator_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "getElement" , (PyCFunction)PySegmentLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." } + , { "getClone" , (PyCFunction)PySegmentLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." } + , { "destroy" , (PyCFunction)PySegmentLocator_destroy , METH_NOARGS + , "destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyTechnology.cpp b/hurricane/src/pyext/PyTechnology.cpp index fc90e703..51ec17e0 100644 --- a/hurricane/src/pyext/PyTechnology.cpp +++ b/hurricane/src/pyext/PyTechnology.cpp @@ -84,19 +84,19 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTechnology_GetName ()" + // Attribute Method : "PyTechnology_getName ()" - static PyObject* PyTechnology_GetName ( PyTechnology *self ) + static PyObject* PyTechnology_getName ( PyTechnology *self ) { - trace << "PyTechnology_GetName ()" << endl; + trace << "PyTechnology_getName ()" << endl; - METHOD_HEAD ( "Technology.GetName()" ) + METHOD_HEAD ( "Technology.getName()" ) PyName* pyName = PyObject_NEW ( PyName, &PyTypeName ); if ( pyName == NULL ) { return NULL; } HTRY - pyName->_object = new Name ( techno->GetName() ); + pyName->_object = new Name ( techno->getName() ); HCATCH return ( (PyObject*)pyName ); @@ -125,20 +125,20 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTechnology_GetLayer ()" + // Attribute Method : "PyTechnology_getLayer ()" - static PyObject* PyTechnology_GetLayer ( PyTechnology *self, PyObject* args ) + static PyObject* PyTechnology_getLayer ( PyTechnology *self, PyObject* args ) { - trace << "Technology.GetLayer()" << endl; - METHOD_HEAD ( "Technology.GetLayer()" ) + trace << "Technology.getLayer()" << endl; + METHOD_HEAD ( "Technology.getLayer()" ) Layer* layer = NULL; HTRY PyName* name; - if ( ! ParseOneArg ( "Technology.GetLayer", args,NAME_ARG, (PyObject**)&name ) ) return ( NULL ); + if ( ! ParseOneArg ( "Technology.getLayer", args,NAME_ARG, (PyObject**)&name ) ) return ( NULL ); - layer = techno->GetLayer ( *PYNAME_O(name) ); + layer = techno->getLayer ( *PYNAME_O(name) ); HCATCH return PyLayer_Link ( layer ); @@ -149,8 +149,8 @@ extern "C" { // Standart Accessors (Attributes). - // Standart Delete (Attribute). - DBoDeleteAttribute(PyTechnology_Delete,PyTechnology) + // Standard destroy (Attribute). + DBoDestroyAttribute(PyTechnology_destroy, PyTechnology) @@ -159,11 +159,11 @@ extern "C" { // PyTechnology Attribute Method table. PyMethodDef PyTechnology_Methods[] = - { { "GetName" , (PyCFunction)PyTechnology_GetName , METH_NOARGS , "Returns the name of the technology." } + { { "getName" , (PyCFunction)PyTechnology_getName , METH_NOARGS , "Returns the name of the technology." } , { "SetName" , (PyCFunction)PyTechnology_SetName , METH_VARARGS, "Allows to change the technology name." } - , { "GetLayer" , (PyCFunction)PyTechnology_GetLayer , METH_VARARGS, "Returns the layer named name." } - , { "Delete" , (PyCFunction)PyTechnology_Delete , METH_NOARGS - , "Delete associated hurricane object The python object remains." } + , { "getLayer" , (PyCFunction)PyTechnology_getLayer , METH_VARARGS, "Returns the layer named name." } + , { "destroy" , (PyCFunction)PyTechnology_destroy , METH_NOARGS + , "Destroy associated hurricane object The python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; diff --git a/hurricane/src/pyext/PyTransformation.cpp b/hurricane/src/pyext/PyTransformation.cpp index 8e118dd4..6570544f 100644 --- a/hurricane/src/pyext/PyTransformation.cpp +++ b/hurricane/src/pyext/PyTransformation.cpp @@ -103,24 +103,23 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetLongAttribute(PyTransformation_GetTx, getTx, PyTransformation, Transformation) - DirectGetLongAttribute(PyTransformation_GetTy, getTy, PyTransformation, Transformation) + DirectGetLongAttribute(PyTransformation_getTx, getTx, PyTransformation, Transformation) + DirectGetLongAttribute(PyTransformation_getTy, getTy, PyTransformation, Transformation) - // Standart Delete (Attribute). - DirectDeleteAttribute(PyTransformation_Delete, PyTransformation) + // Standard destroy (Attribute). + DirectDestroyAttribute(PyTransformation_destroy, PyTransformation) // --------------------------------------------------------------- - // Attribute Method : "PyBox_GetTranslation ()" + // Attribute Method : "PyBox_getTranslation ()" - static PyObject* PyTransformation_GetTranslation ( PyTransformation *self ) - { - trace << "PyBox_GetTranslation ()" << endl; + static PyObject* PyTransformation_getTranslation ( PyTransformation *self ) { + trace << "PyBox_getTranslation ()" << endl; - METHOD_HEAD ( "Translation.GetTranslation()" ) + METHOD_HEAD ( "Translation.getTranslation()" ) PyPoint* pyPoint = PyObject_NEW ( PyPoint, &PyTypePoint ); if (pyPoint == NULL) { return NULL; } @@ -142,27 +141,27 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetOrientation ()" + // Attribute Method : "PyTransformation_getOrientation ()" - static PyObject* PyTransformation_GetOrientation ( PyTransformation *self ) { - trace << "PyTransformation_GetOrientation ()" << endl; + static PyObject* PyTransformation_getOrientation ( PyTransformation *self ) { + trace << "PyTransformation_getOrientation ()" << endl; - METHOD_HEAD ( "Translation.GetOrientation()" ) + METHOD_HEAD ( "Translation.getOrientation()" ) - return ( (PyObject*)Py_BuildValue("i",(long)transf->getOrientation().GetCode()) ); + return ( (PyObject*)Py_BuildValue("i",(long)transf->getOrientation().getCode()) ); } // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetX ()" + // Attribute Method : "PyTransformation_getX ()" - static PyObject* PyTransformation_GetX ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getX ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetX ()" << endl; + trace << "PyTransformation_getX ()" << endl; - METHOD_HEAD ( "Transformation.GetX()" ) + METHOD_HEAD ( "Transformation.getX()" ) PyObject* arg0; PyObject* arg1; @@ -170,15 +169,15 @@ extern "C" { HTRY - __cs.Init ("Transformation.GetX"); - if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.GetX",Converter,&arg0,Converter,&arg1) ) + __cs.Init ("Transformation.getX"); + if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.getX",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == POINT_ARG ) { result = transf->getX ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { result = transf->getX ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == POINT_ARG ) { result = transf->getX ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { result = transf->getX ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } else { - PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.GetX()." ); + PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.getX()." ); return ( NULL ); } @@ -191,13 +190,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetY ()" + // Attribute Method : "PyTransformation_getY ()" - static PyObject* PyTransformation_GetY ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getY ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetY ()" << endl; + trace << "PyTransformation_getY ()" << endl; - METHOD_HEAD ( "Transformation.GetY()" ) + METHOD_HEAD ( "Transformation.getY()" ) PyObject* arg0; PyObject* arg1; @@ -205,15 +204,15 @@ extern "C" { HTRY - __cs.Init ("Transformation.GetY"); - if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.GetY",Converter,&arg0,Converter,&arg1) ) + __cs.Init ("Transformation.getY"); + if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.getY",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == POINT_ARG ) { result = transf->getY ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { result = transf->getY ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == POINT_ARG ) { result = transf->getY ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { result = transf->getY ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } else { - PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.GetY()." ); + PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.getY()." ); return ( NULL ); } @@ -226,13 +225,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetDx ()" + // Attribute Method : "PyTransformation_getDx ()" - static PyObject* PyTransformation_GetDx ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getDx ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetDx ()" << endl; + trace << "PyTransformation_getDx ()" << endl; - METHOD_HEAD ( "Transformation.GetDx()" ) + METHOD_HEAD ( "Transformation.getDx()" ) PyObject* arg0; PyObject* arg1; @@ -240,7 +239,7 @@ extern "C" { HTRY - if ( ! ParseTwoArg ( "Transformation.GetDx", args, INTS2_ARG, &arg0, &arg1 ) ) return ( NULL ); + if ( ! ParseTwoArg ( "Transformation.getDx", args, INTS2_ARG, &arg0, &arg1 ) ) return ( NULL ); result = transf->getDx ( PyInt_AsLong(arg0), PyInt_AsLong(arg1) ); HCATCH @@ -252,13 +251,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetDy ()" + // Attribute Method : "PyTransformation_getDy ()" - static PyObject* PyTransformation_GetDy ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getDy ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetDy ()" << endl; + trace << "PyTransformation_getDy ()" << endl; - METHOD_HEAD ( "Transformation.GetDy()" ) + METHOD_HEAD ( "Transformation.getDy()" ) PyObject* arg0; PyObject* arg1; @@ -266,7 +265,7 @@ extern "C" { HTRY - if ( ! ParseTwoArg ( "Transformation.GetDy", args, INTS2_ARG, &arg0, &arg1 ) ) return ( NULL ); + if ( ! ParseTwoArg ( "Transformation.getDy", args, INTS2_ARG, &arg0, &arg1 ) ) return ( NULL ); result = transf->getDy ( PyInt_AsLong(arg0), PyInt_AsLong(arg1) ); HCATCH @@ -278,18 +277,18 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetTransformation ()" + // Attribute Method : "PyTransformation_getTransformation ()" - static PyObject* PyTransformation_GetTransformation ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getTransformation ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetTransformation ()" << endl; + trace << "PyTransformation_getTransformation ()" << endl; - METHOD_HEAD ( "Transformation.GetTransformation()" ) + METHOD_HEAD ( "Transformation.getTransformation()" ) PyObject* arg0; Transformation result; - if ( ! ParseOneArg ( "Transformation.GetTransformation", args, TRANS_ARG, &arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "Transformation.getTransformation", args, TRANS_ARG, &arg0 ) ) return ( NULL ); result = transf->getTransformation ( *PYTRANSFORMATION_O(arg0) ); PyTransformation* resultPyTransf = PyObject_NEW ( PyTransformation, &PyTypeTransformation ); @@ -312,27 +311,27 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetPoint ()" + // Attribute Method : "PyTransformation_getPoint ()" - static PyObject* PyTransformation_GetPoint ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getPoint ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetPoint ()" << endl; + trace << "PyTransformation_getPoint ()" << endl; - METHOD_HEAD ( "Transformation.GetPoint()" ) + METHOD_HEAD ( "Transformation.getPoint()" ) PyObject* arg0; PyObject* arg1; Point result; - __cs.Init ("Transformation.GetPoint"); - if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.GetPoint",Converter,&arg0,Converter,&arg1) ) + __cs.Init ("Transformation.getPoint"); + if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.getPoint",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == POINT_ARG ) { result = transf->getPoint ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { result = transf->getPoint ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == POINT_ARG ) { result = transf->getPoint ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { result = transf->getPoint ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } else { - PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.GetPoint()." ); + PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.getPoint()." ); return ( NULL ); } @@ -356,13 +355,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetBox ()" + // Attribute Method : "PyTransformation_getBox ()" - static PyObject* PyTransformation_GetBox ( PyTransformation *self, PyObject* args ) + static PyObject* PyTransformation_getBox ( PyTransformation *self, PyObject* args ) { - trace << "PyTransformation_GetBox ()" << endl; + trace << "PyTransformation_getBox ()" << endl; - METHOD_HEAD ( "Transformation.GetBox()" ) + METHOD_HEAD ( "Transformation.getBox()" ) PyObject* arg0; PyObject* arg1; @@ -370,23 +369,23 @@ extern "C" { PyObject* arg3; Box result; - __cs.Init ("Transformation.GetBox"); - if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Transformation.GetBox" + __cs.Init ("Transformation.getBox"); + if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Transformation.getBox" ,Converter,&arg0 ,Converter,&arg1 ,Converter,&arg2 ,Converter,&arg3) ) return ( NULL ); - if ( __cs.GetObjectIds() == BOX_ARG ) { result = transf->getBox ( *PYBOX_O(arg0) ); } - else if ( __cs.GetObjectIds() == POINTS2_ARG ) { result = transf->getBox ( *PYPOINT_O(arg0) + if ( __cs.getObjectIds() == BOX_ARG ) { result = transf->getBox ( *PYBOX_O(arg0) ); } + else if ( __cs.getObjectIds() == POINTS2_ARG ) { result = transf->getBox ( *PYPOINT_O(arg0) , *PYPOINT_O(arg1) ); } - else if ( __cs.GetObjectIds() == INTS4_ARG ) { result = transf->getBox ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS4_ARG ) { result = transf->getBox ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); } else { - PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.GetBox()." ); + PyErr_SetString ( ConstructorError, "invalid number of parameters for Tranformation.getBox()." ); return ( NULL ); } @@ -410,13 +409,13 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyTransformation_GetInvert ()" + // Attribute Method : "PyTransformation_getInvert ()" - static PyObject* PyTransformation_GetInvert ( PyTransformation *self ) + static PyObject* PyTransformation_getInvert ( PyTransformation *self ) { - trace << "PyTransformation_GetInvert ()" << endl; + trace << "PyTransformation_getInvert ()" << endl; - METHOD_HEAD ( "Transformation.GetInvert()" ) + METHOD_HEAD ( "Transformation.getInvert()" ) Transformation result = transf->getInvert (); @@ -479,10 +478,10 @@ extern "C" { if ( ! PyArg_ParseTuple(args,"|O&O&:Transformation.ApplyOn",Converter,&arg0,Converter,&arg1) ) return ( NULL ); - if ( __cs.GetObjectIds() == POINT_ARG ) { transf->applyOn ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == BOX_ARG ) { transf->applyOn ( *PYBOX_O(arg0) ); } - else if ( __cs.GetObjectIds() == TRANS_ARG ) { transf->applyOn ( *PYTRANSFORMATION_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { + if ( __cs.getObjectIds() == POINT_ARG ) { transf->applyOn ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == BOX_ARG ) { transf->applyOn ( *PYBOX_O(arg0) ); } + else if ( __cs.getObjectIds() == TRANS_ARG ) { transf->applyOn ( *PYTRANSFORMATION_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { PyErr_SetString ( ConstructorError, "This set of ApplyOn() parameters has not been implemented." ); return ( NULL ); } else { @@ -502,22 +501,22 @@ extern "C" { // PyTransformation Attribute Method table. PyMethodDef PyTransformation_Methods[] = - { { "GetTx" , (PyCFunction)PyTransformation_GetTx , METH_NOARGS, "Return the horizontal component of a Transformation." } - , { "GetTy" , (PyCFunction)PyTransformation_GetTy , METH_NOARGS, "Return the vertical component of a Transformation." } - , { "GetTranslation" , (PyCFunction)PyTransformation_GetTranslation , METH_NOARGS , "Return the translation component of a Transformation." } - , { "GetOrientation" , (PyCFunction)PyTransformation_GetOrientation , METH_NOARGS , "Return the orientation component of a Transformation." } - , { "GetX" , (PyCFunction)PyTransformation_GetX , METH_VARARGS, "Return X of transformed point ." } - , { "GetY" , (PyCFunction)PyTransformation_GetY , METH_VARARGS, "Return Y of transformed point ." } - , { "GetDx" , (PyCFunction)PyTransformation_GetDx , METH_VARARGS, "Return X of transformed point ." } - , { "GetDy" , (PyCFunction)PyTransformation_GetDy , METH_VARARGS, "Return Y of transformed point ." } - , { "GetTransformation", (PyCFunction)PyTransformation_GetTransformation, METH_VARARGS, "Return combined transformation." } - , { "GetPoint" , (PyCFunction)PyTransformation_GetPoint , METH_VARARGS, "Return transformed point ." } - , { "GetBox" , (PyCFunction)PyTransformation_GetBox , METH_VARARGS, "Return transformed box." } - , { "GetInvert" , (PyCFunction)PyTransformation_GetInvert , METH_NOARGS, "Return inverse transformation." } + { { "getTx" , (PyCFunction)PyTransformation_getTx , METH_NOARGS, "Return the horizontal component of a Transformation." } + , { "getTy" , (PyCFunction)PyTransformation_getTy , METH_NOARGS, "Return the vertical component of a Transformation." } + , { "getTranslation" , (PyCFunction)PyTransformation_getTranslation , METH_NOARGS , "Return the translation component of a Transformation." } + , { "getOrientation" , (PyCFunction)PyTransformation_getOrientation , METH_NOARGS , "Return the orientation component of a Transformation." } + , { "getX" , (PyCFunction)PyTransformation_getX , METH_VARARGS, "Return X of transformed point ." } + , { "getY" , (PyCFunction)PyTransformation_getY , METH_VARARGS, "Return Y of transformed point ." } + , { "getDx" , (PyCFunction)PyTransformation_getDx , METH_VARARGS, "Return X of transformed point ." } + , { "getDy" , (PyCFunction)PyTransformation_getDy , METH_VARARGS, "Return Y of transformed point ." } + , { "getTransformation", (PyCFunction)PyTransformation_getTransformation, METH_VARARGS, "Return combined transformation." } + , { "getPoint" , (PyCFunction)PyTransformation_getPoint , METH_VARARGS, "Return transformed point ." } + , { "getBox" , (PyCFunction)PyTransformation_getBox , METH_VARARGS, "Return transformed box." } + , { "getInvert" , (PyCFunction)PyTransformation_getInvert , METH_NOARGS, "Return inverse transformation." } , { "Invert" , (PyCFunction)PyTransformation_Invert , METH_NOARGS, "Inverse transformation." } , { "ApplyOn" , (PyCFunction)PyTransformation_ApplyOn , METH_VARARGS, "Apply transformation to object." } - , { "Delete" , (PyCFunction)PyTransformation_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + , { "destroy" , (PyCFunction)PyTransformation_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -561,14 +560,14 @@ extern "C" { ,Converter,&arg2 ) ) return ( NULL ); - if ( __cs.GetObjectIds() == NO_ARG ) { transf = new Transformation (); } - else if ( __cs.GetObjectIds() == POINT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) ); } - else if ( __cs.GetObjectIds() == TRANS_ARG ) { transf = new Transformation ( *PYTRANSFORMATION_O(arg0) ); } - else if ( __cs.GetObjectIds() == INTS2_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0) + if ( __cs.getObjectIds() == NO_ARG ) { transf = new Transformation (); } + else if ( __cs.getObjectIds() == POINT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) ); } + else if ( __cs.getObjectIds() == TRANS_ARG ) { transf = new Transformation ( *PYTRANSFORMATION_O(arg0) ); } + else if ( __cs.getObjectIds() == INTS2_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) ); } - else if ( __cs.GetObjectIds() == POINT_INT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) + else if ( __cs.getObjectIds() == POINT_INT_ARG ) { transf = new Transformation ( *PYPOINT_O(arg0) , PyInt_AsOrientation(arg1) ); } - else if ( __cs.GetObjectIds() == INTS3_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0) + else if ( __cs.getObjectIds() == INTS3_ARG ) { transf = new Transformation ( PyInt_AsLong(arg0) , PyInt_AsLong(arg1) , PyInt_AsOrientation(arg2) ); } else { diff --git a/hurricane/src/pyext/PyUnit.cpp b/hurricane/src/pyext/PyUnit.cpp index 44326004..7b5b1669 100644 --- a/hurricane/src/pyext/PyUnit.cpp +++ b/hurricane/src/pyext/PyUnit.cpp @@ -76,25 +76,25 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyUnit_GetUnit ()" + // Attribute Method : "PyUnit_getUnit ()" - extern PyObject* PyUnit_GetUnit ( PyObject* module, PyObject* args ) + extern PyObject* PyUnit_getUnit ( PyObject* module, PyObject* args ) { - trace << "PyUnit_GetUnit ()" << endl; + trace << "PyUnit_getUnit ()" << endl; PyObject* arg0; Unit result = 0; HTRY - __cs.Init ( "Unit.GetUnit" ); - if ( ! PyArg_ParseTuple(args,"|O&:Unit.GetUnit",Converter,&arg0) ) + __cs.Init ( "Unit.getUnit" ); + if ( ! PyArg_ParseTuple(args,"|O&:Unit.getUnit",Converter,&arg0) ) return ( NULL ); - if ( __cs.GetObjectIds() == INT_ARG ) { result = GetUnit ( PyInt_AsLong ( arg0 ) ); } - else if ( __cs.GetObjectIds() == FLOAT_ARG ) { result = GetUnit ( PyFloat_AsDouble ( arg0 ) ); } + if ( __cs.getObjectIds() == INT_ARG ) { result = getUnit ( PyInt_AsLong ( arg0 ) ); } + else if ( __cs.getObjectIds() == FLOAT_ARG ) { result = getUnit ( PyFloat_AsDouble ( arg0 ) ); } else { - PyErr_SetString ( ConstructorError, "invalid number of parameters for Unit.GetUnit constructor." ); + PyErr_SetString ( ConstructorError, "invalid number of parameters for Unit.getUnit constructor." ); return ( NULL ); } @@ -107,28 +107,28 @@ extern "C" { // --------------------------------------------------------------- - // Attribute Method : "PyUnit_GetValue ()" + // Attribute Method : "PyUnit_getValue ()" - extern PyObject* PyUnit_GetValue ( PyObject* module, PyObject* args ) + extern PyObject* PyUnit_getValue ( PyObject* module, PyObject* args ) { - trace << "PyUnit_GetValue ()" << endl; + trace << "PyUnit_getValue ()" << endl; PyObject* arg0; - if ( ! ParseOneArg ( "GetValue", args,INT_ARG, &arg0 ) ) return ( NULL ); + if ( ! ParseOneArg ( "getValue", args,INT_ARG, &arg0 ) ) return ( NULL ); - return ( Py_BuildValue("d",GetValue(PyInt_AsLong(arg0))) ); + return ( Py_BuildValue("d",getValue(PyInt_AsLong(arg0))) ); } // --------------------------------------------------------------- - // Attribute Method : "PyUnit_GetResolution ()" + // Attribute Method : "PyUnit_getResolution ()" - extern PyObject* PyUnit_GetResolution ( PyObject* module ) + extern PyObject* PyUnit_getResolution ( PyObject* module ) { - trace << "PyUnit_GetResolution ()" << endl; + trace << "PyUnit_getResolution ()" << endl; - return ( Py_BuildValue("d",GetResolution()) ); + return ( Py_BuildValue("d",getResolution()) ); } diff --git a/hurricane/src/pyext/PyUnit.h b/hurricane/src/pyext/PyUnit.h index e504b817..3069ebd9 100644 --- a/hurricane/src/pyext/PyUnit.h +++ b/hurricane/src/pyext/PyUnit.h @@ -53,13 +53,13 @@ -# ifndef __PYUNIT__ -# define __PYUNIT__ +#ifndef __PYUNIT__ +#define __PYUNIT__ -# include "PyHurricane.h" +#include "PyHurricane.h" -# include "Unit.h" +#include "Unit.h" namespace Isobar { @@ -77,8 +77,8 @@ extern "C" { // ------------------------------------------------------------------- // Functions & Types exported to "PyHurricane.ccp". - extern PyObject* PyUnit_GetUnit ( PyObject* module, PyObject* args ); - extern PyObject* PyUnit_GetValue ( PyObject* module, PyObject* args ); + extern PyObject* PyUnit_getUnit ( PyObject* module, PyObject* args ); + extern PyObject* PyUnit_getValue ( PyObject* module, PyObject* args ); } // End of extern "C". @@ -91,4 +91,4 @@ extern "C" { -# endif +#endif diff --git a/hurricane/src/pyext/PyVertical.cpp b/hurricane/src/pyext/PyVertical.cpp index 7f8ce705..89aa598a 100644 --- a/hurricane/src/pyext/PyVertical.cpp +++ b/hurricane/src/pyext/PyVertical.cpp @@ -52,9 +52,9 @@ -# include "PyNet.h" -# include "PyLayer.h" -# include "PyVertical.h" +#include "PyNet.h" +#include "PyLayer.h" +#include "PyVertical.h" namespace Isobar { @@ -66,17 +66,17 @@ USING_NAMESPACE_HURRICANE extern "C" { -# undef ACCESS_OBJECT -# undef ACCESS_CLASS -# define ACCESS_OBJECT _baseObject._baseObject._baseObject._object -# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject._baseObject._baseObject) -# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Vertical,vertical,function) +#undef ACCESS_OBJECT +#undef ACCESS_CLASS +#define ACCESS_OBJECT _baseObject._baseObject._baseObject._object +#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject._baseObject._baseObject) +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Vertical,vertical,function) // x=================================================================x // | "PyVertical" Python Module Code Part | // x=================================================================x -# if defined(__PYTHON_MODULE__) +#if defined(__PYTHON_MODULE__) // x-------------------------------------------------------------x @@ -84,16 +84,16 @@ extern "C" { // x-------------------------------------------------------------x - // Standart Delete (Attribute). - DBoDeleteAttribute(PyVertical_Delete,PyVertical) + // Standard destroy (Attribute). + DBoDestroyAttribute(PyVertical_destroy, PyVertical) // --------------------------------------------------------------- // PyVertical Attribute Method table. PyMethodDef PyVertical_Methods[] = - { { "Delete" , (PyCFunction)PyVertical_Delete , METH_NOARGS - , "Delete associated hurricane object, the python object remains." } + { { "destroy" , (PyCFunction)PyVertical_destroy , METH_NOARGS + , "Destroy associated hurricane object, the python object remains." } , {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -131,48 +131,48 @@ extern "C" { ) ) return ( NULL ); - //cerr << "Format := " << __cs.GetObjectIds() << endl; - if ( __cs.GetObjectIds() == NET_LAYER_INT_ARG ) + //cerr << "Format := " << __cs.getObjectIds() << endl; + if ( __cs.getObjectIds() == NET_LAYER_INT_ARG ) vertical = Vertical::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS2_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS2_ARG ) vertical = Vertical::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INT_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INT_ARG ) vertical = Vertical::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS3_ARG ) vertical = Vertical::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS2_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS2_ARG ) vertical = Vertical::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) ); - else if ( __cs.GetObjectIds() == NET_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == NET_LAYER_INTS4_ARG ) vertical = Vertical::Create ( PYNET_O(arg0) , PYLAYER_O(arg1) , PyInt_AsLong(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) , PyInt_AsLong(arg5) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS3_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS3_ARG ) vertical = Vertical::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) , PyInt_AsLong(arg3) , PyInt_AsLong(arg4) , PyInt_AsLong(arg5) ); - else if ( __cs.GetObjectIds() == COMPS2_LAYER_INTS4_ARG ) + else if ( __cs.getObjectIds() == COMPS2_LAYER_INTS4_ARG ) vertical = Vertical::Create ( ComponentCast(arg0) , ComponentCast(arg1) , PYLAYER_O(arg2) diff --git a/hurricane/src/viewer/CellViewer.cpp b/hurricane/src/viewer/CellViewer.cpp index 07af8702..2da1e23b 100644 --- a/hurricane/src/viewer/CellViewer.cpp +++ b/hurricane/src/viewer/CellViewer.cpp @@ -23,7 +23,7 @@ CellViewer::~CellViewer() { delete layersWidget; } -static int scrollStep = GetUnit(200); +static int scrollStep = getUnit(200); void CellViewer::keyPressEvent(QKeyEvent *event) { switch (event->key()) { diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 58d1604c..7eed8ec0 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -1,6 +1,6 @@ // ************************************************************************************************* // ************************************************************************************************* -// File: CellWidget.cpp +// File: CellWidget.cpp // ************************************************************************************************* // ************************************************************************************************* @@ -149,8 +149,8 @@ CellWidget::CellWidget(Cell* cell, //_commandMap(), //_startedCommand(NULL), _gridOrigin(), - _gridXStep(GetUnit(1)), - _gridYStep(GetUnit(1)), + _gridXStep(getUnit(1)), + _gridYStep(getUnit(1)), _gridIsVisible(true), _gridAxesAreVisible(false), _gridDisplayThreshold(8), @@ -175,11 +175,11 @@ CellWidget::CellWidget(Cell* cell, setFocusPolicy(Qt::StrongFocus); // to accepts focus by tabbing and clicking setMouseTracking(true); // to have move events even a mouse button isn't pressed - DataBase* database = GetDataBase(); + DataBase* database = getDataBase(); if (database) { - Technology* technology = database->GetTechnology(); + Technology* technology = database->getTechnology(); if (technology) { - for_each_basic_layer(basiclayer, technology->GetBasicLayers()) { + for_each_basic_layer(basiclayer, technology->getBasicLayers()) { _basicLayersBrush[basiclayer] = ::getBrush(basiclayer->getFillPattern(), basiclayer->getRedValue(), @@ -230,7 +230,7 @@ CellWidget::~CellWidget() // // View* view = getView(); // if (view) { -// label.add(" ", view); +// label.add(" ", view); // } // // return label; @@ -242,45 +242,45 @@ CellWidget::~CellWidget() // Record* record = new Record(this); // // if (record) { -// record->addHeader("Widget"); +// record->addHeader("Widget"); // -// record->addHeader("CellWidget"); +// record->addHeader("CellWidget"); // -// record->addSlot("View", getView()); -// record->addSlot("Center", getCenter()); -// record->addSlot("Scale", getScale()); -// record->addSlot("BackgroundColor", My::getLabel(getBackgroundColor())); -// record->addSlot("ForegroundColor", My::getLabel(getForegroundColor())); -// record->addSlot("DoubleBuffering", doubleBuffering()); -// record->addSlot("AutomaticScrolling", automaticScrolling()); -// record->addSlot("VisibleLayers", getVisibleLayers()); -// record->addSlot("Commands", getCommands()); -// record->addSlot("GridOrigin", getGridOrigin()); -// record->addSlot("GridXStep", GetValueString(getGridXStep())); -// record->addSlot("GridYStep", GetValueString(getGridYStep())); -// record->addSlot("GridDisplayThreshold", getGridDisplayThreshold()); -// record->addSlot("GridIsVisible", gridIsVisible()); -// record->addSlot("GridAxesAreVisible", gridAxesAreVisible()); -// record->addSlot("GridIsDrawable", gridIsDrawable()); -// record->addSlot("GridColor", My::getLabel(getGridColor())); -// record->addSlot("SnapGrid", snapGrid()); -// record->addSlot("DisplayDepth", getDisplayDepth()); -// record->addSlot("DisplaySize", getDisplaySize()); -// record->addSlot("SelectionIsVisible", selectionIsVisible()); -// record->addSlot("Selection", getSelection()); -// record->addSlot("SelectionBox", getSelectionBox()); -// unsigned limit = getSelectionLimit(); -// if (limit) { -// record->addSlot("SelectionLimit", limit); -// } -// else { -// record->addSlot("SelectionLimit", "NONE"); -// } -// record->addSlot("SelectionColor", My::getLabel(getSelectionColor())); -// record->addSlot("HighlightionIsVisible", highlightionIsVisible()); -// record->addSlot("Highlightion", getHighlightion()); -// record->addSlot("HighlightionBox", getHighlightionBox()); -// record->addSlot("TrackBox", getTrackBox()); +// record->addSlot("View", getView()); +// record->addSlot("Center", getCenter()); +// record->addSlot("Scale", getScale()); +// record->addSlot("BackgroundColor", My::getLabel(getBackgroundColor())); +// record->addSlot("ForegroundColor", My::getLabel(getForegroundColor())); +// record->addSlot("DoubleBuffering", doubleBuffering()); +// record->addSlot("AutomaticScrolling", automaticScrolling()); +// record->addSlot("VisibleLayers", getVisibleLayers()); +// record->addSlot("Commands", getCommands()); +// record->addSlot("GridOrigin", getGridOrigin()); +// record->addSlot("GridXStep", getValueString(getGridXStep())); +// record->addSlot("GridYStep", getValueString(getGridYStep())); +// record->addSlot("GridDisplayThreshold", getGridDisplayThreshold()); +// record->addSlot("GridIsVisible", gridIsVisible()); +// record->addSlot("GridAxesAreVisible", gridAxesAreVisible()); +// record->addSlot("GridIsDrawable", gridIsDrawable()); +// record->addSlot("GridColor", My::getLabel(getGridColor())); +// record->addSlot("SnapGrid", snapGrid()); +// record->addSlot("DisplayDepth", getDisplayDepth()); +// record->addSlot("DisplaySize", getDisplaySize()); +// record->addSlot("SelectionIsVisible", selectionIsVisible()); +// record->addSlot("Selection", getSelection()); +// record->addSlot("SelectionBox", getSelectionBox()); +// unsigned limit = getSelectionLimit(); +// if (limit) { +// record->addSlot("SelectionLimit", limit); +// } +// else { +// record->addSlot("SelectionLimit", "NONE"); +// } +// record->addSlot("SelectionColor", My::getLabel(getSelectionColor())); +// record->addSlot("HighlightionIsVisible", highlightionIsVisible()); +// record->addSlot("Highlightion", getHighlightion()); +// record->addSlot("HighlightionBox", getHighlightionBox()); +// record->addSlot("TrackBox", getTrackBox()); // } // // return record; @@ -324,19 +324,19 @@ CellWidget::getScale() const Unit CellWidget::getX(int screenX) const { - return GetUnit((screenX - _screenDx) / _scale); + return getUnit((screenX - _screenDx) / _scale); } Unit CellWidget::getY(int screenY) const { - return GetUnit(((height() - screenY) - _screenDy) / _scale); + return getUnit(((height() - screenY) - _screenDy) / _scale); } Unit CellWidget::getSize(int screenSize) const { - return GetUnit(screenSize / _scale); + return getUnit(screenSize / _scale); } Point @@ -349,13 +349,13 @@ Box CellWidget::getBox(const QRect& screenRect) const { if (screenRect.isEmpty()) { - return Box(); + return Box(); } return Box(getX(screenRect.left()), - getY(screenRect.bottom()), - getX(screenRect.right()), - getY(screenRect.top())); + getY(screenRect.bottom()), + getX(screenRect.right()), + getY(screenRect.top())); } @@ -371,19 +371,19 @@ CellWidget::getBox(const QRect& screenRect) const int CellWidget::getScreenX(const Unit& x) const { - return _screenDx + (int)rint(GetValue(x) * _scale); + return _screenDx + (int)rint(getValue(x) * _scale); } int CellWidget::getScreenY(const Unit& y) const { - return height() - (int)rint(_screenDy + (GetValue(y) * _scale)); + return height() - (int)rint(_screenDy + (getValue(y) * _scale)); } int CellWidget::getScreenSize(const Unit& size) const { - return (int)rint(GetValue(size) * _scale); + return (int)rint(getValue(size) * _scale); } QPoint @@ -396,7 +396,7 @@ QRect CellWidget::getScreenRect(const Box& box) const { if (box.isEmpty()) { - return QRect(); + return QRect(); } int screenX1 = getScreenX(box.getXMin()); @@ -405,7 +405,7 @@ CellWidget::getScreenRect(const Box& box) const int screenY2 = getScreenY(box.getYMax()); return QRect(QPoint(min(screenX1, screenX2), min(screenY1, screenY2)), - QPoint(max(screenX1, screenX2), max(screenY1, screenY2))); + QPoint(max(screenX1, screenX2), max(screenY1, screenY2))); } @@ -422,7 +422,7 @@ CellWidget::getSnapPoint(const Point& point) const Point CellWidget::getSnapPoint(int screenX, - int screenY) const + int screenY) const { return getSnapPoint(Point(getX(screenX), getY(screenY))); } @@ -436,12 +436,12 @@ CellWidget::getSnapPoint(int screenX, BasicLayers CellWidget::getVisibleLayers() const { - DataBase* database = GetDataBase(); + DataBase* database = getDataBase(); if (database) { - Technology* technology = database->GetTechnology(); - if (technology) { - return technology->GetBasicLayers(_visibleLayerMask); - } + Technology* technology = database->getTechnology(); + if (technology) { + return technology->getBasicLayers(_visibleLayerMask); + } } return NULL; } @@ -477,46 +477,46 @@ CellWidget::getVisibleLayers() const Unit CellWidget::getGridX(const Unit& x, - int sign) const + int sign) const { if (!((-1 <= sign) && (sign <= 1))) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } Unit cx = x; Unit xo = _gridOrigin.getX(); if (cx != xo) { - cx -= xo; - switch (sign) { - case -1 : { - if (0 < cx) { - return ((cx / _gridXStep) * _gridXStep) + xo; - } - else { - if (cx < 0) { - return (((cx / _gridXStep) - 1) * _gridXStep) + xo; - } - } - return cx + xo; - } - case 0 : { - Unit x1 = (cx / _gridXStep) * _gridXStep; - Unit x2 = ((x1 < cx) ? (x1 + _gridXStep) : (x1 - _gridXStep)); - return ((labs(x1 - cx) <= labs(x2 - cx)) ? x1 : x2) + xo; - } - case 1 : { - if (0 < cx) { - return (((cx / _gridXStep) + 1) * _gridXStep) + xo; - } - else { - if (cx < 0) { - return ((cx / _gridXStep) * _gridXStep) + xo; - } - } - return cx + xo; - } - } + cx -= xo; + switch (sign) { + case -1 : { + if (0 < cx) { + return ((cx / _gridXStep) * _gridXStep) + xo; + } + else { + if (cx < 0) { + return (((cx / _gridXStep) - 1) * _gridXStep) + xo; + } + } + return cx + xo; + } + case 0 : { + Unit x1 = (cx / _gridXStep) * _gridXStep; + Unit x2 = ((x1 < cx) ? (x1 + _gridXStep) : (x1 - _gridXStep)); + return ((labs(x1 - cx) <= labs(x2 - cx)) ? x1 : x2) + xo; + } + case 1 : { + if (0 < cx) { + return (((cx / _gridXStep) + 1) * _gridXStep) + xo; + } + else { + if (cx < 0) { + return ((cx / _gridXStep) * _gridXStep) + xo; + } + } + return cx + xo; + } + } } return cx; @@ -524,46 +524,46 @@ CellWidget::getGridX(const Unit& x, Unit CellWidget::getGridY(const Unit& y, - int sign) const + int sign) const { if (!((-1 <= sign) && (sign <= 1))) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } Unit cy = y; Unit yo = _gridOrigin.getY(); if (cy != yo) { - cy -= yo; - switch (sign) { - case -1 : { - if (0 < cy) { - return ((cy / _gridYStep) * _gridYStep) + yo; - } - else { - if (cy < 0) { - return (((cy / _gridYStep) - 1) * _gridYStep) + yo; - } - } - return cy + yo; - } - case 0 : { - Unit y1 = (cy / _gridYStep) * _gridYStep; - Unit y2 = ((y1 < cy) ? (y1 + _gridYStep) : (y1 - _gridYStep)); - return ((labs(y1 - cy) <= labs(y2 - cy)) ? y1 : y2) + yo; - } - case 1 : { - if (0 < cy) { - return (((cy / _gridYStep) + 1) * _gridYStep) + yo; - } - else { - if (cy < 0) { - return ((cy / _gridYStep) * _gridYStep) + yo; - } - } - return cy + yo; - } - } + cy -= yo; + switch (sign) { + case -1 : { + if (0 < cy) { + return ((cy / _gridYStep) * _gridYStep) + yo; + } + else { + if (cy < 0) { + return (((cy / _gridYStep) - 1) * _gridYStep) + yo; + } + } + return cy + yo; + } + case 0 : { + Unit y1 = (cy / _gridYStep) * _gridYStep; + Unit y2 = ((y1 < cy) ? (y1 + _gridYStep) : (y1 - _gridYStep)); + return ((labs(y1 - cy) <= labs(y2 - cy)) ? y1 : y2) + yo; + } + case 1 : { + if (0 < cy) { + return (((cy / _gridYStep) + 1) * _gridYStep) + yo; + } + else { + if (cy < 0) { + return ((cy / _gridYStep) * _gridYStep) + yo; + } + } + return cy + yo; + } + } } return cy; @@ -571,8 +571,8 @@ CellWidget::getGridY(const Unit& y, Point CellWidget::getGridPoint(const Point& point, - int xSign, - int ySign) const + int xSign, + int ySign) const { return Point(getGridX(point.getX(), xSign), getGridY(point.getY(), ySign)); } @@ -591,7 +591,7 @@ CellWidget::getGridPoint(const Point& point, // View* view = getView(); // // if (view) { -// world.merge(view->getBoundingBox()); +// world.merge(view->getBoundingBox()); // } // // return world; @@ -617,7 +617,7 @@ CellWidget::getGridPoint(const Point& point, //Occurrences //CellWidget::getSelection() const //{ -// return getSelectors().getAssociates(GetOccurrence()); +// return getSelectors().getAssociates(getOccurrence()); //} //Box @@ -626,8 +626,8 @@ CellWidget::getGridPoint(const Point& point, // Box selectionBox; // // forEachOccurrence(occurrence, getSelection()) { -// selectionBox.merge(occurrence.getBoundingBox()); -// endFor; +// selectionBox.merge(occurrence.getBoundingBox()); +// endFor; // } // // return selectionBox; @@ -642,7 +642,7 @@ CellWidget::getGridPoint(const Point& point, //Occurrences //CellWidget::getHighlightion() const //{ -// return getHighlightors().getAssociates(GetOccurrence()); +// return getHighlightors().getAssociates(getOccurrence()); //} // //Box @@ -651,8 +651,8 @@ CellWidget::getGridPoint(const Point& point, // Box highlightionBox; // // forEachOccurrence(occurrence, getHighlightion()) { -// highlightionBox.merge(occurrence.getBoundingBox()); -// endFor; +// highlightionBox.merge(occurrence.getBoundingBox()); +// endFor; // } // // return highlightionBox; @@ -732,13 +732,13 @@ CellWidget::hasRecord() const //CellWidget::setTrackBox(TrackBox* trackBox) //{ // if (trackBox != _trackBox) { -// if (_trackBox) { -// _trackBox->_setCellWidget(NULL); -// } -// _trackBox = trackBox; -// if (_trackBox) { -// _trackBox->_setCellWidget(this); -// } +// if (_trackBox) { +// _trackBox->_setCellWidget(NULL); +// } +// _trackBox = trackBox; +// if (_trackBox) { +// _trackBox->_setCellWidget(this); +// } // } //} // @@ -765,7 +765,7 @@ bool CellWidget::isVisible(BasicLayer* layer) const { if (!layer) { - //throw Error(NULL_LAYER, __FILE__, __LINE__); + //throw Error(NULL_LAYER, __FILE__, __LINE__); } return (_visibleLayerMask & layer->getMask()); @@ -775,7 +775,7 @@ bool CellWidget::isDrawable(BasicLayer* layer) const { if (!layer) { - //throw Error(NULL_LAYER, __FILE__, __LINE__); + //throw Error(NULL_LAYER, __FILE__, __LINE__); } return (layer->getDisplayThreshold() <= _scale); @@ -791,16 +791,16 @@ CellWidget::isDrawable(BasicLayer* layer) const bool CellWidget::isOnGridX(const Unit& x, - unsigned n) const + unsigned n) const { if (!n) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } Unit delta = labs(x - _gridOrigin.getX()); if (delta < 0) { - delta = -delta; + delta = -delta; } Unit step = _gridXStep * n; @@ -810,16 +810,16 @@ CellWidget::isOnGridX(const Unit& x, bool CellWidget::isOnGridY(const Unit& y, - unsigned n) const + unsigned n) const { if (!n) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } Unit delta = labs(y - _gridOrigin.getY()); if (delta < 0) { - delta = -delta; + delta = -delta; } Unit step = _gridYStep * n; @@ -829,8 +829,8 @@ CellWidget::isOnGridY(const Unit& y, bool CellWidget::isOnGridPoint(const Point& point, - unsigned xN, - unsigned yN) const + unsigned xN, + unsigned yN) const { return isOnGridX(point.getX(), xN) && isOnGridY(point.getX(), yN); } @@ -848,7 +848,7 @@ CellWidget::isOnGridPoint(const Point& point, //CellWidget::isSelected(const Occurrence& occurrence) const //{ // Selector* selector = -// dynamic_cast(occurrence.getProperty(Selector::getPropertyName())); +// dynamic_cast(occurrence.getProperty(Selector::getPropertyName())); // // return (selector) ? selector->_contains((CellWidget*)this) : false; //} @@ -863,7 +863,7 @@ CellWidget::isOnGridPoint(const Point& point, //CellWidget::isHighlighted(const Occurrence& occurrence) const //{ // Highlightor* highlightor = -// dynamic_cast(occurrence.getProperty(Highlightor::getPropertyName())); +// dynamic_cast(occurrence.getProperty(Highlightor::getPropertyName())); // // return (highlightor) ? highlightor->_contains((CellWidget*)this) : false; //} @@ -885,8 +885,8 @@ void CellWidget::setBackgroundColor(const QColor& color) { if (color != _backgroundColor) { - _backgroundColor = color; - invalidate(); + _backgroundColor = color; + invalidate(); } } @@ -894,8 +894,8 @@ void CellWidget::setForegroundColor(const QColor& color) { if (color != _foregroundColor) { - _foregroundColor = color; - invalidate(); + _foregroundColor = color; + invalidate(); } } @@ -907,27 +907,27 @@ CellWidget::setForegroundColor(const QColor& color) void CellWidget::setVisible(BasicLayer* layer, - bool visible) + bool visible) { if (isVisible(layer) != visible) { - if (visible) { - _visibleLayerMask |= layer->getMask(); - } - else { - _visibleLayerMask &= ~layer->getMask(); - } + if (visible) { + _visibleLayerMask |= layer->getMask(); + } + else { + _visibleLayerMask &= ~layer->getMask(); + } - onSetVisible(layer, visible); + onSetVisible(layer, visible); - Cell* cell = getCell(); + Cell* cell = getCell(); - //if (view && !view->getSlices(layer).isEmpty() && isDrawable(layer)) { - // invalidate(); - //} + //if (view && !view->getSlices(layer).isEmpty() && isDrawable(layer)) { + // invalidate(); + //} - if (cell && !cell->GetSlices(layer->getMask()).IsEmpty() && isDrawable(layer)) { - invalidate(); - } + if (cell && !cell->getSlices(layer->getMask()).IsEmpty() && isDrawable(layer)) { + invalidate(); + } } } @@ -947,13 +947,13 @@ void CellWidget::setGridOrigin(const Point& origin) { if (origin != _gridOrigin) { - bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); + bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); - _gridOrigin = origin; + _gridOrigin = origin; - if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { - invalidate(); - } + if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { + invalidate(); + } } } @@ -961,17 +961,17 @@ void CellWidget::setGridXStep(const Unit& step) { if (!step) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if (step != _gridXStep) { - bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); + bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); - _gridXStep = step; + _gridXStep = step; - if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { - invalidate(); - } + if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { + invalidate(); + } } } @@ -979,17 +979,17 @@ void CellWidget::setGridYStep(const Unit& step) { if (!step) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if (step != _gridYStep) { - bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); + bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); - _gridYStep = step; + _gridYStep = step; - if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { - invalidate(); - } + if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { + invalidate(); + } } } @@ -997,38 +997,38 @@ void CellWidget::setGridStep(const Unit& step) { if (!step) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if ((step != _gridXStep) || (step != _gridYStep)) { - bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); + bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); - _gridXStep = step; - _gridYStep = step; + _gridXStep = step; + _gridYStep = step; - if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { - invalidate(); - } + if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { + invalidate(); + } } } void CellWidget::setGridSteps(const Unit& xStep, - const Unit& yStep) + const Unit& yStep) { if (!xStep || !yStep) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if ((xStep != _gridXStep) || (yStep != _gridYStep)) { - bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); + bool gridIsDrawn = gridIsVisible() && gridIsDrawable(); - _gridXStep = xStep; - _gridYStep = yStep; + _gridXStep = xStep; + _gridYStep = yStep; - if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { - invalidate(); - } + if (gridIsDrawn || (gridIsVisible() && gridIsDrawable())) { + invalidate(); + } } } @@ -1036,7 +1036,7 @@ void CellWidget::setGridDisplayThreshold(unsigned threshold) { if (threshold < 3) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } _gridDisplayThreshold = threshold; @@ -1048,10 +1048,10 @@ void CellWidget::setGridColor(const QColor& color) { if (_gridColor != color) { - _gridColor = color; - if (gridIsVisible() && gridIsDrawable()) { - invalidate(); - } + _gridColor = color; + if (gridIsVisible() && gridIsDrawable()) { + invalidate(); + } } } @@ -1067,10 +1067,10 @@ void CellWidget::setGridVisible(bool visible) { if (_gridIsVisible != visible) { - _gridIsVisible = visible; - if (gridIsDrawable()) { - invalidate(); - } + _gridIsVisible = visible; + if (gridIsDrawable()) { + invalidate(); + } } } @@ -1078,10 +1078,10 @@ void CellWidget::setGridAxesVisible(bool visible) { if (_gridAxesAreVisible != visible) { - _gridAxesAreVisible = visible; - if (gridIsDrawable()) { - invalidate(); - } + _gridAxesAreVisible = visible; + if (gridIsDrawable()) { + invalidate(); + } } } @@ -1089,15 +1089,15 @@ void CellWidget::setSnapGrid(bool enable) { if (_snapGrid != enable) { - if (_snapGrid && _drawSnapPoint) { - drawSnapPoint(); - _drawSnapPoint = false; - } - _snapGrid = enable; - if (_snapGrid && !_drawSnapPoint) { - _drawSnapPoint = true; - drawSnapPoint(); - } + if (_snapGrid && _drawSnapPoint) { + drawSnapPoint(); + _drawSnapPoint = false; + } + _snapGrid = enable; + if (_snapGrid && !_drawSnapPoint) { + _drawSnapPoint = true; + drawSnapPoint(); + } } } @@ -1112,8 +1112,8 @@ void CellWidget::setDisplayDepth(unsigned displayDepth) { if (displayDepth != _displayDepth) { - _displayDepth = displayDepth; - invalidate(); + _displayDepth = displayDepth; + invalidate(); } } @@ -1121,7 +1121,7 @@ void CellWidget::setDisplaySize(unsigned displaySize) { if (displaySize != _displaySize) { - _displaySize = displaySize; + _displaySize = displaySize; } } @@ -1138,75 +1138,75 @@ void CellWidget::setFont(const QFont& font) { if (_painter) { - _painter->setFont(font); + _painter->setFont(font); } } void CellWidget::setPen(const QPen& pen, - double brightness) + double brightness) { if (!((0.1 <= brightness) && (brightness <= 1.0))) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if (_painter) { - if (pen == Qt::NoPen) { - _painter->setPen(pen); - } - else { - QPen correctedPen = pen; + if (pen == Qt::NoPen) { + _painter->setPen(pen); + } + else { + QPen correctedPen = pen; - if (brightness < 1) { - QColor bgColor = getBackgroundColor(); - int r = bgColor.red(); - int g = bgColor.green(); - int b = bgColor.blue(); + if (brightness < 1) { + QColor bgColor = getBackgroundColor(); + int r = bgColor.red(); + int g = bgColor.green(); + int b = bgColor.blue(); - QColor color = pen.color(); - r = r + (int)((color.red() - r) * brightness); - g = g + (int)((color.green() - g) * brightness); - b = b + (int)((color.blue() - b) * brightness); + QColor color = pen.color(); + r = r + (int)((color.red() - r) * brightness); + g = g + (int)((color.green() - g) * brightness); + b = b + (int)((color.blue() - b) * brightness); - correctedPen = QPen(QColor(r, g, b)); - } + correctedPen = QPen(QColor(r, g, b)); + } - _painter->setPen(correctedPen); - } + _painter->setPen(correctedPen); + } } } void CellWidget::setBrush(const QBrush& brush, - double brightness) + double brightness) { if (!((0.1 <= brightness) && (brightness <= 1.0))) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } if (_painter) { - if (brush == Qt::NoBrush) { - _painter->setBrush(brush); - } - else { - QBrush correctedBrush = brush; + if (brush == Qt::NoBrush) { + _painter->setBrush(brush); + } + else { + QBrush correctedBrush = brush; - if (brightness < 1) { - QColor bgColor = getBackgroundColor(); - int r = bgColor.red(); - int g = bgColor.green(); - int b = bgColor.blue(); + if (brightness < 1) { + QColor bgColor = getBackgroundColor(); + int r = bgColor.red(); + int g = bgColor.green(); + int b = bgColor.blue(); - QColor color = brush.color(); - r = r + (int)((color.red() - r) * brightness); - g = g + (int)((color.green() - g) * brightness); - b = b + (int)((color.blue() - b) * brightness); + QColor color = brush.color(); + r = r + (int)((color.red() - r) * brightness); + g = g + (int)((color.green() - g) * brightness); + b = b + (int)((color.blue() - b) * brightness); - correctedBrush = QBrush(QColor(r, g, b), brush.style()); - } + correctedBrush = QBrush(QColor(r, g, b), brush.style()); + } - _painter->setBrush(correctedBrush); - } + _painter->setBrush(correctedBrush); + } } } @@ -1214,7 +1214,7 @@ void CellWidget::setBrushOrigin(const QPoint& origin) { if (_painter) { - _painter->setBrushOrigin(_brushDx + origin.x(), _brushDy + origin.y()); + _painter->setBrushOrigin(_brushDx + origin.x(), _brushDy + origin.y()); } } @@ -1230,10 +1230,10 @@ CellWidget::setBrushOrigin(const QPoint& origin) //CellWidget::setSelectionColor(const QColor& color) //{ // if (color != _selectionColor) { -// _selectionColor = color; -// if (selectionIsVisible()) { -// invalidate(getSelectionBox()); -// } +// _selectionColor = color; +// if (selectionIsVisible()) { +// invalidate(getSelectionBox()); +// } // } //} // @@ -1241,8 +1241,8 @@ CellWidget::setBrushOrigin(const QPoint& origin) //CellWidget::setSelectionVisible(bool visible) //{ // if (_selectionIsVisible != visible) { -// _selectionIsVisible = visible; -// invalidate(getSelectionBox()); +// _selectionIsVisible = visible; +// invalidate(getSelectionBox()); // } //} // @@ -1250,8 +1250,8 @@ CellWidget::setBrushOrigin(const QPoint& origin) //CellWidget::setHighlightionVisible(bool visible) //{ // if (_highlightionIsVisible != visible) { -// _highlightionIsVisible = visible; -// invalidate(getHighlightionBox()); +// _highlightionIsVisible = visible; +// invalidate(getHighlightionBox()); // } //} // @@ -1265,7 +1265,7 @@ void CellWidget::setAutomaticScrolling(bool enable) { if (!allowAutomaticScrolling()) { - //throw Error(INVALID_REQUEST, __FILE__, __LINE__); + //throw Error(INVALID_REQUEST, __FILE__, __LINE__); } _automaticScrolling = enable; @@ -1281,30 +1281,30 @@ CellWidget::setAutomaticScrolling(bool enable) void CellWidget::showAllLayers() { - DataBase* database = GetDataBase(); + DataBase* database = getDataBase(); if (database) { - Technology* technology = database->GetTechnology(); - if (technology) { - for_each_basic_layer(layer, technology->GetBasicLayers()) { - setVisible(layer, true); - end_for; - } - } + Technology* technology = database->getTechnology(); + if (technology) { + for_each_basic_layer(layer, technology->getBasicLayers()) { + setVisible(layer, true); + end_for; + } + } } } void CellWidget::hideAllLayers() { - DataBase* database = GetDataBase(); + DataBase* database = getDataBase(); if (database) { - Technology* technology = database->GetTechnology(); - if (technology) { - for_each_basic_layer(layer, technology->GetBasicLayers()) { - setVisible(layer, false); - end_for; - } - } + Technology* technology = database->getTechnology(); + if (technology) { + for_each_basic_layer(layer, technology->getBasicLayers()) { + setVisible(layer, false); + end_for; + } + } } } @@ -1320,11 +1320,11 @@ CellWidget::hideAllLayers() //CellWidget::select(const Occurrence& occurrence) //{ // if (!isSelectable(occurrence)) { -// throw Error(INVALID_REQUEST, __FILE__, __LINE__); +// throw Error(INVALID_REQUEST, __FILE__, __LINE__); // } // // if (_selectionLimit && (_selectionLimit <= getSelectors().getCount())) { -// return false; +// return false; // } // // Property* property = occurrence.getProperty(Selector::getPropertyName()); @@ -1332,13 +1332,13 @@ CellWidget::hideAllLayers() // Selector* selector = NULL; // // if (!property) { -// selector = new Selector(occurrence); +// selector = new Selector(occurrence); // } // else { -// if (!dynamic_cast(property)) { -// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); -// } -// selector = (Selector*)property; +// if (!dynamic_cast(property)) { +// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); +// } +// selector = (Selector*)property; // } // // selector->_attachTo(this); @@ -1352,19 +1352,19 @@ CellWidget::hideAllLayers() //CellWidget::unselect(const Occurrence& occurrence) //{ // if (!isSelectable(occurrence)) { -// throw Error(INVALID_REQUEST, __FILE__, __LINE__); +// throw Error(INVALID_REQUEST, __FILE__, __LINE__); // } // // Property* property = occurrence.getProperty(Selector::getPropertyName()); // // if (property) { -// if (!dynamic_cast(property)) { -// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); -// } +// if (!dynamic_cast(property)) { +// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); +// } // -// ((Selector*)property)->_detachFrom(this); +// ((Selector*)property)->_detachFrom(this); // -// invalidate(occurrence.getBoundingBox()); +// invalidate(occurrence.getBoundingBox()); // } //} // @@ -1375,11 +1375,11 @@ CellWidget::hideAllLayers() // // bool _cumulativeMode = false; // HOOPS !!! // if (_cumulativeMode) { -// invalidate(getSelectionBox()); +// invalidate(getSelectionBox()); // } // // while (!selection.isEmpty()) { -// unselect(selection.getFirst()); +// unselect(selection.getFirst()); // } //} // @@ -1395,13 +1395,13 @@ CellWidget::hideAllLayers() //CellWidget::highlight(const Occurrence& occurrence) //{ // if (!isHighlightable(occurrence)) { -// throw Error(INVALID_REQUEST, __FILE__, __LINE__); +// throw Error(INVALID_REQUEST, __FILE__, __LINE__); // } // // unsigned count = getHighlightors().getCount(); // // if (_highlightionLimit && (_highlightionLimit <= count)) { -// return false; +// return false; // } // // Property* property = occurrence.getProperty(Highlightor::getPropertyName()); @@ -1409,22 +1409,22 @@ CellWidget::hideAllLayers() // Highlightor* highlightor = NULL; // // if (!property) { -// highlightor = new Highlightor(occurrence); +// highlightor = new Highlightor(occurrence); // } // else { -// if (!dynamic_cast(property)) { -// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); -// } -// highlightor = (Highlightor*)property; +// if (!dynamic_cast(property)) { +// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); +// } +// highlightor = (Highlightor*)property; // } // // highlightor->_attachTo(this); // // if (!count) { -// invalidate(); +// invalidate(); // } // else { -// invalidate(occurrence.getBoundingBox()); +// invalidate(occurrence.getBoundingBox()); // } // // return true; @@ -1434,24 +1434,24 @@ CellWidget::hideAllLayers() //CellWidget::unhighlight(const Occurrence& occurrence) //{ // if (!isHighlightable(occurrence)) { -// throw Error(INVALID_REQUEST, __FILE__, __LINE__); +// throw Error(INVALID_REQUEST, __FILE__, __LINE__); // } // // Property* property = occurrence.getProperty(Highlightor::getPropertyName()); // // if (property) { -// if (!dynamic_cast(property)) { -// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); -// } +// if (!dynamic_cast(property)) { +// throw Error(BAD_PROPERTY_TYPE, __FILE__, __LINE__); +// } // -// ((Highlightor*)property)->_detachFrom(this); +// ((Highlightor*)property)->_detachFrom(this); // -// if (getHighlightors().isEmpty()) { -// invalidate(); -// } -// else { -// invalidate(occurrence.getBoundingBox()); -// } +// if (getHighlightors().isEmpty()) { +// invalidate(); +// } +// else { +// invalidate(occurrence.getBoundingBox()); +// } // } //} // @@ -1462,11 +1462,11 @@ CellWidget::hideAllLayers() // // bool _cumulativeMode = false; // HOOPS !!! // if (_cumulativeMode) { -// invalidate(getHighlightionBox()); +// invalidate(getHighlightionBox()); // } // // while (!highlightion.isEmpty()) { -// unhighlight(highlightion.getFirst()); +// unhighlight(highlightion.getFirst()); // } //} // @@ -1485,9 +1485,9 @@ CellWidget::clearPeeks() ++plit) { invalidate(*plit); } -// for_each_box(peek, GetCollection(_peekList)) { -// invalidate(peek); -// end_for; +// for_each_box(peek, getCollection(_peekList)) { +// invalidate(peek); +// end_for; // } // _peekList.clear(); @@ -1497,8 +1497,8 @@ void CellWidget::addPeek(const Box& peek) { if (!peek.isEmpty()) { - invalidate(peek); - _peekList.push_back(peek); + invalidate(peek); + _peekList.push_back(peek); } } @@ -1520,13 +1520,13 @@ CellWidget::invalidate(const QRect& screenRect) QRect visibleScreenRect = screenRect.intersect(rect()); if (!visibleScreenRect.isEmpty()) { - bool _cumulativeMode = false; // HOOPS !!! - if (!_cumulativeMode) { - _invalidRegion = _invalidRegion.unite(QRegion(visibleScreenRect)); - } - else { - _invalidRegion = QRegion(_invalidRegion.boundingRect().unite(visibleScreenRect)); - } + bool _cumulativeMode = false; // HOOPS !!! + if (!_cumulativeMode) { + _invalidRegion = _invalidRegion.unite(QRegion(visibleScreenRect)); + } + else { + _invalidRegion = QRegion(_invalidRegion.boundingRect().unite(visibleScreenRect)); + } } } @@ -1534,8 +1534,8 @@ void CellWidget::invalidate(const Box& box) { if (!box.isEmpty()) { - int safetyMargin = 2; // 2 pixel - invalidate(getScreenRect(box.getInflated(getSize(safetyMargin)))); + int safetyMargin = 2; // 2 pixel + invalidate(getScreenRect(box.getInflated(getSize(safetyMargin)))); } } @@ -1543,14 +1543,14 @@ void CellWidget::fitToContent(unsigned screenMargin) { Box area(getX(0), getY(0), getX(width()), getY(height())); if (_cell) { - area = _cell->GetBoundingBox(); + area = _cell->getBoundingBox(); } reframe(area); area.inflate(screenMargin); reframe(area); } - + @@ -1578,16 +1578,16 @@ CellWidget::reframe(const Point& center) void CellWidget::reframe(const Point& center, - double scale) + double scale) { if (0 < scale) { - _center = center; - _scale = scale; - _screenDx = -(int)rint((GetValue(_center.getX()) - (width() / (_scale*2))) * _scale); - _screenDy = -(int)rint((GetValue(_center.getY()) - (height() / (_scale*2))) * _scale); - _brushDx = 0; - _brushDy = 0; - invalidate(); + _center = center; + _scale = scale; + _screenDx = -(int)rint((getValue(_center.getX()) - (width() / (_scale*2))) * _scale); + _screenDy = -(int)rint((getValue(_center.getY()) - (height() / (_scale*2))) * _scale); + _brushDx = 0; + _brushDy = 0; + invalidate(); } } @@ -1595,12 +1595,12 @@ void CellWidget::reframe(const Box& box) { if (!box.isEmpty()) { - Point center = box.getCenter(); + Point center = box.getCenter(); - double scale = min((double)width() / GetValue(box.getWidth()), - (double)height() / GetValue(box.getHeight())); + double scale = min((double)width() / getValue(box.getWidth()), + (double)height() / getValue(box.getHeight())); - reframe(center, scale); + reframe(center, scale); } } @@ -1612,86 +1612,86 @@ CellWidget::reframe(const Box& box) void CellWidget::scroll(const Unit& dx, - const Unit& dy) + const Unit& dy) { if ((getSize(width()) < labs(dx)) || (getSize(height()) < labs(dy))) { - reframe(getCenter().getTranslated(-dx, -dy)); - redraw(); + reframe(getCenter().getTranslated(-dx, -dy)); + redraw(); } else { - int sdx = getScreenSize(dx); - int sdy = getScreenSize(dy); + int sdx = getScreenSize(dx); + int sdy = getScreenSize(dy); - if (sdx || sdy) { - QCursor oldCursor = cursor(); - setCursor(Qt::WaitCursor); + if (sdx || sdy) { + QCursor oldCursor = cursor(); + setCursor(Qt::WaitCursor); - if (_snapGrid) { - drawSnapPoint(); - } + if (_snapGrid) { + drawSnapPoint(); + } - //forEachCommand(command, getCommands()) { - // _callDrawOf(command); - // endFor; - //} + //forEachCommand(command, getCommands()) { + // _callDrawOf(command); + // endFor; + //} - _screenDx += sdx; - _screenDy += sdy; + _screenDx += sdx; + _screenDy += sdy; - _brushDx += sdx; - _brushDy -= sdy; + _brushDx += sdx; + _brushDy -= sdy; - _center = getPoint(QPoint(width() / 2, height() / 2)); + _center = getPoint(QPoint(width() / 2, height() / 2)); - int w = width(); - int h = height(); + int w = width(); + int h = height(); - if (0 < sdx) { - if (0 < sdy) { + if (0 < sdx) { + if (0 < sdy) { //bitBlt(this, sdx, 0, this, 0, sdy, w - sdx, h - sdy); - invalidate(QRect(-1, -1, sdx + 1, h + 1)); - //_redraw(); - invalidate(QRect(sdx - 1, h - sdy - 1, w + 1, h + 1)); - //_redraw(); + invalidate(QRect(-1, -1, sdx + 1, h + 1)); + //_redraw(); + invalidate(QRect(sdx - 1, h - sdy - 1, w + 1, h + 1)); + //_redraw(); update(); - } else { - //bitBlt(this, sdx, -sdy, this, 0, 0, w - sdx, h + sdy, CopyROP); - invalidate(QRect(-1, -1, sdx + 1, h + 1)); - //_redraw(); - invalidate(QRect(sdx - 1, -1, w + 1, -sdy + 1)); - //_redraw(); + } else { + //bitBlt(this, sdx, -sdy, this, 0, 0, w - sdx, h + sdy, CopyROP); + invalidate(QRect(-1, -1, sdx + 1, h + 1)); + //_redraw(); + invalidate(QRect(sdx - 1, -1, w + 1, -sdy + 1)); + //_redraw(); update(); - } - } - else { - if (0 < sdy) { - //bitBlt(this, 0, 0, this, -sdx, sdy, w + sdx, h - sdy, CopyROP); - invalidate(QRect(w + sdx - 1, -1, w + 1, h + 1)); - // _redraw(); - invalidate(QRect(-1, h - sdy - 1, w + sdx + 1, h + 1)); - //_redraw(); + } + } + else { + if (0 < sdy) { + //bitBlt(this, 0, 0, this, -sdx, sdy, w + sdx, h - sdy, CopyROP); + invalidate(QRect(w + sdx - 1, -1, w + 1, h + 1)); + // _redraw(); + invalidate(QRect(-1, h - sdy - 1, w + sdx + 1, h + 1)); + //_redraw(); update(); - } - else { - //bitBlt(this, 0, -sdy, this, -sdx, 0, w + sdx, h + sdy); - invalidate(QRect(w + sdx - 1, -1, w + 1, h + 1)); - //_redraw(); - invalidate(QRect(-1, -1, w + sdx + 1, -sdy + 1)); - //_redraw(); + } + else { + //bitBlt(this, 0, -sdy, this, -sdx, 0, w + sdx, h + sdy); + invalidate(QRect(w + sdx - 1, -1, w + 1, h + 1)); + //_redraw(); + invalidate(QRect(-1, -1, w + sdx + 1, -sdy + 1)); + //_redraw(); update(); - } - } + } + } - //forEachCommand(command, reverse(getCommands())) { - // _callDrawOf(command); - // endFor; - //} + //forEachCommand(command, reverse(getCommands())) { + // _callDrawOf(command); + // endFor; + //} - if (_snapGrid) { - drawSnapPoint(); - } + if (_snapGrid) { + drawSnapPoint(); + } - setCursor(oldCursor); - } + setCursor(oldCursor); + } } } @@ -1705,37 +1705,37 @@ void CellWidget::redraw() { if (!_invalidRegion.isEmpty()) { - QCursor oldCursor = cursor(); - setCursor(Qt::WaitCursor); + QCursor oldCursor = cursor(); + setCursor(Qt::WaitCursor); - if (_snapGrid) { - drawSnapPoint(); - } + if (_snapGrid) { + drawSnapPoint(); + } - //forEachCommand(command, getCommands()) { - // _callDrawOf(command); - // endFor; - //} + //forEachCommand(command, getCommands()) { + // _callDrawOf(command); + // endFor; + //} - if (!_alreadyExposed) { - fitToContent(); - _alreadyExposed = true; - } + if (!_alreadyExposed) { + fitToContent(); + _alreadyExposed = true; + } - _redraw(); + _redraw(); - //forEachCommand(command, reverse(getCommands())) { - // _callDrawOf(command); - // endFor; - //} + //forEachCommand(command, reverse(getCommands())) { + // _callDrawOf(command); + // endFor; + //} - if (_snapGrid) { - drawSnapPoint(); - } + if (_snapGrid) { + drawSnapPoint(); + } - setCursor(oldCursor); + setCursor(oldCursor); - _invalidRegion = QRegion(); + _invalidRegion = QRegion(); } } @@ -1749,11 +1749,11 @@ CellWidget::redraw() //CellWidget::abortStartedCommand() //{ // if (_startedCommand) { -// _startedCommand->abortOn(this); +// _startedCommand->abortOn(this); // } // // if (_trackBox) { -// _trackBox->stop(_snapPoint); +// _trackBox->stop(_snapPoint); // } //} @@ -1776,12 +1776,12 @@ CellWidget::postRedraw(const Box& area) void CellWidget::drawContent(const Cell* cell, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const { - for_each_instance(instance, cell->GetInstancesUnder(updateArea)) { + for_each_instance(instance, cell->getInstancesUnder(updateArea)) { drawContent(instance, basicLayer, updateArea, transformation); end_for; } - for_each_slice(slice, cell->GetSlices()) { + for_each_slice(slice, cell->getSlices()) { drawSlice(slice, basicLayer, updateArea, transformation); end_for; } @@ -1790,18 +1790,18 @@ void CellWidget::drawContent(const Cell* cell, const BasicLayer* basicLayer, con void CellWidget::drawContent(const Instance* instance, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const { Box masterArea = updateArea; - Transformation masterTransformation = instance->GetTransformation(); - instance->GetTransformation().getInvert().applyOn(masterArea); + Transformation masterTransformation = instance->getTransformation(); + instance->getTransformation().getInvert().applyOn(masterArea); transformation.applyOn(masterTransformation); - drawContent(instance->GetMasterCell(), basicLayer, masterArea, masterTransformation); + drawContent(instance->getMasterCell(), basicLayer, masterArea, masterTransformation); } void CellWidget::drawSlice(const Slice* slice, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const { - if (slice->GetLayer()->contains(basicLayer)) { - if (slice->GetBoundingBox().intersect(updateArea)) { - //if ((basicLayer == _layer->_GetSymbolicBasicLayer()) || (3 < view->GetScale())) - for_each_go(go, slice->GetGosUnder(updateArea)) { + if (slice->getLayer()->contains(basicLayer)) { + if (slice->getBoundingBox().intersect(updateArea)) { + //if ((basicLayer == _layer->_getSymbolicBasicLayer()) || (3 < view->getScale())) + for_each_go(go, slice->getGosUnder(updateArea)) { drawGo(go, basicLayer, updateArea, transformation); end_for; } @@ -1823,20 +1823,20 @@ void CellWidget::drawGo(const Go* go, const BasicLayer* basicLayer, const Box& u } void CellWidget::drawSegment(const Segment* segment, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const { - if (1 < getScreenSize(segment->GetWidth())) { - drawRectangle(transformation.getBox(segment->GetBoundingBox(basicLayer))); + if (1 < getScreenSize(segment->getWidth())) { + drawRectangle(transformation.getBox(segment->getBoundingBox(basicLayer))); } else { - drawLine(transformation.getPoint(segment->GetSourcePosition()), - transformation.getPoint(segment->GetTargetPosition())); + drawLine(transformation.getPoint(segment->getSourcePosition()), + transformation.getPoint(segment->getTargetPosition())); } } void CellWidget::drawContact(const Contact* contact, const BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation) const { - drawRectangle(transformation.getBox(contact->GetBoundingBox(basicLayer))); + drawRectangle(transformation.getBox(contact->getBoundingBox(basicLayer))); } void CellWidget::drawPhantoms(const Cell* cell, const H::Box& updateArea, const Transformation& transformation) const { - for_each_instance(instance, cell->GetInstancesUnder(updateArea)) { + for_each_instance(instance, cell->getInstancesUnder(updateArea)) { drawPhantoms(instance, updateArea, transformation); end_for; } @@ -1844,15 +1844,15 @@ void CellWidget::drawPhantoms(const Cell* cell, const H::Box& updateArea, const void CellWidget::drawPhantoms(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const { H::Box masterArea = updateArea; - Transformation masterTransformation = instance->GetTransformation(); - instance->GetTransformation().getInvert().applyOn(masterArea); + Transformation masterTransformation = instance->getTransformation(); + instance->getTransformation().getInvert().applyOn(masterArea); transformation.applyOn(masterTransformation); - drawPhantoms(instance->GetMasterCell(), masterArea, masterTransformation); + drawPhantoms(instance->getMasterCell(), masterArea, masterTransformation); } void CellWidget::drawBoundaries(const Cell* cell, const H::Box& updateArea, const Transformation& transformation) const { - drawRectangle(transformation.getBox(cell->GetAbutmentBox())); - for_each_instance(instance, cell->GetInstances()) { + drawRectangle(transformation.getBox(cell->getAbutmentBox())); + for_each_instance(instance, cell->getInstances()) { drawBoundaries(instance, updateArea, transformation); end_for; } @@ -1860,10 +1860,10 @@ void CellWidget::drawBoundaries(const Cell* cell, const H::Box& updateArea, cons void CellWidget::drawBoundaries(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const { H::Box masterArea = updateArea; - Transformation masterTransformation = instance->GetTransformation(); - instance->GetTransformation().getInvert().applyOn(masterArea); + Transformation masterTransformation = instance->getTransformation(); + instance->getTransformation().getInvert().applyOn(masterArea); transformation.applyOn(masterTransformation); - drawBoundaries(instance->GetMasterCell(), masterArea, masterTransformation); + drawBoundaries(instance->getMasterCell(), masterArea, masterTransformation); } @@ -1878,31 +1878,31 @@ void CellWidget::drawBoundaries(const Instance* instance, const H::Box& updateAr void CellWidget::drawLine(const Unit& xo, - const Unit& yo, - const Unit& xe, - const Unit& ye) const + const Unit& yo, + const Unit& xe, + const Unit& ye) const { if (_painter) { - double dxo = GetValue(xo); - double dyo = GetValue(yo); - int co = getClipCode(dxo, dyo); - double dxe = GetValue(xe); - double dye = GetValue(ye); - int ce = getClipCode(dxe, dye); - if (clipLine(dxo, dyo, co, dxe, dye, ce)) { - int ixo = getScreenX(GetUnit(dxo)); - int iyo = getScreenY(GetUnit(dyo)); - int ixe = getScreenX(GetUnit(dxe)); - int iye = getScreenY(GetUnit(dye)); - _painter->save(); - if (_painter->pen() == Qt::NoPen) { - _painter->setPen(_painter->brush().color()); - } + double dxo = getValue(xo); + double dyo = getValue(yo); + int co = getClipCode(dxo, dyo); + double dxe = getValue(xe); + double dye = getValue(ye); + int ce = getClipCode(dxe, dye); + if (clipLine(dxo, dyo, co, dxe, dye, ce)) { + int ixo = getScreenX(getUnit(dxo)); + int iyo = getScreenY(getUnit(dyo)); + int ixe = getScreenX(getUnit(dxe)); + int iye = getScreenY(getUnit(dye)); + _painter->save(); + if (_painter->pen() == Qt::NoPen) { + _painter->setPen(_painter->brush().color()); + } _painter->drawLine(ixo, iyo, ixe, iye); - //_painter->moveTo(ixo, iyo); - //_painter->lineTo(ixe, iye); - _painter->restore(); - } + //_painter->moveTo(ixo, iyo); + //_painter->lineTo(ixe, iye); + _painter->restore(); + } } } @@ -1910,16 +1910,16 @@ CellWidget::drawLine(const Unit& xo, //CellWidget::drawPolyline(const Points& points) //{ // if (_painter) { -// unsigned sCount; +// unsigned sCount; // -// if (clipLines(points, _sPoints, sCount, false)) { -// _painter->save(); -// if (_painter->pen() == NoPen) { -// _painter->setPen(_painter->brush().color()); -// } -// _painter->drawPolyline(_sPoints, 0, sCount); -// _painter->restore(); -// } +// if (clipLines(points, _sPoints, sCount, false)) { +// _painter->save(); +// if (_painter->pen() == NoPen) { +// _painter->setPen(_painter->brush().color()); +// } +// _painter->drawPolyline(_sPoints, 0, sCount); +// _painter->restore(); +// } // } //} @@ -1927,15 +1927,15 @@ void CellWidget::drawRectangle(const Box& box) const { if (_painter) { - Box ibox = box.getIntersection(_clipBox); + Box ibox = box.getIntersection(_clipBox); - if (!ibox.isEmpty()) { - int x = getScreenX(ibox.getXMin()); - int y = getScreenY(ibox.getYMax()); - int w = getScreenX(ibox.getXMax()) - x + 1; - int h = getScreenY(ibox.getYMin()) - y + 1; - _painter->drawRect(x, y, w, h); - } + if (!ibox.isEmpty()) { + int x = getScreenX(ibox.getXMin()); + int y = getScreenY(ibox.getYMax()); + int w = getScreenX(ibox.getXMax()) - x + 1; + int h = getScreenY(ibox.getYMin()) - y + 1; + _painter->drawRect(x, y, w, h); + } } } @@ -1943,67 +1943,67 @@ CellWidget::drawRectangle(const Box& box) const //CellWidget::drawPolygon(const Points& points) //{ // if (_painter) { -// unsigned sCount; +// unsigned sCount; // -// if (clipLines(points, _sPoints, sCount, true)) { -// _painter->drawPolygon(_sPoints, true, 0, sCount); -// } +// if (clipLines(points, _sPoints, sCount, true)) { +// _painter->drawPolygon(_sPoints, true, 0, sCount); +// } // } //} //void //CellWidget::drawText(const Box& frame, -// const string& text, -// const Direction& direction) +// const string& text, +// const Direction& direction) //{ // if (_painter && !frame.isEmpty()) { -// int x = getScreenX(frame.getXMin()); -// int y = getScreenY(frame.getYMax()); -// int w = getScreenX(frame.getXMax()) - x + 1; -// int h = getScreenY(frame.getYMin()) - y + 1; -// switch (direction) { -// case NORTH: { -// int ow = w; -// w = h; -// h = ow; -// int ox = x; -// x = - (y + w); -// y = ox; -// break; -// } -// /* -// case WEST: { -// x = - (x + w); -// y = - (y + h); -// break; -// } -// */ -// case SOUTH: { -// int ow = w; -// w = h; -// h = ow; -// int ox = x; -// x = y; -// y = - (ox + h); -// break; -// } -// } -// QFontMetrics metrics(_painter->font()); -// if ((metrics.width(text) <= w) && (metrics.height() <= h)) { -// _painter->save(); -// switch (direction) { -// case NORTH: _painter->rotate(-90); break; -// /* -// case WEST: _painter->rotate(180); break; -// */ -// case SOUTH: _painter->rotate(90); break; -// } -// if (_painter->pen() == NoPen) { -// _painter->setPen(_painter->brush().color()); -// } -// _painter->drawText(x, y, w, h, Qt::AlignCenter, text); -// _painter->restore(); -// } +// int x = getScreenX(frame.getXMin()); +// int y = getScreenY(frame.getYMax()); +// int w = getScreenX(frame.getXMax()) - x + 1; +// int h = getScreenY(frame.getYMin()) - y + 1; +// switch (direction) { +// case NORTH: { +// int ow = w; +// w = h; +// h = ow; +// int ox = x; +// x = - (y + w); +// y = ox; +// break; +// } +// /* +// case WEST: { +// x = - (x + w); +// y = - (y + h); +// break; +// } +// */ +// case SOUTH: { +// int ow = w; +// w = h; +// h = ow; +// int ox = x; +// x = y; +// y = - (ox + h); +// break; +// } +// } +// QFontMetrics metrics(_painter->font()); +// if ((metrics.width(text) <= w) && (metrics.height() <= h)) { +// _painter->save(); +// switch (direction) { +// case NORTH: _painter->rotate(-90); break; +// /* +// case WEST: _painter->rotate(180); break; +// */ +// case SOUTH: _painter->rotate(90); break; +// } +// if (_painter->pen() == NoPen) { +// _painter->setPen(_painter->brush().color()); +// } +// _painter->drawText(x, y, w, h, Qt::AlignCenter, text); +// _painter->restore(); +// } // } //} // @@ -2017,17 +2017,17 @@ void CellWidget::drawSnapPoint() { if (_drawSnapPoint) { - int sx = getScreenX(_snapPoint.getX()); - int sy = getScreenY(_snapPoint.getY()); + int sx = getScreenX(_snapPoint.getX()); + int sy = getScreenY(_snapPoint.getY()); - if (((-3 <= sx) && (sx <= (width() + 3))) && - ((-3 <= sy) && (sy <= (height() + 3)))) { - QPainter painter(this); - painter.setPen(getForegroundColor()); - painter.setBrush(Qt::NoBrush); - //painter.setRasterOp(Qt::XorROP); - painter.drawRect(sx - 3, sy - 3, 7, 7); - } + if (((-3 <= sx) && (sx <= (width() + 3))) && + ((-3 <= sy) && (sy <= (height() + 3)))) { + QPainter painter(this); + painter.setPen(getForegroundColor()); + painter.setBrush(Qt::NoBrush); + //painter.setRasterOp(Qt::XorROP); + painter.drawRect(sx - 3, sy - 3, 7, 7); + } } } @@ -2055,15 +2055,15 @@ CellWidget::resizeEvent(QResizeEvent* event) //CellWidget::enterEvent(QEvent* event) //{ // if (getView()) { -// forEachCommand(command, getCommands()) { -// command->onArm(this); -// endFor; -// } +// forEachCommand(command, getCommands()) { +// command->onArm(this); +// endFor; +// } // } // // if (_snapGrid) { -// _drawSnapPoint = true; -// drawSnapPoint(); +// _drawSnapPoint = true; +// drawSnapPoint(); // } //} // @@ -2071,15 +2071,15 @@ CellWidget::resizeEvent(QResizeEvent* event) //CellWidget::leaveEvent(QEvent* event) //{ // if (_snapGrid) { -// drawSnapPoint(); -// _drawSnapPoint = false; +// drawSnapPoint(); +// _drawSnapPoint = false; // } // // if (getView()) { -// forEachCommand(command, getCommands()) { -// command->onDisarm(this); -// endFor; -// } +// forEachCommand(command, getCommands()) { +// command->onDisarm(this); +// endFor; +// } // } //} @@ -2087,17 +2087,17 @@ CellWidget::resizeEvent(QResizeEvent* event) //CellWidget::mousePressEvent(QMouseEvent* event) //{ // if (!_startedCommand) { -// Point position = getSnapPoint(event->x(), event->y()); -// if (getView()) { -// _startedCommand = getCommand(event->button()); +// Point position = getSnapPoint(event->x(), event->y()); +// if (getView()) { +// _startedCommand = getCommand(event->button()); // -// if (_startedCommand) { -// _startedCommand->onStart(this, position, event->state()); -// } -// } -// if (_trackBox) { -// _trackBox->start(position); -// } +// if (_startedCommand) { +// _startedCommand->onStart(this, position, event->state()); +// } +// } +// if (_trackBox) { +// _trackBox->start(position); +// } // } //} // @@ -2105,54 +2105,54 @@ CellWidget::resizeEvent(QResizeEvent* event) //CellWidget::mouseMoveEvent(QMouseEvent* event) //{ // if (_startedCommand && automaticScrolling() && _startedCommand->automaticScrolling()) { -// int sx = event->x(); -// int sy = event->y(); -// Unit dx = 0; -// if (sx < 0) { -// dx = GetUnit(width() / 40); -// } -// else { -// if (width() < sx) { -// dx = - GetUnit(width() / 40); -// } -// } -// Unit dy = 0; -// if (sy < 0) { -// dy = - GetUnit(height() / 40); -// } -// else { -// if (height() < sy) { -// dy = GetUnit(height() / 40); -// } -// } -// if (dx || dy) { -// scroll(dx, dy); -// } +// int sx = event->x(); +// int sy = event->y(); +// Unit dx = 0; +// if (sx < 0) { +// dx = getUnit(width() / 40); +// } +// else { +// if (width() < sx) { +// dx = - getUnit(width() / 40); +// } +// } +// Unit dy = 0; +// if (sy < 0) { +// dy = - getUnit(height() / 40); +// } +// else { +// if (height() < sy) { +// dy = getUnit(height() / 40); +// } +// } +// if (dx || dy) { +// scroll(dx, dy); +// } // } // // Point position = getSnapPoint(event->x(), event->y()); // // if (position != _snapPoint) { -// if (_snapGrid) { -// drawSnapPoint(); -// } -// _snapPoint = position; -// if (_snapGrid) { -// drawSnapPoint(); -// } -// if (getView()) { -// forEachCommand(command, getCommands()) { -// command->onTrack(this, position); -// endFor; -// } +// if (_snapGrid) { +// drawSnapPoint(); +// } +// _snapPoint = position; +// if (_snapGrid) { +// drawSnapPoint(); +// } +// if (getView()) { +// forEachCommand(command, getCommands()) { +// command->onTrack(this, position); +// endFor; +// } // -// if (_startedCommand) { -// _startedCommand->onUpdate(this, position, event->state()); -// } -// } -// if (_trackBox) { -// _trackBox->update(position); -// } +// if (_startedCommand) { +// _startedCommand->onUpdate(this, position, event->state()); +// } +// } +// if (_trackBox) { +// _trackBox->update(position); +// } // } //} // @@ -2160,14 +2160,14 @@ CellWidget::resizeEvent(QResizeEvent* event) //CellWidget::mouseReleaseEvent(QMouseEvent* event) //{ // if (_startedCommand && (_startedCommand->getButton() == event->button())) { -// Point position = getSnapPoint(event->x(), event->y()); -// if (getView()) { -// _startedCommand->onStop(this, position); -// _startedCommand = NULL; -// } -// if (_trackBox) { -// _trackBox->stop(position); -// } +// Point position = getSnapPoint(event->x(), event->y()); +// if (getView()) { +// _startedCommand->onStop(this, position); +// _startedCommand = NULL; +// } +// if (_trackBox) { +// _trackBox->stop(position); +// } // } //} // @@ -2199,7 +2199,7 @@ CellWidget::paintEvent(QPaintEvent* event) void CellWidget::onSetVisible(Layer* layer, - bool visible) + bool visible) { } @@ -2211,34 +2211,34 @@ CellWidget::onSetVisible(Layer* layer, int CellWidget::getClipCode(double x, - double y) const + double y) const { if (x < _clipX[0]) { - if (y < _clipY[0]) { - return 28; - } - if (_clipY[3] < y) { - return 22; - } - return 4; + if (y < _clipY[0]) { + return 28; + } + if (_clipY[3] < y) { + return 22; + } + return 4; } if (_clipX[3] < x) { - if (y < _clipY[0]) { - return 25; - } - if (_clipY[3] < y) { - return 19; - } - return 1; + if (y < _clipY[0]) { + return 25; + } + if (_clipY[3] < y) { + return 19; + } + return 1; } if (y < _clipY[0]) { - return 8; + return 8; } if (_clipY[3] < y) { - return 2; + return 2; } return 0; @@ -2253,75 +2253,75 @@ CellWidget::getClipCode(double x, bool CellWidget::clipLine(double& xo, - double& yo, - int co, - double& xe, - double& ye, - int ce, - int u) const + double& yo, + int co, + double& xe, + double& ye, + int ce, + int u) const { if (co & ce & -17) { - return false; + return false; } if (!co & !ce) { - return true; + return true; } if (co & 1) { - yo += ((ye - yo) / (xe - xo)) * (_clipX[3] - xo); - xo = _clipX[3]; - co = getClipCode(xo, yo); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + yo += ((ye - yo) / (xe - xo)) * (_clipX[3] - xo); + xo = _clipX[3]; + co = getClipCode(xo, yo); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (co & 2) { - xo += ((xe - xo) / (ye - yo)) * (_clipY[3] - yo); - yo = _clipY[3]; - co = getClipCode(xo, yo); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + xo += ((xe - xo) / (ye - yo)) * (_clipY[3] - yo); + yo = _clipY[3]; + co = getClipCode(xo, yo); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (co & 4) { - yo += ((ye - yo) / (xe - xo)) * (_clipX[0] - xo); - xo = _clipX[0]; - co = getClipCode(xo, yo); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + yo += ((ye - yo) / (xe - xo)) * (_clipX[0] - xo); + xo = _clipX[0]; + co = getClipCode(xo, yo); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (co & 8) { - xo += ((xe - xo) / (ye - yo)) * (_clipY[0] - yo); - yo = _clipY[0]; - co = getClipCode(xo, yo); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + xo += ((xe - xo) / (ye - yo)) * (_clipY[0] - yo); + yo = _clipY[0]; + co = getClipCode(xo, yo); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (ce & 1) { - ye -= ((ye - yo) / (xe - xo)) * (xe - _clipX[3]); - xe = _clipX[3]; - ce = getClipCode(xe, ye); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + ye -= ((ye - yo) / (xe - xo)) * (xe - _clipX[3]); + xe = _clipX[3]; + ce = getClipCode(xe, ye); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (ce & 2) { - xe -= ((xe - xo) / (ye - yo)) * (ye - _clipY[3]); - ye = _clipY[3]; - ce = getClipCode(xe, ye); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + xe -= ((xe - xo) / (ye - yo)) * (ye - _clipY[3]); + ye = _clipY[3]; + ce = getClipCode(xe, ye); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (ce & 4) { - ye -= ((ye - yo) / (xe - xo)) * (xe - _clipX[0]); - xe = _clipX[0]; - ce = getClipCode(xe, ye); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + ye -= ((ye - yo) / (xe - xo)) * (xe - _clipX[0]); + xe = _clipX[0]; + ce = getClipCode(xe, ye); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } if (ce & 8) { - xe -= ((xe - xo) / (ye - yo)) * (ye - _clipY[0]); - ye = _clipY[0]; - ce = getClipCode(xe, ye); - return clipLine(xo, yo, co, xe, ye, ce, u + 1); + xe -= ((xe - xo) / (ye - yo)) * (ye - _clipY[0]); + ye = _clipY[0]; + ce = getClipCode(xe, ye); + return clipLine(xo, yo, co, xe, ye, ce, u + 1); } return true; @@ -2329,14 +2329,14 @@ CellWidget::clipLine(double& xo, //bool //CellWidget::clipLines(const Points& points, -// QPointArray& sPoints, -// unsigned& sCount, -// bool closed) const +// QPointArray& sPoints, +// unsigned& sCount, +// bool closed) const //{ // sCount = 0; // // if (points.isEmpty()) { -// return false; +// return false; // } // // int co, ce; @@ -2344,107 +2344,107 @@ CellWidget::clipLine(double& xo, // bool firstPoint = true; // // forEachPoint(point, points) { -// xe = GetValue(point.getX()); -// ye = GetValue(point.getY()); -// ce = getClipCode(xe, ye); -// if (firstPoint) { -// if (!ce) { -// int sx = getScreenX(GetUnit(xe)); -// int sy = getScreenY(GetUnit(ye)); -// sPoints.putPoints(sCount++, 1, sx, sy); -// } -// firstPoint = false; -// } -// else { -// static int tcc[] = {0,-3,-6,1,3,0,1,0,6,1,0,0,1,0,0,0}; -// static int cra[] = {-1,-1,-1,3,-1,-1,2,-1,-1,1,-1,-1,0,-1,-1,-1}; +// xe = getValue(point.getX()); +// ye = getValue(point.getY()); +// ce = getClipCode(xe, ye); +// if (firstPoint) { +// if (!ce) { +// int sx = getScreenX(getUnit(xe)); +// int sy = getScreenY(getUnit(ye)); +// sPoints.putPoints(sCount++, 1, sx, sy); +// } +// firstPoint = false; +// } +// else { +// static int tcc[] = {0,-3,-6,1,3,0,1,0,6,1,0,0,1,0,0,0}; +// static int cra[] = {-1,-1,-1,3,-1,-1,2,-1,-1,1,-1,-1,0,-1,-1,-1}; // -// double xco = xo; -// double yco = yo; -// double xce = xe; -// double yce = ye; -// if (clipLine(xco, yco, co, xce, yce, ce)) { -// if (co) { -// int sx = getScreenX(GetUnit(xco)); -// int sy = getScreenY(GetUnit(yco)); -// sPoints.putPoints(sCount++, 1, sx, sy); -// } -// int sx = getScreenX(GetUnit(xce)); -// int sy = getScreenY(GetUnit(yce)); -// sPoints.putPoints(sCount++, 1, sx, sy); -// } -// else { -// if (ce & 16) { -// if (!(co & ce & ~16)) { -// int c; -// if (!(co & 16)) { -// c = ce + tcc[co]; -// } -// else { -// bool done = false; -// double xto = xo; -// double yto = yo; -// double xte = xe; -// double yte = ye; -// while (!done) { -// double x = (xto + xte) / 2; -// double y = (yto + yte) / 2; -// c = getClipCode(x, y); -// if (!(c & 16)) { -// if (c & ce) { -// c = ce + tcc[co & ~16]; -// } -// else { -// c = co + tcc[ce & ~16]; -// } -// done = true; -// } -// else { -// if (c == ce) { -// xte = x; -// yte = y; -// } -// else { -// if (c != co) { -// done = true; -// } -// else { -// xto = x; -// yto = y; -// } -// } -// } -// } -// } -// int sx = getScreenX(GetUnit(_clipX[cra[c&~16]])); -// int sy = getScreenY(GetUnit(_clipY[cra[c&~16]])); -// sPoints.putPoints(sCount++, 1, sx, sy); -// } -// } -// else { -// if (co & 16) { -// if (!(co & ce)) ce = co + tcc[ce]; -// } -// else { -// ce |= co; -// if (tcc[ce] == 1) ce |= 16; -// } -// } -// } -// if (ce & 16) { -// int sx = getScreenX(GetUnit(_clipX[cra[ce&~16]])); -// int sy = getScreenY(GetUnit(_clipY[cra[ce&~16]])); -// sPoints.putPoints(sCount++, 1, sx, sy); -// } -// } -// xo = xe; -// yo = ye; -// co = ce; -// endFor; +// double xco = xo; +// double yco = yo; +// double xce = xe; +// double yce = ye; +// if (clipLine(xco, yco, co, xce, yce, ce)) { +// if (co) { +// int sx = getScreenX(getUnit(xco)); +// int sy = getScreenY(getUnit(yco)); +// sPoints.putPoints(sCount++, 1, sx, sy); +// } +// int sx = getScreenX(getUnit(xce)); +// int sy = getScreenY(getUnit(yce)); +// sPoints.putPoints(sCount++, 1, sx, sy); +// } +// else { +// if (ce & 16) { +// if (!(co & ce & ~16)) { +// int c; +// if (!(co & 16)) { +// c = ce + tcc[co]; +// } +// else { +// bool done = false; +// double xto = xo; +// double yto = yo; +// double xte = xe; +// double yte = ye; +// while (!done) { +// double x = (xto + xte) / 2; +// double y = (yto + yte) / 2; +// c = getClipCode(x, y); +// if (!(c & 16)) { +// if (c & ce) { +// c = ce + tcc[co & ~16]; +// } +// else { +// c = co + tcc[ce & ~16]; +// } +// done = true; +// } +// else { +// if (c == ce) { +// xte = x; +// yte = y; +// } +// else { +// if (c != co) { +// done = true; +// } +// else { +// xto = x; +// yto = y; +// } +// } +// } +// } +// } +// int sx = getScreenX(getUnit(_clipX[cra[c&~16]])); +// int sy = getScreenY(getUnit(_clipY[cra[c&~16]])); +// sPoints.putPoints(sCount++, 1, sx, sy); +// } +// } +// else { +// if (co & 16) { +// if (!(co & ce)) ce = co + tcc[ce]; +// } +// else { +// ce |= co; +// if (tcc[ce] == 1) ce |= 16; +// } +// } +// } +// if (ce & 16) { +// int sx = getScreenX(getUnit(_clipX[cra[ce&~16]])); +// int sy = getScreenY(getUnit(_clipY[cra[ce&~16]])); +// sPoints.putPoints(sCount++, 1, sx, sy); +// } +// } +// xo = xe; +// yo = ye; +// co = ce; +// endFor; // } // // if (closed && sCount) { -// sPoints.putPoints(sCount++, 1, sPoints[0].x(), sPoints[0].y()); +// sPoints.putPoints(sCount++, 1, sPoints[0].x(), sPoints[0].y()); // } // // return sCount; @@ -2468,14 +2468,14 @@ CellWidget::_setClipBox(const Box& area) { _clipBox = Box(area).inflate(getSize(2)); - _clipX[0] = GetValue(_clipBox.getXMin()); - _clipX[1] = GetValue(_clipBox.getXMax()); - _clipX[2] = GetValue(_clipBox.getXMin()); - _clipX[3] = GetValue(_clipBox.getXMax()); - _clipY[0] = GetValue(_clipBox.getYMin()); - _clipY[1] = GetValue(_clipBox.getYMin()); - _clipY[2] = GetValue(_clipBox.getYMax()); - _clipY[3] = GetValue(_clipBox.getYMax()); + _clipX[0] = getValue(_clipBox.getXMin()); + _clipX[1] = getValue(_clipBox.getXMax()); + _clipX[2] = getValue(_clipBox.getXMin()); + _clipX[3] = getValue(_clipBox.getXMax()); + _clipY[0] = getValue(_clipBox.getYMin()); + _clipY[1] = getValue(_clipBox.getYMin()); + _clipY[2] = getValue(_clipBox.getYMax()); + _clipY[3] = getValue(_clipBox.getYMax()); } @@ -2488,58 +2488,58 @@ void CellWidget::_redraw() { if (!_invalidRegion.isEmpty()) { - QRect invalidRect = _invalidRegion.boundingRect(); + QRect invalidRect = _invalidRegion.boundingRect(); - if (_doubleBuffering) { - _invalidRegion = invalidRect; - } + if (_doubleBuffering) { + _invalidRegion = invalidRect; + } - Box area = getBox(invalidRect).inflate(getSize(1)); + Box area = getBox(invalidRect).inflate(getSize(1)); - _setClipBox(area); + _setClipBox(area); - QPaintDevice* device = this; + QPaintDevice* device = this; - if (_doubleBuffering) { - //device = _getPixmap(); - } + if (_doubleBuffering) { + //device = _getPixmap(); + } - QPainter painter(device); - QPainter* oldPainter = _painter; - _painter = &painter; + QPainter painter(device); + QPainter* oldPainter = _painter; + _painter = &painter; - QRegion deepRegion; + QRegion deepRegion; for (list::iterator plit = _peekList.begin(); plit != _peekList.end(); ++plit) { - deepRegion = deepRegion.unite(QRegion(getScreenRect(*plit))); + deepRegion = deepRegion.unite(QRegion(getScreenRect(*plit))); } -// forEachBox(peek, _peekList) { -// deepRegion = deepRegion.unite(QRegion(getScreenRect(peek))); -// endFor; -// } - deepRegion = deepRegion.intersect(_invalidRegion); - Box deepArea = getBox(deepRegion.boundingRect()); +// forEachBox(peek, _peekList) { +// deepRegion = deepRegion.unite(QRegion(getScreenRect(peek))); +// endFor; +// } + deepRegion = deepRegion.intersect(_invalidRegion); + Box deepArea = getBox(deepRegion.boundingRect()); - _painter->setClipRegion(_invalidRegion); + _painter->setClipRegion(_invalidRegion); - _painter->fillRect(invalidRect, QBrush(getBackgroundColor())); + _painter->fillRect(invalidRect, QBrush(getBackgroundColor())); - preRedraw(area); + preRedraw(area); - QRegion region = _invalidRegion.subtract(deepRegion); + QRegion region = _invalidRegion.subtract(deepRegion); - Cell* cell = getCell(); - if (cell) { + Cell* cell = getCell(); + if (cell) { _painter->save(); - double brightness = 1.0; - //if (highlightionIsVisible() && !getHighlightion().isEmpty()) { - // brightness = 0.4; - //} + double brightness = 1.0; + //if (highlightionIsVisible() && !getHighlightion().isEmpty()) { + // brightness = 0.4; + //} setPen(boundariesPen, brightness); setBrush(boundariesBrush, brightness); @@ -2547,131 +2547,131 @@ CellWidget::_redraw() for_each_basic_layer(layer, getVisibleLayers()) { - if (isDrawable(layer)) { - //setFont(getFont(layer)); - //setPen(layer->getPen(), brightness); + if (isDrawable(layer)) { + //setFont(getFont(layer)); + //setPen(layer->getPen(), brightness); setPen(getPen(layer), brightness); - //setBrush(layer->getBrush(), brightness); + //setBrush(layer->getBrush(), brightness); setBrush(getBrush(layer), brightness); - //setBrushOrigin(layer->getBrushOrigin()); - if (deepRegion.isEmpty()) { + //setBrushOrigin(layer->getBrushOrigin()); + if (deepRegion.isEmpty()) { drawContent(cell, layer, area, Transformation()); - // view->_draw(this, layer, area, Transformation()); + // view->_draw(this, layer, area, Transformation()); } else { - _painter->setClipRegion(region); + _painter->setClipRegion(region); drawContent(cell, layer, area, Transformation()); - //view->_draw(this, layer, area, Transformation()); - _painter->setClipRegion(deepRegion); - unsigned displayDepth = _displayDepth; - _displayDepth = (unsigned)-1; - //view->_draw(this, layer, deepArea, Transformation()); + //view->_draw(this, layer, area, Transformation()); + _painter->setClipRegion(deepRegion); + unsigned displayDepth = _displayDepth; + _displayDepth = (unsigned)-1; + //view->_draw(this, layer, deepArea, Transformation()); drawContent(cell, layer, deepArea, Transformation()); - _displayDepth = displayDepth; - _painter->setClipRegion(_invalidRegion); - } - //_painter->flush(); - } - end_for; - } -// if (highlightionIsVisible() && !getHighlightion().isEmpty()) { -// Technology* technology = getDatabase()->getTechnology(); -// if (technology) { -// forEachLayer(layer, technology->getLayers()) { -// if (isDrawable(layer)) { -// setFont(layer->getFont()); -// setPen(layer->getPen()); -// setBrush(layer->getBrush()); -// setBrushOrigin(layer->getBrushOrigin()); -// forEachOccurrence(occurrence, getHighlightion()) { -// Figure* figure = dynamic_cast(occurrence.getEntity()); -// if (figure && -// figure->isMaterialized() && -// (figure->getLayerMask() & layer->getMask())) { -// Box boundingBox = occurrence.getBoundingBox(); -// if (boundingBox.overlaps(area)) { -// Transformation transformation = -// occurrence.getPath().getTransformation(); -// Box correctedArea = -// transformation.getInverted().getBox(area); -// figure->_draw(this, layer, correctedArea, transformation); -// } -// } -// endFor; -// } -// _painter->flush(); -// } -// endFor; -// } -// } -// } -// if (selectionIsVisible()) { -// QColor selectionColor = getSelectionColor(); -// setPen(selectionColor); -// setBrush(QBrush(selectionColor, Dense4Pattern)); -// setBrushOrigin(QPoint(0, 0)); -// forEachOccurrence(occurrence, getSelection()) { -// Figure* figure = dynamic_cast(occurrence.getEntity()); -// if (figure) { -// Box boundingBox = occurrence.getBoundingBox(); -// if (boundingBox.overlaps(area)) { -// figure->_highlight(this, occurrence.getPath().getTransformation()); -// } -// } -// endFor; -// } -// } - _painter->restore(); - if (gridIsVisible() && gridIsDrawable()) { - Unit xMin = getGridX(getX(0)); - Unit yMin = getGridY(getY(height())); - Unit xMax = getGridX(getX(width())); - Unit yMax = getGridY(getY(0)); - setPen(getGridColor()); - for (Unit x = xMin; x <= xMax; x += _gridXStep) { - int sx = getScreenX(x); - if (_gridAxesAreVisible && (x == getGridOrigin().getX())) { - //_painter->moveTo(sx, 0); - //_painter->lineTo(sx, height()); + _displayDepth = displayDepth; + _painter->setClipRegion(_invalidRegion); + } + //_painter->flush(); + } + end_for; + } +// if (highlightionIsVisible() && !getHighlightion().isEmpty()) { +// Technology* technology = getDatabase()->getTechnology(); +// if (technology) { +// forEachLayer(layer, technology->getLayers()) { +// if (isDrawable(layer)) { +// setFont(layer->getFont()); +// setPen(layer->getPen()); +// setBrush(layer->getBrush()); +// setBrushOrigin(layer->getBrushOrigin()); +// forEachOccurrence(occurrence, getHighlightion()) { +// Figure* figure = dynamic_cast(occurrence.getEntity()); +// if (figure && +// figure->isMaterialized() && +// (figure->getLayerMask() & layer->getMask())) { +// Box boundingBox = occurrence.getBoundingBox(); +// if (boundingBox.overlaps(area)) { +// Transformation transformation = +// occurrence.getPath().getTransformation(); +// Box correctedArea = +// transformation.getInverted().getBox(area); +// figure->_draw(this, layer, correctedArea, transformation); +// } +// } +// endFor; +// } +// _painter->flush(); +// } +// endFor; +// } +// } +// } +// if (selectionIsVisible()) { +// QColor selectionColor = getSelectionColor(); +// setPen(selectionColor); +// setBrush(QBrush(selectionColor, Dense4Pattern)); +// setBrushOrigin(QPoint(0, 0)); +// forEachOccurrence(occurrence, getSelection()) { +// Figure* figure = dynamic_cast(occurrence.getEntity()); +// if (figure) { +// Box boundingBox = occurrence.getBoundingBox(); +// if (boundingBox.overlaps(area)) { +// figure->_highlight(this, occurrence.getPath().getTransformation()); +// } +// } +// endFor; +// } +// } + _painter->restore(); + if (gridIsVisible() && gridIsDrawable()) { + Unit xMin = getGridX(getX(0)); + Unit yMin = getGridY(getY(height())); + Unit xMax = getGridX(getX(width())); + Unit yMax = getGridY(getY(0)); + setPen(getGridColor()); + for (Unit x = xMin; x <= xMax; x += _gridXStep) { + int sx = getScreenX(x); + if (_gridAxesAreVisible && (x == getGridOrigin().getX())) { + //_painter->moveTo(sx, 0); + //_painter->lineTo(sx, height()); _painter->drawLine(sx, 0, sx, height()); - } - for (Unit y = yMin; y <= yMax; y += _gridYStep) { - int sy = getScreenY(y); - if (_gridAxesAreVisible && (y == getGridOrigin().getY())) { - //_painter->moveTo(0, sy); - //_painter->lineTo(width(), sy); + } + for (Unit y = yMin; y <= yMax; y += _gridYStep) { + int sy = getScreenY(y); + if (_gridAxesAreVisible && (y == getGridOrigin().getY())) { + //_painter->moveTo(0, sy); + //_painter->lineTo(width(), sy); _painter->drawLine(0, sy, width(), sy); - } - if (!(isOnGridX(x, 10) && isOnGridY(y, 10))) { - _painter->drawPoint(sx, sy); - } - else { - //_painter->moveTo(sx - 2, sy); - //_painter->lineTo(sx + 2, sy); + } + if (!(isOnGridX(x, 10) && isOnGridY(y, 10))) { + _painter->drawPoint(sx, sy); + } + else { + //_painter->moveTo(sx - 2, sy); + //_painter->lineTo(sx + 2, sy); _painter->drawLine(sx - 2, sy, sx + 2, sy); - //_painter->moveTo(sx, sy - 2); - //_painter->lineTo(sx, sy + 2); + //_painter->moveTo(sx, sy - 2); + //_painter->lineTo(sx, sy + 2); _painter->drawLine(sx, sy - 2, sx, sy + 2); - } - } - } - } - } + } + } + } + } + } - postRedraw(area); + postRedraw(area); - if (device != this) { - int x = invalidRect.x(); - int y = invalidRect.y(); - int w = invalidRect.width(); - int h = invalidRect.height(); - //bitBlt(this, x, y, device, x, y, w, h, CopyROP, true); - } + if (device != this) { + int x = invalidRect.x(); + int y = invalidRect.y(); + int w = invalidRect.width(); + int h = invalidRect.height(); + //bitBlt(this, x, y, device, x, y, w, h, CopyROP, true); + } - _setClipBox(getBox(rect())); + _setClipBox(getBox(rect())); - _painter = oldPainter; + _painter = oldPainter; - _invalidRegion = QRegion(); + _invalidRegion = QRegion(); } } @@ -2688,15 +2688,15 @@ CellWidget::_redraw() // assert(command->isInstalledOn(this)); // // if (getView()) { -// QPainter painter(this); +// QPainter painter(this); // -// _painter = &painter; +// _painter = &painter; // -// _painter->setRasterOp(XorROP); -// _painter->setPen(getForegroundColor()); -// _painter->setBrush(NoBrush); +// _painter->setRasterOp(XorROP); +// _painter->setPen(getForegroundColor()); +// _painter->setBrush(NoBrush); // -// command->onDraw(this); +// command->onDraw(this); // } //} // diff --git a/hurricane/src/viewer/LayersWidget.cpp b/hurricane/src/viewer/LayersWidget.cpp index f9f11566..c6413271 100644 --- a/hurricane/src/viewer/LayersWidget.cpp +++ b/hurricane/src/viewer/LayersWidget.cpp @@ -13,19 +13,19 @@ LayersWidget::LayersWidget(QWidget* parent) : QWidget(parent), widgets() { - DataBase* db = GetDataBase(); - Technology* techno = db->GetTechnology(); + DataBase* db = getDataBase(); + Technology* techno = db->getTechnology(); QGridLayout* mainLayout = new QGridLayout; int line = 0; - for_each_basic_layer(basicLayer, techno->GetBasicLayers()) { + for_each_basic_layer(basicLayer, techno->getBasicLayers()) { QCheckBox* checkBox = new QCheckBox(); widgets.insert(checkBox); mainLayout->addWidget(checkBox, line, 0, Qt::AlignRight); //connect(checkBox, SIGNAL(toggled(bool)), // renderArea, SLOT(setAntialiased(bool))); - string layerName = GetString(basicLayer->getName()); + string layerName = getString(basicLayer->getName()); QLabel* label = new QLabel(tr(layerName.c_str())); widgets.insert(label); mainLayout->addWidget(label, line, 1, Qt::AlignRight);