diff --git a/hurricane/cmake_modules/FindHURRICANE.cmake b/hurricane/cmake_modules/FindHURRICANE.cmake index e0622258..b5e9a15b 100644 --- a/hurricane/cmake_modules/FindHURRICANE.cmake +++ b/hurricane/cmake_modules/FindHURRICANE.cmake @@ -1,9 +1,9 @@ # - Find the Hurricane includes and libraries. # The following variables are set if Hurricane is found. If HURRICANE is not -# found, Hurricane_FOUND is set to false. +# found, HURRICANE_FOUND is set to false. # HURRICANE_FOUND - True when the Hurricane include directory is found. -# HURRICANE_INCLUDE_DIRS - the path to where the Hurricane include files are. -# HURRICANE_LIBRARY_DIRS - The path to where the Hurricane library files are. +# HURRICANE_INCLUDE_DIR - the path to where the Hurricane include files are. +# HURRICANE_LIBRARIES - The path to where the Hurricane library files are. SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "directory containing the Hurricane include files. E.g /usr/local/include/hurricane or /asim/coriolis/include/hurricane") @@ -37,10 +37,23 @@ IF(UNIX) DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" ) - #MESSAGE("HURRICANE_DIR_SEARCH : ${HURRICANE_DIR_SEARCH}") - #MESSAGE("HURRICANE_LIBRARY_PATH : ${HURRICANE_LIBRARY_PATH}") + FIND_PATH(HURRICANE_ANALOGIC_INCLUDE_PATH NAMES RdsUnit.h PATHS + # Look in other places. + ${HURRICANE_DIR_SEARCH} + PATH_SUFFIXES include/hurricane + # Help the user find it if we cannot. + DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" + ) - FIND_PATH(HURRICANE_GRAPHICAL_INCLUDE_PATH + FIND_LIBRARY(HURRICANE_ANALOGIC_LIBRARY_PATH + NAMES analogic + PATHS ${HURRICANE_DIR_SEARCH} + PATH_SUFFIXES lib + # Help the user find it if we cannot. + DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" + ) + + FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH NAMES CellViewer.h PATHS ${HURRICANE_DIR_SEARCH} PATH_SUFFIXES include/hurricane @@ -48,7 +61,7 @@ IF(UNIX) DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" ) - FIND_LIBRARY(HURRICANE_GRAPHICAL_LIBRARY_PATH + FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH NAMES hurricaneviewer PATHS ${HURRICANE_DIR_SEARCH} PATH_SUFFIXES lib @@ -56,39 +69,77 @@ IF(UNIX) DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" ) + FIND_PATH(HURRICANE_EDITOR_INCLUDE_PATH + NAMES CellEditor.h + PATHS ${HURRICANE_DIR_SEARCH} + PATH_SUFFIXES include/hurricane + # Help the user find it if we cannot. + DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" + ) + + FIND_LIBRARY(HURRICANE_EDITOR_LIBRARY_PATH + NAMES hurricaneeditor + PATHS ${HURRICANE_DIR_SEARCH} + PATH_SUFFIXES lib + # Help the user find it if we cannot. + DOC "The ${HURRICANE_INCLUDE_PATH_DESCRIPTION}" + ) + # Assume we didn't find it. SET(HURRICANE_FOUND 0) SET(HURRICANE_GRAPHICAL_FOUND 0) IF(HURRICANE_INCLUDE_PATH) - IF (HURRICANE_LIBRARY_PATH) + IF(HURRICANE_LIBRARY_PATH) + IF(HURRICANE_ANALOGIC_INCLUDE_PATH) + IF(HURRICANE_ANALOGIC_LIBRARY_PATH) SET(HURRICANE_FOUND "YES") - SET(HURRICANE_INCLUDE_DIR ${HURRICANE_INCLUDE_PATH}) - SET(HURRICANE_LIBRARIES ${HURRICANE_LIBRARY_PATH} -lanalogic) - ENDIF(HURRICANE_LIBRARY_PATH) + SET(HURRICANE_INCLUDE_DIR + ${HURRICANE_INCLUDE_PATH} + ${HURRICANE_ANALOGIC_INCLUDE_PATH} + ) + SET(HURRICANE_LIBRARIES + ${HURRICANE_LIBRARY_PATH} + ${HURRICANE_ANALOGIC_LIBRARY_PATH} + ) + ENDIF(HURRICANE_ANALOGIC_LIBRARY_PATH) + ENDIF(HURRICANE_ANALOGIC_INCLUDE_PATH) + ENDIF(HURRICANE_LIBRARY_PATH) ENDIF(HURRICANE_INCLUDE_PATH) - IF(HURRICANE_GRAPHICAL_INCLUDE_PATH) - IF (HURRICANE_GRAPHICAL_LIBRARY_PATH) - SET(HURRICANE_GRAPHICAL_FOUND "YES") - SET(HURRICANE_GRAPHICAL_INCLUDE_DIR ${HURRICANE_GRAPHICAL_INCLUDE_PATH}) - SET(HURRICANE_GRAPHICAL_LIBRARIES ${HURRICANE_GRAPHICAL_LIBRARY_PATH} -lhurricaneeditor) - ENDIF(HURRICANE_GRAPHICAL_LIBRARY_PATH) - ENDIF(HURRICANE_GRAPHICAL_INCLUDE_PATH) + IF(HURRICANE_VIEWER_INCLUDE_PATH) + IF(HURRICANE_VIEWER_LIBRARY_PATH) + IF(HURRICANE_EDITOR_INCLUDE_PATH) + IF(HURRICANE_EDITOR_LIBRARY_PATH) + SET(HURRICANE_GRAPHICAL_FOUND "YES") + SET(HURRICANE_GRAPHICAL_INCLUDE_DIR + ${HURRICANE_VIEWER_INCLUDE_PATH} + ${HURRICANE_EDITOR_INCLUDE_PATH} + ) + SET(HURRICANE_GRAPHICAL_LIBRARIES + ${HURRICANE_VIEWER_LIBRARY_PATH} + ${HURRICANE_EDITOR_LIBRARY_PATH} + ) + ENDIF(HURRICANE_EDITOR_LIBRARY_PATH) + ENDIF(HURRICANE_EDITOR_INCLUDE_PATH) + ENDIF(HURRICANE_VIEWER_LIBRARY_PATH) + ENDIF(HURRICANE_VIEWER_INCLUDE_PATH) - IF(NOT HURRICANE_FOUND) + IF(HURRICANE_FOUND) IF(NOT HURRICANE_FIND_QUIETLY) - MESSAGE(STATUS "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}") - ELSE(NOT HURRICANE_FIND_QUIETLY) - IF(HURRICANE_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}") - ENDIF(HURRICANE_FIND_REQUIRED) + MESSAGE(STATUS "Found HURRICANE : ${HURRICANE_LIBRARIES}") ENDIF(NOT HURRICANE_FIND_QUIETLY) - ENDIF(NOT HURRICANE_FOUND) + ELSE(HURRICANE_FOUND) + IF(HURRICANE_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "HURRICANE was not found. ${HURRICANE_DIR_MESSAGE}") + ENDIF(HURRICANE_FIND_REQUIRED) + ENDIF(HURRICANE_FOUND) MARK_AS_ADVANCED( HURRICANE_INCLUDE_PATH HURRICANE_LIBRARY_PATH + HURRICANE_ANALOGIC_INCLUDE_PATH + HURRICANE_ANALOGIC_LIBRARY_PATH HURRICANE_GRAPHICAL_INCLUDE_PATH HURRICANE_GRAPHICAL_LIBRARY_PATH ) diff --git a/hurricane/src/editor/CellEditor.cpp b/hurricane/src/editor/CellEditor.cpp index 3124b9d4..aff8fd42 100644 --- a/hurricane/src/editor/CellEditor.cpp +++ b/hurricane/src/editor/CellEditor.cpp @@ -60,9 +60,11 @@ CellEditor::~CellEditor() { //} void CellEditor::zoomIn() { + view->scale(1.2, 1.2); } void CellEditor::zoomOut() { + view->scale(0.8, 0.8); } void CellEditor::fitToWindow() { diff --git a/hurricane/src/editor/CellGraphicsItem.cpp b/hurricane/src/editor/CellGraphicsItem.cpp index 3d59a392..5b08c05e 100644 --- a/hurricane/src/editor/CellGraphicsItem.cpp +++ b/hurricane/src/editor/CellGraphicsItem.cpp @@ -22,14 +22,17 @@ CellGraphicsItem::CellGraphicsItem(Cell* c): // end_for; //} + unsigned zValue = 10; for_each_slice(slice, cell->GetSlices()) { for_each_go(go, slice->GetGos()) { Segment* segment = dynamic_cast(go); if (segment) { - new SegmentGraphicsItem(this, segment); + SegmentGraphicsItem* segmentItem = new SegmentGraphicsItem(this, segment); + segmentItem->setZValue(zValue); } end_for; } + zValue += 10; end_for; } } diff --git a/hurricane/src/editor/SegmentFigure.cpp b/hurricane/src/editor/SegmentFigure.cpp index 2eb1a340..e2b0129e 100644 --- a/hurricane/src/editor/SegmentFigure.cpp +++ b/hurricane/src/editor/SegmentFigure.cpp @@ -1,8 +1,10 @@ #include +#include #include #include +#include "CompositeLayer.h" #include "BasicLayer.h" using namespace H; @@ -10,11 +12,57 @@ using namespace H; #include "CellGraphicsItem.h" #include "SegmentFigure.h" +namespace { + +QBrush getBrush(const string &pattern, int redValue, int greenValue, int blueValue) { + if (pattern == "FFFFFFFFFFFFFFFF") { + return QBrush(QColor(redValue, greenValue, blueValue)); + } else { + uchar bits[8]; + for (int i = 0; i < 8; i++) { + int high = pattern[i * 2]; + if (('0' <= high) && (high <= '9')) { + high = high - '0'; + } else { + if (('a' <= high) && (high <= 'f')) { + high = 10 + high - 'a'; + } else { + if (('A' <= high) && (high <= 'F')) { + high = 10 + high - 'A'; + } else { + high = '0'; + } + } + } + int low = pattern[(i * 2) + 1]; + if (('0' <= low) && (low <= '9')) { + low = low - '0'; + } else { + if (('a' <= low) && (low <= 'f')) { + low = 10 + low - 'a'; + } else { + if (('A' <= low) && (low <= 'F')) { + low = 10 + low - 'A'; + } else { + low = '0'; + } + } + } + bits[i] = (uchar)((high * 16) + low); + } + return QBrush(QColor(redValue, greenValue, blueValue), QBitmap::fromData(QSize(8,8), bits, QImage::Format_Mono)); + } +} + +} + SegmentGraphicsItem::SegmentGraphicsItem(CellGraphicsItem* master, Segment* s): QGraphicsItem(master), segment(s) { setFlag(ItemIsMovable); + setFlag(ItemIsSelectable); + setFlag(ItemIsFocusable); } QRectF SegmentGraphicsItem::boundingRect() const { @@ -25,23 +73,47 @@ QRectF SegmentGraphicsItem::boundingRect() const { } void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - - //if (option->levelOfDetail > 1.0) { - painter->setClipRect(option->exposedRect); - BasicLayer* layer = dynamic_cast(segment->GetLayer()); - if (layer) { - painter->setBrush(QColor(layer->GetRedValue(), layer->GetGreenValue(), layer->GetBlueValue())); - } else { - painter->setBrush(Qt::blue); - } - Box box = segment->GetBoundingBox(); - QRectF rect; - boxToRectangle(box, rect); - painter->drawRect(rect); - //} + //if (option->levelOfDetail > 1.0) { + painter->setClipRect(option->exposedRect); + Box box = segment->GetBoundingBox(); + QRectF rect; + boxToRectangle(box, rect); + BasicLayer* blayer = dynamic_cast(segment->GetLayer()); + if (blayer) { + QColor layerColor(blayer->GetRedValue(), + blayer->GetGreenValue(), + blayer->GetBlueValue()); + QBrush brush(layerColor); + brush.setStyle(Qt::Dense1Pattern); + painter->setBrush(brush); + //painter->setBrush(getBrush(blayer->GetFillPattern(), + // blayer->GetRedValue(), + // blayer->GetGreenValue(), + // blayer->GetBlueValue())); + painter->setPen(layerColor); + painter->drawRect(rect); + } else { + CompositeLayer* clayer = dynamic_cast(segment->GetLayer()); + if (clayer) { + for_each_basic_layer(basiclayer, clayer->GetBasicLayers()) { + QColor layerColor(basiclayer->GetRedValue(), + basiclayer->GetGreenValue(), + basiclayer->GetBlueValue()); + QBrush brush(layerColor); + brush.setStyle(Qt::Dense1Pattern); + painter->setBrush(brush); + //painter->setBrush(getBrush(basiclayer->GetFillPattern(), + // basiclayer->GetRedValue(), + // basiclayer->GetGreenValue(), + // basiclayer->GetBlueValue())); + painter->setPen(layerColor); + painter->drawRect(rect); + end_for; + } + } + } } - void SegmentGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { update(); QGraphicsItem::mousePressEvent(event); diff --git a/hurricane/src/editor/Utils.h b/hurricane/src/editor/Utils.h index 6226fa11..a170810e 100644 --- a/hurricane/src/editor/Utils.h +++ b/hurricane/src/editor/Utils.h @@ -8,10 +8,10 @@ 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() * 10.0); + double xmax = GetValue(box.getXMax()) * 10.0; + double ymin = GetValue(box.getYMin()) * 10.0; + double ymax = GetValue(box.getYMax()) * 10.0; rec.setCoords(xmin, ymin, xmax, ymax); } diff --git a/hurricane/src/hurricane/Cell.h b/hurricane/src/hurricane/Cell.h index cfd44d25..bfc40fc3 100644 --- a/hurricane/src/hurricane/Cell.h +++ b/hurricane/src/hurricane/Cell.h @@ -50,170 +50,170 @@ class Cell : public Entity { // Types // ***** - public: typedef Entity Inherit; + public: typedef Entity Inherit; - class InstanceMap : public IntrusiveMap { - // **************************************************** + class InstanceMap : public IntrusiveMap { + // **************************************************** - public: typedef IntrusiveMap Inherit; + public: typedef IntrusiveMap Inherit; - public: InstanceMap(); + 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 void _SetNextElement(Instance* instance, Instance* nextInstance) 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; - }; + }; - public: class SlaveInstanceSet : public IntrusiveSet { - // *********************************************************** + public: class SlaveInstanceSet : public IntrusiveSet { + // *********************************************************** - public: typedef IntrusiveSet Inherit; - - public: SlaveInstanceSet(); + public: typedef IntrusiveSet Inherit; + + public: SlaveInstanceSet(); - public: virtual unsigned _GetHashValue(Instance* slaveInstance) const; - public: virtual Instance* _GetNextElement(Instance* slaveInstance) const; - public: virtual void _SetNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const; + public: virtual unsigned _GetHashValue(Instance* slaveInstance) const; + public: virtual Instance* _GetNextElement(Instance* slaveInstance) const; + public: virtual void _SetNextElement(Instance* slaveInstance, Instance* nextSlaveInstance) const; - }; + }; - public: class NetMap : public IntrusiveMap { - // ************************************************** + public: class NetMap : public IntrusiveMap { + // ************************************************** - public: typedef IntrusiveMap Inherit; - - public: NetMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(Net* net, Net* nextNet) 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; - }; + }; - class PinMap : public IntrusiveMap { - // ******************************************* + class PinMap : public IntrusiveMap { + // ******************************************* - public: typedef IntrusiveMap Inherit; + public: typedef IntrusiveMap Inherit; - public: PinMap(); + 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 void _SetNextElement(Pin* pin, Pin* nextPin) 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; - }; + }; - public: class SliceMap : public IntrusiveMap { - // ************************************************************** + public: class SliceMap : public IntrusiveMap { + // ************************************************************** - public: typedef IntrusiveMap Inherit; - - public: SliceMap(); + public: typedef IntrusiveMap Inherit; + + 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 void _SetNextElement(Slice* slice, Slice* nextSlice) 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; - }; + }; - public: class MarkerSet : public IntrusiveSet { - // ************************************************** + public: class MarkerSet : public IntrusiveSet { + // ************************************************** - public: typedef IntrusiveSet Inherit; - - public: MarkerSet(); + public: typedef IntrusiveSet Inherit; + + public: MarkerSet(); - public: virtual unsigned _GetHashValue(Marker* marker) const; - public: virtual Marker* _GetNextElement(Marker* marker) const; - public: virtual void _SetNextElement(Marker* marker, Marker* nextMarker) 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: class ViewSet : public IntrusiveSet { + //// ********************************************** - // public: typedef IntrusiveSet Inherit; - // - // public: ViewSet(); + // 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; + // public: virtual unsigned _GetHashValue(View* view) const; + // public: virtual View* _GetNextElement(View* view) const; + // public: virtual void _SetNextElement(View* view, View* nextView) const; - //}; + //}; // Attributes // ********** - private: Library* _library; - private: Name _name; - private: InstanceMap _instanceMap; - private: QuadTree _quadTree; - private: SlaveInstanceSet _slaveInstanceSet; - private: NetMap _netMap; - private: PinMap _pinMap; - private: SliceMap _sliceMap; - private: MarkerSet _markerSet; - //private: ViewSet _viewSet; - private: Box _abutmentBox; - private: Box _boundingBox; - private: bool _isTerminal; - private: bool _isFlattenLeaf; - private: bool _isPad; - private: Cell* _nextOfLibraryCellMap; - private: Cell* _nextOfSymbolCellSet; + private: Library* _library; + private: Name _name; + private: InstanceMap _instanceMap; + private: QuadTree _quadTree; + private: SlaveInstanceSet _slaveInstanceSet; + private: NetMap _netMap; + private: PinMap _pinMap; + private: SliceMap _sliceMap; + private: MarkerSet _markerSet; + //private: ViewSet _viewSet; + private: Box _abutmentBox; + private: Box _boundingBox; + private: bool _isTerminal; + private: bool _isFlattenLeaf; + private: bool _isPad; + private: Cell* _nextOfLibraryCellMap; + private: Cell* _nextOfSymbolCellSet; private: multimap _slaveEntityMap; // Constructors // ************ - protected: Cell(Library* library, const Name& name); + protected: Cell(Library* library, const Name& name); // Others // ****** - protected: virtual void _PostCreate(); + protected: virtual void _PostCreate(); - protected: virtual void _PreDelete(); + protected: virtual void _PreDelete(); - 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;}; + public: void _SetNextOfLibraryCellMap(Cell* cell) {_nextOfLibraryCellMap = cell;}; + public: void _SetNextOfSymbolCellSet(Cell* cell) {_nextOfSymbolCellSet = cell;}; - public: void _Fit(const Box& box); - public: void _Unfit(const Box& box); + public: void _Fit(const Box& box); + public: void _Unfit(const Box& box); 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: bool _IsDrawable(View* view) const; - //public: bool _ContentIsDrawable(View* view) const; - //public: void _DrawPhantoms(View* view, const Box& updateArea, const Transformation& transformation); - //public: void _DrawBoundaries(View* view, const Box& updateArea, const Transformation& transformation); - //public: void _DrawContent(View* view, BasicLayer* basicLayer, 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: bool _IsDrawable(View* view) const; + //public: bool _ContentIsDrawable(View* view) const; + //public: void _DrawPhantoms(View* view, const Box& updateArea, const Transformation& transformation); + //public: void _DrawBoundaries(View* view, const Box& updateArea, const Transformation& transformation); + //public: void _DrawContent(View* view, BasicLayer* basicLayer, 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); # endif @@ -221,91 +221,91 @@ class Cell : public Entity { // Constructors // ************ - public: static Cell* Create(Library* library, const Name& name); + public: static Cell* Create(Library* library, const Name& name); // 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: 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: 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: const Box& GetAbutmentBox() const {return _abutmentBox;}; // Predicates // ********** - public: bool IsCalledBy(Cell* cell) const; - public: bool IsTerminal() const {return _isTerminal;}; - public: bool IsFlattenLeaf() const {return _isFlattenLeaf;}; - public: bool IsLeaf() const; - public: bool IsPad() const {return _isPad;}; + public: bool IsCalledBy(Cell* cell) const; + public: bool IsTerminal() const {return _isTerminal;}; + public: bool IsFlattenLeaf() const {return _isFlattenLeaf;}; + public: bool IsLeaf() const; + public: bool IsPad() const {return _isPad;}; // Updators // ******** - public: void SetName(const Name& name); - public: void SetAbutmentBox(const Box& abutmentBox); - public: void SetTerminal(bool isTerminal) {_isTerminal = isTerminal;}; - public: void SetFlattenLeaf(bool isFlattenLeaf) {_isFlattenLeaf = isFlattenLeaf;}; - public: void SetPad(bool isPad) {_isPad = isPad;}; - public: void FlattenNets(bool buildRings=true); - public: void Materialize(); - public: void Unmaterialize(); + public: void SetName(const Name& name); + public: void SetAbutmentBox(const Box& abutmentBox); + public: void SetTerminal(bool isTerminal) {_isTerminal = isTerminal;}; + public: void SetFlattenLeaf(bool isFlattenLeaf) {_isFlattenLeaf = isFlattenLeaf;}; + public: void SetPad(bool isPad) {_isPad = isPad;}; + public: void FlattenNets(bool buildRings=true); + public: void Materialize(); + public: void Unmaterialize(); }; diff --git a/hurricane/src/hurricane/CellCollections.cpp b/hurricane/src/hurricane/CellCollections.cpp index cb8ef735..0c059dbf 100644 --- a/hurricane/src/hurricane/CellCollections.cpp +++ b/hurricane/src/hurricane/CellCollections.cpp @@ -21,62 +21,62 @@ class Cell_Slices : 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: Layer::Mask _mask; - private: SliceLocator _sliceLocator; + private: const Cell* _cell; + private: Layer::Mask _mask; + private: SliceLocator _sliceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Layer::Mask _mask; + private: const Cell* _cell; + private: Layer::Mask _mask; // Constructors // ************ - public: Cell_Slices(); - public: Cell_Slices(const Cell* cell, const Layer::Mask& mask = ~0); - public: Cell_Slices(const Cell_Slices& slices); + public: Cell_Slices(); + public: Cell_Slices(const Cell* cell, const Layer::Mask& mask = ~0); + public: Cell_Slices(const Cell_Slices& slices); // Operators // ********* - public: Cell_Slices& operator=(const Cell_Slices& slices); + public: Cell_Slices& operator=(const Cell_Slices& slices); // 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; }; @@ -92,64 +92,64 @@ class Cell_Components : 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: Layer::Mask _mask; - private: SliceLocator _sliceLocator; - private: ComponentLocator _componentLocator; - private: Component* _component; + private: const Cell* _cell; + private: Layer::Mask _mask; + private: SliceLocator _sliceLocator; + private: ComponentLocator _componentLocator; + private: Component* _component; - public: Locator(); - public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); + 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 Cell* _cell; - private: Layer::Mask _mask; + private: const Cell* _cell; + private: Layer::Mask _mask; // Constructors // ************ - public: Cell_Components(); - public: Cell_Components(const Cell* cell, const Layer::Mask& mask = ~0); - public: Cell_Components(const Cell_Components& components); + public: Cell_Components(); + public: Cell_Components(const Cell* cell, const Layer::Mask& mask = ~0); + public: Cell_Components(const Cell_Components& components); // Operators // ********* - public: Cell_Components& operator=(const Cell_Components& components); + public: Cell_Components& operator=(const Cell_Components& components); // 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; }; @@ -165,66 +165,66 @@ class Cell_ComponentsUnder : 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: Box _area; - private: Layer::Mask _mask; - private: SliceLocator _sliceLocator; - private: ComponentLocator _componentLocator; - private: Component* _component; + private: const Cell* _cell; + private: Box _area; + private: Layer::Mask _mask; + private: SliceLocator _sliceLocator; + private: ComponentLocator _componentLocator; + private: Component* _component; - public: Locator(); - public: Locator(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); + 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 Cell* _cell; - private: Box _area; - private: Layer::Mask _mask; + private: const Cell* _cell; + private: Box _area; + private: Layer::Mask _mask; // Constructors // ************ - public: Cell_ComponentsUnder(); - public: Cell_ComponentsUnder(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); - public: Cell_ComponentsUnder(const Cell_ComponentsUnder& components); + public: Cell_ComponentsUnder(); + public: Cell_ComponentsUnder(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); + public: Cell_ComponentsUnder(const Cell_ComponentsUnder& components); // Operators // ********* - public: Cell_ComponentsUnder& operator=(const Cell_ComponentsUnder& components); + public: Cell_ComponentsUnder& operator=(const Cell_ComponentsUnder& components); // 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; }; @@ -240,67 +240,67 @@ class Cell_Occurrences : 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: unsigned _searchDepth; - private: unsigned _state; - private: ComponentLocator _componentLocator; - private: RubberLocator _rubberLocator; - private: MarkerLocator _markerLocator; - private: InstanceLocator _instanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: unsigned _searchDepth; + private: unsigned _state; + private: ComponentLocator _componentLocator; + private: RubberLocator _rubberLocator; + private: MarkerLocator _markerLocator; + private: InstanceLocator _instanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, unsigned searchDepth); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, unsigned searchDepth); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: unsigned _searchDepth; + private: const Cell* _cell; + private: unsigned _searchDepth; // Constructors // ************ - public: Cell_Occurrences(); - public: Cell_Occurrences(const Cell* cell, unsigned searchDepth); - public: Cell_Occurrences(const Cell_Occurrences& occurrences); + public: Cell_Occurrences(); + public: Cell_Occurrences(const Cell* cell, unsigned searchDepth); + public: Cell_Occurrences(const Cell_Occurrences& occurrences); // Operators // ********* - public: Cell_Occurrences& operator=(const Cell_Occurrences& occurrences); + public: Cell_Occurrences& operator=(const Cell_Occurrences& occurrences); // 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; }; @@ -316,69 +316,69 @@ class Cell_OccurrencesUnder : 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: Box _area; - private: unsigned _searchDepth; - private: unsigned _state; - private: ComponentLocator _componentLocator; - private: RubberLocator _rubberLocator; - private: MarkerLocator _markerLocator; - private: InstanceLocator _instanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: Box _area; + private: unsigned _searchDepth; + private: unsigned _state; + private: ComponentLocator _componentLocator; + private: RubberLocator _rubberLocator; + private: MarkerLocator _markerLocator; + private: InstanceLocator _instanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Box& area, unsigned searchDepth = (unsigned)-1); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Box& area, unsigned searchDepth = (unsigned)-1); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Box _area; - private: unsigned _searchDepth; + private: const Cell* _cell; + private: Box _area; + private: unsigned _searchDepth; // Constructors // ************ - public: Cell_OccurrencesUnder(); - public: Cell_OccurrencesUnder(const Cell* cell, const Box& area, unsigned searchDepth = (unsigned)-1); - public: Cell_OccurrencesUnder(const Cell_OccurrencesUnder& occurrences); + public: Cell_OccurrencesUnder(); + public: Cell_OccurrencesUnder(const Cell* cell, const Box& area, unsigned searchDepth = (unsigned)-1); + public: Cell_OccurrencesUnder(const Cell_OccurrencesUnder& occurrences); // Operators // ********* - public: Cell_OccurrencesUnder& operator=(const Cell_OccurrencesUnder& occurrences); + public: Cell_OccurrencesUnder& operator=(const Cell_OccurrencesUnder& occurrences); // 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; }; @@ -392,61 +392,61 @@ class Cell_LeafInstanceOccurrences : 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: int _state; - private: InstanceLocator _leafInstanceLocator; - private: InstanceLocator _nonLeafInstanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: int _state; + private: InstanceLocator _leafInstanceLocator; + private: InstanceLocator _nonLeafInstanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(const Cell* cell = NULL); - public: Locator(const Locator& locator); + public: Locator(const Cell* cell = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Cell_LeafInstanceOccurrences(const Cell* cell = NULL); - public: Cell_LeafInstanceOccurrences(const Cell_LeafInstanceOccurrences& occurrences); + public: Cell_LeafInstanceOccurrences(const Cell* cell = NULL); + public: Cell_LeafInstanceOccurrences(const Cell_LeafInstanceOccurrences& occurrences); // Operators // ********* - public: Cell_LeafInstanceOccurrences& operator=(const Cell_LeafInstanceOccurrences& occurrences); + public: Cell_LeafInstanceOccurrences& operator=(const Cell_LeafInstanceOccurrences& occurrences); // 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; }; @@ -462,65 +462,65 @@ class Cell_LeafInstanceOccurrencesUnder : 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: Box _area; - private: int _state; - private: InstanceLocator _leafInstanceLocator; - private: InstanceLocator _nonLeafInstanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: Box _area; + private: int _state; + private: InstanceLocator _leafInstanceLocator; + private: InstanceLocator _nonLeafInstanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Box& area); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Box& area); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Box _area; + private: const Cell* _cell; + private: Box _area; // Constructors // ************ - public: Cell_LeafInstanceOccurrencesUnder(); - public: Cell_LeafInstanceOccurrencesUnder(const Cell* cell, const Box& area); - public: Cell_LeafInstanceOccurrencesUnder(const Cell_LeafInstanceOccurrencesUnder& occurrences); + public: Cell_LeafInstanceOccurrencesUnder(); + public: Cell_LeafInstanceOccurrencesUnder(const Cell* cell, const Box& area); + public: Cell_LeafInstanceOccurrencesUnder(const Cell_LeafInstanceOccurrencesUnder& occurrences); // Operators // ********* - public: Cell_LeafInstanceOccurrencesUnder& operator=(const Cell_LeafInstanceOccurrencesUnder& occurrences); + public: Cell_LeafInstanceOccurrencesUnder& operator=(const Cell_LeafInstanceOccurrencesUnder& occurrences); // 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; }; @@ -536,61 +536,61 @@ class Cell_TerminalInstanceOccurrences : 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: int _state; - private: InstanceLocator _terminalInstanceLocator; - private: InstanceLocator _nonTerminalInstanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: int _state; + private: InstanceLocator _terminalInstanceLocator; + private: InstanceLocator _nonTerminalInstanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(const Cell* cell = NULL); - public: Locator(const Locator& locator); + public: Locator(const Cell* cell = NULL); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Cell_TerminalInstanceOccurrences(const Cell* cell = NULL); - public: Cell_TerminalInstanceOccurrences(const Cell_TerminalInstanceOccurrences& occurrences); + public: Cell_TerminalInstanceOccurrences(const Cell* cell = NULL); + public: Cell_TerminalInstanceOccurrences(const Cell_TerminalInstanceOccurrences& occurrences); // Operators // ********* - public: Cell_TerminalInstanceOccurrences& operator=(const Cell_TerminalInstanceOccurrences& occurrences); + public: Cell_TerminalInstanceOccurrences& operator=(const Cell_TerminalInstanceOccurrences& occurrences); // 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; }; @@ -606,65 +606,65 @@ class Cell_TerminalInstanceOccurrencesUnder : 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: Box _area; - private: int _state; - private: InstanceLocator _terminalInstanceLocator; - private: InstanceLocator _nonTerminalInstanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: Box _area; + private: int _state; + private: InstanceLocator _terminalInstanceLocator; + private: InstanceLocator _nonTerminalInstanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Box& area); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Box& area); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Box _area; + private: const Cell* _cell; + private: Box _area; // Constructors // ************ - public: Cell_TerminalInstanceOccurrencesUnder(); - public: Cell_TerminalInstanceOccurrencesUnder(const Cell* cell, const Box& area); - public: Cell_TerminalInstanceOccurrencesUnder(const Cell_TerminalInstanceOccurrencesUnder& occurrences); + public: Cell_TerminalInstanceOccurrencesUnder(); + public: Cell_TerminalInstanceOccurrencesUnder(const Cell* cell, const Box& area); + public: Cell_TerminalInstanceOccurrencesUnder(const Cell_TerminalInstanceOccurrencesUnder& occurrences); // Operators // ********* - public: Cell_TerminalInstanceOccurrencesUnder& operator=(const Cell_TerminalInstanceOccurrencesUnder& occurrences); + public: Cell_TerminalInstanceOccurrencesUnder& operator=(const Cell_TerminalInstanceOccurrencesUnder& occurrences); // 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; }; @@ -680,65 +680,65 @@ class Cell_ComponentOccurrences : 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: Layer::Mask _mask; - private: int _state; - private: ComponentLocator _componentLocator; - private: InstanceLocator _instanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: Layer::Mask _mask; + private: int _state; + private: ComponentLocator _componentLocator; + private: InstanceLocator _instanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Layer::Mask& mask = ~0); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Layer::Mask _mask; + private: const Cell* _cell; + private: Layer::Mask _mask; // Constructors // ************ - public: Cell_ComponentOccurrences(); - public: Cell_ComponentOccurrences(const Cell* cell, const Layer::Mask& mask = ~0); - public: Cell_ComponentOccurrences(const Cell_ComponentOccurrences& occurrences); + public: Cell_ComponentOccurrences(); + public: Cell_ComponentOccurrences(const Cell* cell, const Layer::Mask& mask = ~0); + public: Cell_ComponentOccurrences(const Cell_ComponentOccurrences& occurrences); // Operators // ********* - public: Cell_ComponentOccurrences& operator=(const Cell_ComponentOccurrences& occurrences); + public: Cell_ComponentOccurrences& operator=(const Cell_ComponentOccurrences& occurrences); // 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; }; @@ -754,67 +754,67 @@ class Cell_ComponentOccurrencesUnder : 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: Box _area; - private: Layer::Mask _mask; - private: int _state; - private: ComponentLocator _componentLocator; - private: InstanceLocator _instanceLocator; - private: OccurrenceLocator _occurrenceLocator; + private: const Cell* _cell; + private: Box _area; + private: Layer::Mask _mask; + private: int _state; + private: ComponentLocator _componentLocator; + private: InstanceLocator _instanceLocator; + private: OccurrenceLocator _occurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Box _area; - private: Layer::Mask _mask; + private: const Cell* _cell; + private: Box _area; + private: Layer::Mask _mask; // Constructors // ************ - public: Cell_ComponentOccurrencesUnder(); - public: Cell_ComponentOccurrencesUnder(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); - public: Cell_ComponentOccurrencesUnder(const Cell_ComponentOccurrencesUnder& occurrences); + public: Cell_ComponentOccurrencesUnder(); + public: Cell_ComponentOccurrencesUnder(const Cell* cell, const Box& area, const Layer::Mask& mask = ~0); + public: Cell_ComponentOccurrencesUnder(const Cell_ComponentOccurrencesUnder& occurrences); // Operators // ********* - public: Cell_ComponentOccurrencesUnder& operator=(const Cell_ComponentOccurrencesUnder& occurrences); + public: Cell_ComponentOccurrencesUnder& operator=(const Cell_ComponentOccurrencesUnder& occurrences); // 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; }; @@ -828,63 +828,63 @@ class Cell_HyperNetRootNetOccurrences : 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: Path _path; - private: NetLocator _netLocator; - private: InstanceLocator _instanceLocator; - private: OccurrenceLocator _hyperNetRootNetOccurrenceLocator; + private: NetLocator _netLocator; + private: InstanceLocator _instanceLocator; + private: OccurrenceLocator _hyperNetRootNetOccurrenceLocator; - public: Locator(); - public: Locator(const Cell* cell, const Path path); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(const Cell* cell, const Path path); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Path _path; + private: const Cell* _cell; + private: Path _path; // Constructors // ************ - public: Cell_HyperNetRootNetOccurrences(); - public: Cell_HyperNetRootNetOccurrences(const Cell* cell, const Path path); - public: Cell_HyperNetRootNetOccurrences(const Cell_HyperNetRootNetOccurrences& netOccurrences); + public: Cell_HyperNetRootNetOccurrences(); + public: Cell_HyperNetRootNetOccurrences(const Cell* cell, const Path path); + public: Cell_HyperNetRootNetOccurrences(const Cell_HyperNetRootNetOccurrences& netOccurrences); // Operators // ********* - public: Cell_HyperNetRootNetOccurrences& operator=(const Cell_HyperNetRootNetOccurrences& HyperNetRootNetOccurrences); + public: Cell_HyperNetRootNetOccurrences& operator=(const Cell_HyperNetRootNetOccurrences& HyperNetRootNetOccurrences); // 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; }; @@ -899,61 +899,61 @@ class Cell_HyperNetRootNetOccurrences : 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: set _cellSet; -// private: stack _cellStack; -// private: MainViewLocator _mainViewLocator; -// private: MainView* _mainView; +// private: const Cell* _cell; +// private: set _cellSet; +// private: stack _cellStack; +// private: MainViewLocator _mainViewLocator; +// private: MainView* _mainView; // -// public: Locator(const Cell* cell = NULL); -// public: Locator(const Locator& locator); +// public: Locator(const Cell* cell = NULL); +// public: Locator(const Locator& locator); // -// public: Locator& operator=(const Locator& locator); +// 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 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: Cell_ImpactedMainViews(const Cell* cell = NULL); -// public: Cell_ImpactedMainViews(const Cell_ImpactedMainViews& impactedMainViews); +// public: Cell_ImpactedMainViews(const Cell* cell = NULL); +// public: Cell_ImpactedMainViews(const Cell_ImpactedMainViews& impactedMainViews); // //// Operators //// ********* // -// public: Cell_ImpactedMainViews& operator=(const Cell_ImpactedMainViews& impactedMainViews); +// public: Cell_ImpactedMainViews& operator=(const Cell_ImpactedMainViews& impactedMainViews); // //// 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; // //}; // @@ -967,60 +967,60 @@ class Cell_SubCells : 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: set _cellSet; - private: InstanceLocator _instanceLocator; + private: set _cellSet; + private: InstanceLocator _instanceLocator; - public: Locator(); - public: Locator(InstanceLocator instanceLocator); - public: Locator(const Locator& locator); + public: Locator(); + public: Locator(InstanceLocator instanceLocator); + public: Locator(const Locator& locator); - public: Locator& operator=(const Locator& locator); + 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 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: Cell_SubCells(); - public: Cell_SubCells(const Cell* cell); - public: Cell_SubCells(const Cell_SubCells& subCells); + public: Cell_SubCells(); + public: Cell_SubCells(const Cell* cell); + public: Cell_SubCells(const Cell_SubCells& subCells); // Operators // ********* - public: Cell_SubCells& operator=(const Cell_SubCells& subCells); + public: Cell_SubCells& operator=(const Cell_SubCells& subCells); // 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; }; @@ -1075,9 +1075,9 @@ class Cell_SubCells : public Collection { { }; // Accessors. - public: + public: virtual Collection* GetClone () const { return new Cell_RecursiveSlavePathes(*this); }; - virtual Hurricane::Locator* GetLocator () const { return new Locator(_cell); }; + virtual Hurricane::Locator* GetLocator () const { return new Locator(_cell); }; // Hurricane Managment. public: @@ -1095,8 +1095,8 @@ class Cell_SubCells : public Collection { 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 @@ -1108,31 +1108,31 @@ Instances Cell::GetSlaveInstances() const Instances Cell::GetTerminalInstances() const // ***************************************** { - return GetInstances().GetSubSet(Instance::GetIsTerminalFilter()); + return GetInstances().GetSubSet(Instance::GetIsTerminalFilter()); } Instances Cell::GetLeafInstances() const // ************************************* { - return GetInstances().GetSubSet(Instance::GetIsLeafFilter()); + return GetInstances().GetSubSet(Instance::GetIsLeafFilter()); } Instances Cell::GetPlacedInstances() const // *************************************** { - return GetInstances().GetSubSet(Instance::GetIsPlacedFilter()); + return GetInstances().GetSubSet(Instance::GetIsPlacedFilter()); } Instances Cell::GetFixedInstances() const // ************************************** { - return GetInstances().GetSubSet(Instance::GetIsFixedFilter()); + return GetInstances().GetSubSet(Instance::GetIsFixedFilter()); } Instances Cell::GetUnplacedInstances() const // ************************************** { - return GetInstances().GetSubSet(Instance::GetIsUnplacedFilter()); + return GetInstances().GetSubSet(Instance::GetIsUnplacedFilter()); } Instances Cell::GetNotUnplacedInstances() const @@ -1144,215 +1144,215 @@ Instances Cell::GetNotUnplacedInstances() 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 // ********************************************************** { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsFixedFilter()); + return GetInstancesUnder(area).GetSubSet(Instance::GetIsFixedFilter()); } 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 // **************************************************************** { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsNotUnplacedFilter()); + return GetInstancesUnder(area).GetSubSet(Instance::GetIsNotUnplacedFilter()); } Instances Cell::GetTerminalInstancesUnder(const Box& area) const // ************************************************************* { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsTerminalFilter()); + return GetInstancesUnder(area).GetSubSet(Instance::GetIsTerminalFilter()); } Instances Cell::GetNonTerminalInstances() const // ******************************************** { - return GetInstances().GetSubSet(!Instance::GetIsTerminalFilter()); + return GetInstances().GetSubSet(!Instance::GetIsTerminalFilter()); } 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 // ********************************************************* { - return GetInstancesUnder(area).GetSubSet(Instance::GetIsLeafFilter()); + return GetInstancesUnder(area).GetSubSet(Instance::GetIsLeafFilter()); } Instances Cell::GetNonLeafInstances() const // **************************************** { - return GetInstances().GetSubSet(!Instance::GetIsLeafFilter()); + return GetInstances().GetSubSet(!Instance::GetIsLeafFilter()); } Instances Cell::GetNonLeafInstancesUnder(const Box& area) const // ************************************************************ { - return GetInstancesUnder(area).GetSubSet(!Instance::GetIsLeafFilter()); + return GetInstancesUnder(area).GetSubSet(!Instance::GetIsLeafFilter()); } Nets Cell::GetGlobalNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsGlobalFilter()); + return GetNets().GetSubSet(Net::GetIsGlobalFilter()); } Nets Cell::GetExternalNets() const // ******************************* { - return GetNets().GetSubSet(Net::GetIsExternalFilter()); + return GetNets().GetSubSet(Net::GetIsExternalFilter()); } Nets Cell::GetInternalNets() const // ******************************* { - return GetNets().GetSubSet(Net::GetIsInternalFilter()); + return GetNets().GetSubSet(Net::GetIsInternalFilter()); } Nets Cell::GetClockNets() const // **************************** { - return GetNets().GetSubSet(Net::GetIsClockFilter()); + return GetNets().GetSubSet(Net::GetIsClockFilter()); } Nets Cell::GetSupplyNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsSupplyFilter()); + return GetNets().GetSubSet(Net::GetIsSupplyFilter()); } Nets Cell::GetPowerNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsPowerFilter()); + return GetNets().GetSubSet(Net::GetIsPowerFilter()); } Nets Cell::GetGroundNets() const // ***************************** { - return GetNets().GetSubSet(Net::GetIsGroundFilter()); + return GetNets().GetSubSet(Net::GetIsGroundFilter()); } Slices Cell::GetSlices(const Layer::Mask& mask) const // ************************************************** { - return Cell_Slices(this, mask); + return Cell_Slices(this, mask); } //MainViews Cell::GetMainViews() const //// ********************************* //{ -// // return GetViews().GetSubSet(); -// return SubTypeCollection(GetViews()); +// // return GetViews().GetSubSet(); +// return SubTypeCollection(GetViews()); //} // //MainViews Cell::GetImpactedMainViews() const //// ***************************************** //{ -// return Cell_ImpactedMainViews(this); +// return Cell_ImpactedMainViews(this); //} // 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 // ************************************************* { - // 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 // ************************************************* { - // 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 // ********************************** { - return SubTypeCollection(GetMarkers()); + return SubTypeCollection(GetMarkers()); } Cells Cell::GetSubCells() const // **************************** { - return Cell_SubCells(this); + return Cell_SubCells(this); } Components Cell::GetComponents(const Layer::Mask& mask) const // ********************************************************** { - return Cell_Components(this, mask); + return Cell_Components(this, mask); } Components Cell::GetComponentsUnder(const Box& area, const Layer::Mask& mask) const // ******************************************************************************** { - return Cell_ComponentsUnder(this, area, mask); + return Cell_ComponentsUnder(this, area, mask); } Occurrences Cell::GetOccurrences(unsigned searchDepth) const // ******************************************************* { - return Cell_Occurrences(this, searchDepth); + return Cell_Occurrences(this, searchDepth); } Occurrences Cell::GetOccurrencesUnder(const Box& area, unsigned searchDepth) const // ***************************************************************************** { - return Cell_OccurrencesUnder(this, area, searchDepth); + return Cell_OccurrencesUnder(this, area, searchDepth); } Occurrences Cell::GetTerminalInstanceOccurrences() const // *************************************************** { - return Cell_TerminalInstanceOccurrences(this); + return Cell_TerminalInstanceOccurrences(this); } Occurrences Cell::GetTerminalInstanceOccurrencesUnder(const Box& area) const // *********************************************************************** { - return Cell_TerminalInstanceOccurrencesUnder(this, area); + return Cell_TerminalInstanceOccurrencesUnder(this, area); } Occurrences Cell::GetLeafInstanceOccurrences() const // *********************************************** { - return Cell_LeafInstanceOccurrences(this); + return Cell_LeafInstanceOccurrences(this); } Occurrences Cell::GetLeafInstanceOccurrencesUnder(const Box& area) const // ******************************************************************* { - return Cell_LeafInstanceOccurrencesUnder(this, area); + return Cell_LeafInstanceOccurrencesUnder(this, area); } Occurrences Cell::GetComponentOccurrences(const Layer::Mask& mask) const // ******************************************************************* { - return Cell_ComponentOccurrences(this, mask); + return Cell_ComponentOccurrences(this, mask); } Occurrences Cell::GetComponentOccurrencesUnder(const Box& area, const Layer::Mask& mask) const // ***************************************************************************************** { - return Cell_ComponentOccurrencesUnder(this, area, mask); + return Cell_ComponentOccurrencesUnder(this, area, mask); } Pathes Cell::GetRecursiveSlavePathes() const @@ -1364,7 +1364,7 @@ Pathes Cell::GetRecursiveSlavePathes() const Occurrences Cell::GetHyperNetRootNetOccurrences() const // ********************************* { - return Cell_HyperNetRootNetOccurrences(this,Path()); + return Cell_HyperNetRootNetOccurrences(this,Path()); } // **************************************************************************************************** @@ -1373,58 +1373,58 @@ Occurrences Cell::GetHyperNetRootNetOccurrences() const Cell_Slices::Cell_Slices() // *********************** -: Inherit(), - _cell(NULL), - _mask(0) +: Inherit(), + _cell(NULL), + _mask(0) { } Cell_Slices::Cell_Slices(const Cell* cell, const Layer::Mask& mask) // **************************************************************** -: Inherit(), - _cell(cell), - _mask(mask) +: Inherit(), + _cell(cell), + _mask(mask) { } Cell_Slices::Cell_Slices(const Cell_Slices& slices) // ************************************************ -: Inherit(), - _cell(slices._cell), - _mask(slices._mask) +: Inherit(), + _cell(slices._cell), + _mask(slices._mask) { } Cell_Slices& Cell_Slices::operator=(const Cell_Slices& slices) // *********************************************************** { - _cell = slices._cell; - _mask = slices._mask; - return *this; + _cell = slices._cell; + _mask = slices._mask; + return *this; } Collection* Cell_Slices::GetClone() const // ********************************************** { - return new Cell_Slices(*this); + return new Cell_Slices(*this); } Locator* Cell_Slices::GetLocator() const // ********************************************* { - return new Locator(_cell, _mask); + return new Locator(_cell, _mask); } string Cell_Slices::_GetString() const // *********************************** { - string s = "<" + _TName("Cell::Slices"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::Slices"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1435,84 +1435,84 @@ string Cell_Slices::_GetString() const Cell_Slices::Locator::Locator() // **************************** -: Inherit(), - _cell(NULL), - _mask(0), - _sliceLocator() +: Inherit(), + _cell(NULL), + _mask(0), + _sliceLocator() { } Cell_Slices::Locator::Locator(const Cell* cell, const Layer::Mask& mask) // ********************************************************************* -: Inherit(), - _cell(cell), - _mask(mask), - _sliceLocator() +: Inherit(), + _cell(cell), + _mask(mask), + _sliceLocator() { - if (_cell && (_mask != 0)) { - _sliceLocator = ((Cell*)_cell)->_GetSliceMap().GetElements().GetLocator(); - while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask)) - _sliceLocator.Progress(); - } + if (_cell && (_mask != 0)) { + _sliceLocator = ((Cell*)_cell)->_GetSliceMap().GetElements().GetLocator(); + while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask)) + _sliceLocator.Progress(); + } } Cell_Slices::Locator::Locator(const Locator& locator) // ************************************************** -: Inherit(), - _cell(locator._cell), - _mask(locator._mask), - _sliceLocator(locator._sliceLocator) +: Inherit(), + _cell(locator._cell), + _mask(locator._mask), + _sliceLocator(locator._sliceLocator) { } Cell_Slices::Locator& Cell_Slices::Locator::operator=(const Locator& locator) // ************************************************************************** { - _cell = locator._cell; - _mask = locator._mask; - _sliceLocator = locator._sliceLocator; - return *this; + _cell = locator._cell; + _mask = locator._mask; + _sliceLocator = locator._sliceLocator; + return *this; } Slice* Cell_Slices::Locator::GetElement() const // ******************************************** { - return _sliceLocator.GetElement(); + return _sliceLocator.GetElement(); } Locator* Cell_Slices::Locator::GetClone() const // **************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_Slices::Locator::IsValid() const // *************************************** { - return _sliceLocator.IsValid(); + return _sliceLocator.IsValid(); } void Cell_Slices::Locator::Progress() // ********************************** { - if (_sliceLocator.IsValid()) { - do { - _sliceLocator.Progress(); - } - while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask)); - } + if (_sliceLocator.IsValid()) { + do { + _sliceLocator.Progress(); + } + while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask)); + } } string Cell_Slices::Locator::_GetString() const // ******************************************** { - string s = "<" + _TName("Cell::Slices::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::Slices::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1523,58 +1523,58 @@ string Cell_Slices::Locator::_GetString() const Cell_Components::Cell_Components() // ******************************* -: Inherit(), - _cell(NULL), - _mask(0) +: Inherit(), + _cell(NULL), + _mask(0) { } Cell_Components::Cell_Components(const Cell* cell, const Layer::Mask& mask) // ************************************************************************ -: Inherit(), - _cell(cell), - _mask(mask) +: Inherit(), + _cell(cell), + _mask(mask) { } Cell_Components::Cell_Components(const Cell_Components& components) // **************************************************************** -: Inherit(), - _cell(components._cell), - _mask(components._mask) +: Inherit(), + _cell(components._cell), + _mask(components._mask) { } Cell_Components& Cell_Components::operator=(const Cell_Components& components) // *************************************************************************** { - _cell = components._cell; - _mask = components._mask; - return *this; + _cell = components._cell; + _mask = components._mask; + return *this; } Collection* Cell_Components::GetClone() const // ****************************************************** { - return new Cell_Components(*this); + return new Cell_Components(*this); } Locator* Cell_Components::GetLocator() const // ***************************************************** { - return new Locator(_cell, _mask); + return new Locator(_cell, _mask); } string Cell_Components::_GetString() const // *************************************** { - string s = "<" + _TName("Cell::Components"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::Components"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1585,117 +1585,117 @@ string Cell_Components::_GetString() const Cell_Components::Locator::Locator() // ******************************** -: Inherit(), - _cell(NULL), - _mask(0), - _sliceLocator(), - _componentLocator(), - _component(NULL) +: Inherit(), + _cell(NULL), + _mask(0), + _sliceLocator(), + _componentLocator(), + _component(NULL) { } Cell_Components::Locator::Locator(const Cell* cell, const Layer::Mask& mask) // ************************************************************************* -: Inherit(), - _cell(cell), - _mask(mask), - _sliceLocator(), - _componentLocator(), - _component(NULL) +: Inherit(), + _cell(cell), + _mask(mask), + _sliceLocator(), + _componentLocator(), + _component(NULL) { - if (_cell && (_mask != 0)) { - _sliceLocator = _cell->GetSlices(_mask).GetLocator(); - while (!_component && _sliceLocator.IsValid()) { - Slice* slice = _sliceLocator.GetElement(); - if (slice) { - _componentLocator = slice->GetComponents().GetLocator(); - while (!_component && _componentLocator.IsValid()) { - _component = _componentLocator.GetElement(); - if (!_component) _componentLocator.Progress(); - } - } - if (!_component) _sliceLocator.Progress(); - } - } + if (_cell && (_mask != 0)) { + _sliceLocator = _cell->GetSlices(_mask).GetLocator(); + while (!_component && _sliceLocator.IsValid()) { + Slice* slice = _sliceLocator.GetElement(); + if (slice) { + _componentLocator = slice->GetComponents().GetLocator(); + while (!_component && _componentLocator.IsValid()) { + _component = _componentLocator.GetElement(); + if (!_component) _componentLocator.Progress(); + } + } + if (!_component) _sliceLocator.Progress(); + } + } } Cell_Components::Locator::Locator(const Locator& locator) // ****************************************************** -: Inherit(), - _cell(locator._cell), - _mask(locator._mask), - _sliceLocator(locator._sliceLocator), - _componentLocator(locator._componentLocator), - _component(locator._component) +: Inherit(), + _cell(locator._cell), + _mask(locator._mask), + _sliceLocator(locator._sliceLocator), + _componentLocator(locator._componentLocator), + _component(locator._component) { } Cell_Components::Locator& Cell_Components::Locator::operator=(const Locator& locator) // ********************************************************************************** { - _cell = locator._cell; - _mask = locator._mask; - _sliceLocator = locator._sliceLocator; - _componentLocator = locator._componentLocator; - _component = locator._component; - return *this; + _cell = locator._cell; + _mask = locator._mask; + _sliceLocator = locator._sliceLocator; + _componentLocator = locator._componentLocator; + _component = locator._component; + return *this; } Component* Cell_Components::Locator::GetElement() const // **************************************************** { - return _component; + return _component; } Locator* Cell_Components::Locator::GetClone() const // ************************************************************ { - return new Locator(*this); + return new Locator(*this); } bool Cell_Components::Locator::IsValid() const // ******************************************* { - return (_component != NULL); + return (_component != NULL); } void Cell_Components::Locator::Progress() // ************************************** { - if (_component) { - _component = NULL; - do { - _componentLocator.Progress(); - _component = _componentLocator.GetElement(); - } - while (!_component && _componentLocator.IsValid()); - if (!_component) { - do { - _sliceLocator.Progress(); - Slice* slice = _sliceLocator.GetElement(); - if (slice) { - _componentLocator = slice->GetComponents().GetLocator(); - while (!_component && _componentLocator.IsValid()) { - _component = _componentLocator.GetElement(); - if (!_component) _componentLocator.Progress(); - } - } - } - while (!_component && _sliceLocator.IsValid()); - } - } + if (_component) { + _component = NULL; + do { + _componentLocator.Progress(); + _component = _componentLocator.GetElement(); + } + while (!_component && _componentLocator.IsValid()); + if (!_component) { + do { + _sliceLocator.Progress(); + Slice* slice = _sliceLocator.GetElement(); + if (slice) { + _componentLocator = slice->GetComponents().GetLocator(); + while (!_component && _componentLocator.IsValid()) { + _component = _componentLocator.GetElement(); + if (!_component) _componentLocator.Progress(); + } + } + } + while (!_component && _sliceLocator.IsValid()); + } + } } string Cell_Components::Locator::_GetString() const // ************************************************ { - string s = "<" + _TName("Cell::Components::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::Components::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1706,63 +1706,63 @@ string Cell_Components::Locator::_GetString() const Cell_ComponentsUnder::Cell_ComponentsUnder() // ***************************************** -: Inherit(), - _cell(NULL), - _area(), - _mask(0) +: Inherit(), + _cell(NULL), + _area(), + _mask(0) { } Cell_ComponentsUnder::Cell_ComponentsUnder(const Cell* cell, const Box& area, const Layer::Mask& mask) // *************************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _mask(mask) +: Inherit(), + _cell(cell), + _area(area), + _mask(mask) { } Cell_ComponentsUnder::Cell_ComponentsUnder(const Cell_ComponentsUnder& components) // ******************************************************************************* -: Inherit(), - _cell(components._cell), - _area(components._area), - _mask(components._mask) +: Inherit(), + _cell(components._cell), + _area(components._area), + _mask(components._mask) { } Cell_ComponentsUnder& Cell_ComponentsUnder::operator=(const Cell_ComponentsUnder& components) // ****************************************************************************************** { - _cell = components._cell; - _area = components._area; - _mask = components._mask; - return *this; + _cell = components._cell; + _area = components._area; + _mask = components._mask; + return *this; } Collection* Cell_ComponentsUnder::GetClone() const // *********************************************************** { - return new Cell_ComponentsUnder(*this); + return new Cell_ComponentsUnder(*this); } Locator* Cell_ComponentsUnder::GetLocator() const // ********************************************************** { - return new Locator(_cell, _area, _mask); + return new Locator(_cell, _area, _mask); } string Cell_ComponentsUnder::_GetString() const // ******************************************** { - string s = "<" + _TName("Cell::ComponentsUnder"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentsUnder"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1773,115 +1773,115 @@ string Cell_ComponentsUnder::_GetString() const Cell_ComponentsUnder::Locator::Locator() // ************************************* -: Inherit(), - _cell(NULL), - _area(), - _mask(0), - _sliceLocator(), - _componentLocator(), - _component(NULL) +: Inherit(), + _cell(NULL), + _area(), + _mask(0), + _sliceLocator(), + _componentLocator(), + _component(NULL) { } Cell_ComponentsUnder::Locator::Locator(const Cell* cell, const Box& area, const Layer::Mask& mask) // *********************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _mask(mask), - _sliceLocator(), - _componentLocator(), - _component(NULL) +: Inherit(), + _cell(cell), + _area(area), + _mask(mask), + _sliceLocator(), + _componentLocator(), + _component(NULL) { - if (_cell && !_area.isEmpty()) { - _sliceLocator = _cell->GetSlices(_mask).GetLocator(); - while (!_component && _sliceLocator.IsValid()) { - Slice* slice = _sliceLocator.GetElement(); - if (slice) { - _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); - if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); - } - if (!_component) _sliceLocator.Progress(); - } - } + if (_cell && !_area.isEmpty()) { + _sliceLocator = _cell->GetSlices(_mask).GetLocator(); + while (!_component && _sliceLocator.IsValid()) { + Slice* slice = _sliceLocator.GetElement(); + if (slice) { + _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); + if (_componentLocator.IsValid()) + _component = _componentLocator.GetElement(); + } + if (!_component) _sliceLocator.Progress(); + } + } } Cell_ComponentsUnder::Locator::Locator(const Locator& locator) // *********************************************************** -: Inherit(), - _cell(locator._cell), - _area(locator._area), - _mask(locator._mask), - _sliceLocator(locator._sliceLocator), - _componentLocator(locator._componentLocator), - _component(locator._component) +: Inherit(), + _cell(locator._cell), + _area(locator._area), + _mask(locator._mask), + _sliceLocator(locator._sliceLocator), + _componentLocator(locator._componentLocator), + _component(locator._component) { } Cell_ComponentsUnder::Locator& Cell_ComponentsUnder::Locator::operator=(const Locator& locator) // ******************************************************************************************** { - _cell = locator._cell; - _area = locator._area; - _mask = locator._mask; - _sliceLocator = locator._sliceLocator; - _componentLocator = locator._componentLocator; - _component = locator._component; - return *this; + _cell = locator._cell; + _area = locator._area; + _mask = locator._mask; + _sliceLocator = locator._sliceLocator; + _componentLocator = locator._componentLocator; + _component = locator._component; + return *this; } Component* Cell_ComponentsUnder::Locator::GetElement() const // ********************************************************* { - return _component; + return _component; } Locator* Cell_ComponentsUnder::Locator::GetClone() const // ***************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_ComponentsUnder::Locator::IsValid() const // ************************************************ { - return (_component != NULL); + return (_component != NULL); } void Cell_ComponentsUnder::Locator::Progress() // ******************************************* { - if (_component) { - _component = NULL; - _componentLocator.Progress(); - if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); - else { - do { - _sliceLocator.Progress(); - Slice* slice = _sliceLocator.GetElement(); - if (slice) { - _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); - if (_componentLocator.IsValid()) - _component = _componentLocator.GetElement(); - } - } while (!_component && _sliceLocator.IsValid()); - } - } + if (_component) { + _component = NULL; + _componentLocator.Progress(); + if (_componentLocator.IsValid()) + _component = _componentLocator.GetElement(); + else { + do { + _sliceLocator.Progress(); + Slice* slice = _sliceLocator.GetElement(); + if (slice) { + _componentLocator = slice->GetComponentsUnder(_area).GetLocator(); + if (_componentLocator.IsValid()) + _component = _componentLocator.GetElement(); + } + } while (!_component && _sliceLocator.IsValid()); + } + } } string Cell_ComponentsUnder::Locator::_GetString() const // ***************************************************** { - string s = "<" + _TName("Cell::ComponentsUnder::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentsUnder::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -1892,58 +1892,58 @@ string Cell_ComponentsUnder::Locator::_GetString() const Cell_Occurrences::Cell_Occurrences() // ******************************* -: Inherit(), - _cell(NULL), - _searchDepth(0) +: Inherit(), + _cell(NULL), + _searchDepth(0) { } Cell_Occurrences::Cell_Occurrences(const Cell* cell, unsigned searchDepth) // ********************************************************************* -: Inherit(), - _cell(cell), - _searchDepth(searchDepth) +: Inherit(), + _cell(cell), + _searchDepth(searchDepth) { } Cell_Occurrences::Cell_Occurrences(const Cell_Occurrences& occurrences) // **************************************************************** -: Inherit(), - _cell(occurrences._cell), - _searchDepth(occurrences._searchDepth) +: Inherit(), + _cell(occurrences._cell), + _searchDepth(occurrences._searchDepth) { } Cell_Occurrences& Cell_Occurrences::operator=(const Cell_Occurrences& occurrences) // *************************************************************************** { - _cell = occurrences._cell; - _searchDepth = occurrences._searchDepth; - return *this; + _cell = occurrences._cell; + _searchDepth = occurrences._searchDepth; + return *this; } Collection* Cell_Occurrences::GetClone() const // ***************************************************** { - return new Cell_Occurrences(*this); + return new Cell_Occurrences(*this); } Locator* Cell_Occurrences::GetLocator() const // **************************************************** { - return new Locator(_cell, _searchDepth); + return new Locator(_cell, _searchDepth); } string Cell_Occurrences::_GetString() const // *************************************** { - string s = "<" + _TName("Cell::Occurrences"); - if (_cell) { - s += " " + GetString(_cell); - if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::Occurrences"); + if (_cell) { + s += " " + GetString(_cell); + if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + } + s += ">"; + return s; } @@ -1954,209 +1954,209 @@ string Cell_Occurrences::_GetString() const Cell_Occurrences::Locator::Locator() // ******************************** -: Inherit(), - _cell(NULL), - _searchDepth(0), - _state(0), - _componentLocator(), - _rubberLocator(), - _markerLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _searchDepth(0), + _state(0), + _componentLocator(), + _rubberLocator(), + _markerLocator(), + _instanceLocator(), + _occurrenceLocator() { } Cell_Occurrences::Locator::Locator(const Cell* cell, unsigned searchDepth) // ********************************************************************** -: Inherit(), - _cell(cell), - _searchDepth(searchDepth), - _state(0), - _componentLocator(), - _rubberLocator(), - _markerLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _searchDepth(searchDepth), + _state(0), + _componentLocator(), + _rubberLocator(), + _markerLocator(), + _instanceLocator(), + _occurrenceLocator() { - if (_cell) { - _componentLocator = _cell->GetComponents().GetLocator(); - if (_componentLocator.IsValid()) - _state = 1; - else { - _rubberLocator = _cell->GetRubbers().GetLocator(); - if (_rubberLocator.IsValid()) - _state = 2; - else { - _markerLocator = _cell->GetMarkers().GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstances().GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - } - } - } - } + if (_cell) { + _componentLocator = _cell->GetComponents().GetLocator(); + if (_componentLocator.IsValid()) + _state = 1; + else { + _rubberLocator = _cell->GetRubbers().GetLocator(); + if (_rubberLocator.IsValid()) + _state = 2; + else { + _markerLocator = _cell->GetMarkers().GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstances().GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + } + } + } + } } Cell_Occurrences::Locator::Locator(const Locator& locator) // ****************************************************** -: Inherit(), - _cell(locator._cell), - _searchDepth(locator._searchDepth), - _state(locator._state), - _componentLocator(locator._componentLocator), - _rubberLocator(locator._rubberLocator), - _markerLocator(locator._markerLocator), - _instanceLocator(locator._instanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _searchDepth(locator._searchDepth), + _state(locator._state), + _componentLocator(locator._componentLocator), + _rubberLocator(locator._rubberLocator), + _markerLocator(locator._markerLocator), + _instanceLocator(locator._instanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_Occurrences::Locator& Cell_Occurrences::Locator::operator=(const Locator& locator) // ********************************************************************************** { - _cell = locator._cell; - _searchDepth = locator._searchDepth; - _state = locator._state; - _componentLocator = locator._componentLocator; - _rubberLocator = locator._rubberLocator; - _markerLocator = locator._markerLocator; - _instanceLocator = locator._instanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _searchDepth = locator._searchDepth; + _state = locator._state; + _componentLocator = locator._componentLocator; + _rubberLocator = locator._rubberLocator; + _markerLocator = locator._markerLocator; + _instanceLocator = locator._instanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } 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 5 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + 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 5 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_Occurrences::Locator::GetClone() const // *********************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_Occurrences::Locator::IsValid() const // ******************************************* { - return (_state != 0); + return (_state != 0); } void Cell_Occurrences::Locator::Progress() // ************************************** { - if (_state) { - switch (_state) { - case 1 : - _componentLocator.Progress(); - if (!_componentLocator.IsValid()) { - _rubberLocator = _cell->GetRubbers().GetLocator(); - if (_rubberLocator.IsValid()) - _state = 2; - else { - _markerLocator = _cell->GetMarkers().GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstances().GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - } - } - break; - case 2 : - _rubberLocator.Progress(); - if (!_rubberLocator.IsValid()) { - _markerLocator = _cell->GetMarkers().GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstances().GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - } - break; - case 3 : - _markerLocator.Progress(); - if (!_markerLocator.IsValid()) { - _instanceLocator = _cell->GetInstances().GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - break; - case 4 : - if (!_searchDepth) { - _instanceLocator.Progress(); - if (!_instanceLocator.IsValid()) _state = 0; - } - else { - Instance* instance = _instanceLocator.GetElement(); - if (instance->IsTerminal()) { - _instanceLocator.Progress(); - if (!_instanceLocator.IsValid()) _state = 0; - } - else { - _occurrenceLocator = - instance->GetMasterCell()->GetOccurrences(_searchDepth - 1).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 5; - else { - _instanceLocator.Progress(); - if (!_instanceLocator.IsValid()) _state = 0; - } - } - } - break; - case 5 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _instanceLocator.Progress(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _componentLocator.Progress(); + if (!_componentLocator.IsValid()) { + _rubberLocator = _cell->GetRubbers().GetLocator(); + if (_rubberLocator.IsValid()) + _state = 2; + else { + _markerLocator = _cell->GetMarkers().GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstances().GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + } + } + break; + case 2 : + _rubberLocator.Progress(); + if (!_rubberLocator.IsValid()) { + _markerLocator = _cell->GetMarkers().GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstances().GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + } + break; + case 3 : + _markerLocator.Progress(); + if (!_markerLocator.IsValid()) { + _instanceLocator = _cell->GetInstances().GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + break; + case 4 : + if (!_searchDepth) { + _instanceLocator.Progress(); + if (!_instanceLocator.IsValid()) _state = 0; + } + else { + Instance* instance = _instanceLocator.GetElement(); + if (instance->IsTerminal()) { + _instanceLocator.Progress(); + if (!_instanceLocator.IsValid()) _state = 0; + } + else { + _occurrenceLocator = + instance->GetMasterCell()->GetOccurrences(_searchDepth - 1).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 5; + else { + _instanceLocator.Progress(); + if (!_instanceLocator.IsValid()) _state = 0; + } + } + } + break; + case 5 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _instanceLocator.Progress(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + break; + } + } } 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 += ">"; - return s; + string s = "<" + _TName("Cell::Occurrences::Locator"); + if (_cell) { + s += " " + GetString(_cell); + if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + } + s += ">"; + return s; } @@ -2167,63 +2167,63 @@ string Cell_Occurrences::Locator::_GetString() const Cell_OccurrencesUnder::Cell_OccurrencesUnder() // ***************************************** -: Inherit(), - _cell(NULL), - _area(), - _searchDepth(0) +: Inherit(), + _cell(NULL), + _area(), + _searchDepth(0) { } Cell_OccurrencesUnder::Cell_OccurrencesUnder(const Cell* cell, const Box& area, unsigned searchDepth) // ************************************************************************************************ -: Inherit(), - _cell(cell), - _area(area), - _searchDepth(searchDepth) +: Inherit(), + _cell(cell), + _area(area), + _searchDepth(searchDepth) { } Cell_OccurrencesUnder::Cell_OccurrencesUnder(const Cell_OccurrencesUnder& occurrences) // ******************************************************************************* -: Inherit(), - _cell(occurrences._cell), - _area(occurrences._area), - _searchDepth(occurrences._searchDepth) +: Inherit(), + _cell(occurrences._cell), + _area(occurrences._area), + _searchDepth(occurrences._searchDepth) { } Cell_OccurrencesUnder& Cell_OccurrencesUnder::operator=(const Cell_OccurrencesUnder& occurrences) // ****************************************************************************************** { - _cell = occurrences._cell; - _area = occurrences._area; - _searchDepth = occurrences._searchDepth; - return *this; + _cell = occurrences._cell; + _area = occurrences._area; + _searchDepth = occurrences._searchDepth; + return *this; } Collection* Cell_OccurrencesUnder::GetClone() const // ********************************************************** { - return new Cell_OccurrencesUnder(*this); + return new Cell_OccurrencesUnder(*this); } Locator* Cell_OccurrencesUnder::GetLocator() const // ********************************************************* { - return new Locator(_cell, _area, _searchDepth); + return new Locator(_cell, _area, _searchDepth); } 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 += ">"; - return s; + string s = "<" + _TName("Cell::OccurrencesUnder"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + } + s += ">"; + return s; } @@ -2234,217 +2234,217 @@ string Cell_OccurrencesUnder::_GetString() const Cell_OccurrencesUnder::Locator::Locator() // ************************************* -: Inherit(), - _cell(NULL), - _area(), - _searchDepth(0), - _state(0), - _componentLocator(), - _rubberLocator(), - _markerLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _area(), + _searchDepth(0), + _state(0), + _componentLocator(), + _rubberLocator(), + _markerLocator(), + _instanceLocator(), + _occurrenceLocator() { } Cell_OccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area, unsigned searchDepth) // ******************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _searchDepth(searchDepth), - _state(0), - _componentLocator(), - _rubberLocator(), - _markerLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _area(area), + _searchDepth(searchDepth), + _state(0), + _componentLocator(), + _rubberLocator(), + _markerLocator(), + _instanceLocator(), + _occurrenceLocator() { - if (_cell && !_area.isEmpty()) { - _componentLocator = _cell->GetComponentsUnder(_area).GetLocator(); - if (_componentLocator.IsValid()) - _state = 1; - else { - _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); - if (_rubberLocator.IsValid()) - _state = 2; - else { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - } - } - } - } + if (_cell && !_area.isEmpty()) { + _componentLocator = _cell->GetComponentsUnder(_area).GetLocator(); + if (_componentLocator.IsValid()) + _state = 1; + else { + _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); + if (_rubberLocator.IsValid()) + _state = 2; + else { + _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + } + } + } + } } Cell_OccurrencesUnder::Locator::Locator(const Locator& locator) // *********************************************************** -: Inherit(), - _cell(locator._cell), - _area(locator._area), - _searchDepth(locator._searchDepth), - _state(locator._state), - _componentLocator(locator._componentLocator), - _rubberLocator(locator._rubberLocator), - _markerLocator(locator._markerLocator), - _instanceLocator(locator._instanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _area(locator._area), + _searchDepth(locator._searchDepth), + _state(locator._state), + _componentLocator(locator._componentLocator), + _rubberLocator(locator._rubberLocator), + _markerLocator(locator._markerLocator), + _instanceLocator(locator._instanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_OccurrencesUnder::Locator& Cell_OccurrencesUnder::Locator::operator=(const Locator& locator) // ******************************************************************************************** { - _cell = locator._cell; - _area = locator._area; - _searchDepth = locator._searchDepth; - _state = locator._state; - _componentLocator = locator._componentLocator; - _rubberLocator = locator._rubberLocator; - _markerLocator = locator._markerLocator; - _instanceLocator = locator._instanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _area = locator._area; + _searchDepth = locator._searchDepth; + _state = locator._state; + _componentLocator = locator._componentLocator; + _rubberLocator = locator._rubberLocator; + _markerLocator = locator._markerLocator; + _instanceLocator = locator._instanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } 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 5 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + 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 5 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_OccurrencesUnder::Locator::GetClone() const // **************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_OccurrencesUnder::Locator::IsValid() const // ************************************************ { - return (_state != 0); + return (_state != 0); } void Cell_OccurrencesUnder::Locator::Progress() // ******************************************* { - if (_state) { - switch (_state) { - case 1 : - _componentLocator.Progress(); - if (!_componentLocator.IsValid()) { - _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); - if (_rubberLocator.IsValid()) - _state = 2; - else { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - } - } - break; - case 2 : - _rubberLocator.Progress(); - if (!_rubberLocator.IsValid()) { - _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); - if (_markerLocator.IsValid()) - _state = 3; - else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - } - break; - case 3 : - _markerLocator.Progress(); - if (!_markerLocator.IsValid()) { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - break; - case 4 : - if (!_searchDepth) { - _instanceLocator.Progress(); - if (!_instanceLocator.IsValid()) _state = 0; - } - else { - 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(); - _occurrenceLocator = - masterCell->GetOccurrencesUnder(masterArea, _searchDepth - 1).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 5; - else { - _instanceLocator.Progress(); - if (!_instanceLocator.IsValid()) _state = 0; - } - } - } - break; - case 5 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _instanceLocator.Progress(); - if (_instanceLocator.IsValid()) - _state = 4; - else - _state = 0; - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _componentLocator.Progress(); + if (!_componentLocator.IsValid()) { + _rubberLocator = _cell->GetRubbersUnder(_area).GetLocator(); + if (_rubberLocator.IsValid()) + _state = 2; + else { + _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + } + } + break; + case 2 : + _rubberLocator.Progress(); + if (!_rubberLocator.IsValid()) { + _markerLocator = _cell->GetMarkersUnder(_area).GetLocator(); + if (_markerLocator.IsValid()) + _state = 3; + else { + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + } + break; + case 3 : + _markerLocator.Progress(); + if (!_markerLocator.IsValid()) { + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + break; + case 4 : + if (!_searchDepth) { + _instanceLocator.Progress(); + if (!_instanceLocator.IsValid()) _state = 0; + } + else { + 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(); + _occurrenceLocator = + masterCell->GetOccurrencesUnder(masterArea, _searchDepth - 1).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 5; + else { + _instanceLocator.Progress(); + if (!_instanceLocator.IsValid()) _state = 0; + } + } + } + break; + case 5 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _instanceLocator.Progress(); + if (_instanceLocator.IsValid()) + _state = 4; + else + _state = 0; + } + break; + } + } } 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 += ">"; - return s; + string s = "<" + _TName("Cell::OccurrencesUnder::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + if (_searchDepth != ((unsigned)-1)) s += " " + GetString(_searchDepth); + } + s += ">"; + return s; } // **************************************************************************************************** @@ -2453,44 +2453,44 @@ string Cell_OccurrencesUnder::Locator::_GetString() const Cell_LeafInstanceOccurrences::Cell_LeafInstanceOccurrences(const Cell* cell) // ******************************************************************************* -: Inherit(), - _cell(cell) +: Inherit(), + _cell(cell) { } Cell_LeafInstanceOccurrences::Cell_LeafInstanceOccurrences(const Cell_LeafInstanceOccurrences& occurrences) // **************************************************************************************************** -: Inherit(), - _cell(occurrences._cell) +: Inherit(), + _cell(occurrences._cell) { } Cell_LeafInstanceOccurrences& Cell_LeafInstanceOccurrences::operator=(const Cell_LeafInstanceOccurrences& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - return *this; + _cell = occurrences._cell; + return *this; } Collection* Cell_LeafInstanceOccurrences::GetClone() const // ********************************************************************* { - return new Cell_LeafInstanceOccurrences(*this); + return new Cell_LeafInstanceOccurrences(*this); } Locator* Cell_LeafInstanceOccurrences::GetLocator() const // ******************************************************************** { - return new Locator(_cell); + return new Locator(_cell); } string Cell_LeafInstanceOccurrences::_GetString() const // ******************************************************* { - string s = "<" + _TName("Cell::LeafInstanceOccurrences"); - if (_cell) s += " " + GetString(_cell); - s += ">"; - return s; + string s = "<" + _TName("Cell::LeafInstanceOccurrences"); + if (_cell) s += " " + GetString(_cell); + s += ">"; + return s; } @@ -2501,131 +2501,131 @@ string Cell_LeafInstanceOccurrences::_GetString() const Cell_LeafInstanceOccurrences::Locator::Locator(const Cell* cell) // **************************************************************** -: Inherit(), - _cell(cell), - _state(0), - _leafInstanceLocator(), - _nonLeafInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _state(0), + _leafInstanceLocator(), + _nonLeafInstanceLocator(), + _occurrenceLocator() { - if (_cell) { - _leafInstanceLocator = _cell->GetLeafInstances().GetLocator(); - if (_leafInstanceLocator.IsValid()) - _state = 1; - else { - _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - } + if (_cell) { + _leafInstanceLocator = _cell->GetLeafInstances().GetLocator(); + if (_leafInstanceLocator.IsValid()) + _state = 1; + else { + _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + } } Cell_LeafInstanceOccurrences::Locator::Locator(const Locator& locator) // ********************************************************************** -: Inherit(), - _cell(locator._cell), - _state(locator._state), - _leafInstanceLocator(locator._leafInstanceLocator), - _nonLeafInstanceLocator(locator._nonLeafInstanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _state(locator._state), + _leafInstanceLocator(locator._leafInstanceLocator), + _nonLeafInstanceLocator(locator._nonLeafInstanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_LeafInstanceOccurrences::Locator& Cell_LeafInstanceOccurrences::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _state = locator._state; - _leafInstanceLocator = locator._leafInstanceLocator; - _nonLeafInstanceLocator = locator._nonLeafInstanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _state = locator._state; + _leafInstanceLocator = locator._leafInstanceLocator; + _nonLeafInstanceLocator = locator._nonLeafInstanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_LeafInstanceOccurrences::Locator::GetElement() const // ******************************************************************* { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_leafInstanceLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_leafInstanceLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_LeafInstanceOccurrences::Locator::GetClone() const // *************************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_LeafInstanceOccurrences::Locator::IsValid() const // *********************************************************** { - return (_state != 0); + return (_state != 0); } void Cell_LeafInstanceOccurrences::Locator::Progress() // ****************************************************** { - if (_state) { - switch (_state) { - case 1 : - _leafInstanceLocator.Progress(); - if (!_leafInstanceLocator.IsValid()) { - _state = 0; - _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_nonLeafInstanceLocator.IsValid()) { - _nonLeafInstanceLocator.Progress(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = - masterCell->GetLeafInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _leafInstanceLocator.Progress(); + if (!_leafInstanceLocator.IsValid()) { + _state = 0; + _nonLeafInstanceLocator = _cell->GetNonLeafInstances().GetLocator(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetLeafInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_nonLeafInstanceLocator.IsValid()) { + _nonLeafInstanceLocator.Progress(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Cell* masterCell = _nonLeafInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = + masterCell->GetLeafInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_LeafInstanceOccurrences::Locator::_GetString() const // **************************************************************** { - string s = "<" + _TName("Cell::LeafInstanceOccurrences::Locator"); - if (_cell) s += " " + GetString(_cell); - s += ">"; - return s; + string s = "<" + _TName("Cell::LeafInstanceOccurrences::Locator"); + if (_cell) s += " " + GetString(_cell); + s += ">"; + return s; } @@ -2636,58 +2636,58 @@ string Cell_LeafInstanceOccurrences::Locator::_GetString() const Cell_LeafInstanceOccurrencesUnder::Cell_LeafInstanceOccurrencesUnder() // ************************************************************************* -: Inherit(), - _cell(NULL), - _area() +: Inherit(), + _cell(NULL), + _area() { } Cell_LeafInstanceOccurrencesUnder::Cell_LeafInstanceOccurrencesUnder(const Cell* cell, const Box& area) // **************************************************************************************************** -: Inherit(), - _cell(cell), - _area(area) +: Inherit(), + _cell(cell), + _area(area) { } Cell_LeafInstanceOccurrencesUnder::Cell_LeafInstanceOccurrencesUnder(const Cell_LeafInstanceOccurrencesUnder& occurrences) // **************************************************************************************************** -: Inherit(), - _cell(occurrences._cell), - _area(occurrences._area) +: Inherit(), + _cell(occurrences._cell), + _area(occurrences._area) { } Cell_LeafInstanceOccurrencesUnder& Cell_LeafInstanceOccurrencesUnder::operator=(const Cell_LeafInstanceOccurrencesUnder& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - _area = occurrences._area; - return *this; + _cell = occurrences._cell; + _area = occurrences._area; + return *this; } Collection* Cell_LeafInstanceOccurrencesUnder::GetClone() const // ************************************************************************** { - return new Cell_LeafInstanceOccurrencesUnder(*this); + return new Cell_LeafInstanceOccurrencesUnder(*this); } Locator* Cell_LeafInstanceOccurrencesUnder::GetLocator() const // ************************************************************************* { - return new Locator(_cell, _area); + return new Locator(_cell, _area); } string Cell_LeafInstanceOccurrencesUnder::_GetString() const // ************************************************************ { - string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + } + s += ">"; + return s; } @@ -2698,160 +2698,160 @@ string Cell_LeafInstanceOccurrencesUnder::_GetString() const Cell_LeafInstanceOccurrencesUnder::Locator::Locator() // ***************************************************** -: Inherit(), - _cell(NULL), - _area(), - _state(0), - _leafInstanceLocator(), - _nonLeafInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _area(), + _state(0), + _leafInstanceLocator(), + _nonLeafInstanceLocator(), + _occurrenceLocator() { } Cell_LeafInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area) // ************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _state(0), - _leafInstanceLocator(), - _nonLeafInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _area(area), + _state(0), + _leafInstanceLocator(), + _nonLeafInstanceLocator(), + _occurrenceLocator() { - if (_cell && !_area.isEmpty()) { - _leafInstanceLocator = _cell->GetLeafInstancesUnder(_area).GetLocator(); - if (_leafInstanceLocator.IsValid()) - _state = 1; - else { - _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - } + if (_cell && !_area.isEmpty()) { + _leafInstanceLocator = _cell->GetLeafInstancesUnder(_area).GetLocator(); + if (_leafInstanceLocator.IsValid()) + _state = 1; + else { + _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Instance* instance = _nonLeafInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + } } Cell_LeafInstanceOccurrencesUnder::Locator::Locator(const Locator& locator) // *************************************************************************** -: Inherit(), - _cell(locator._cell), - _area(locator._area), - _state(locator._state), - _leafInstanceLocator(locator._leafInstanceLocator), - _nonLeafInstanceLocator(locator._nonLeafInstanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _area(locator._area), + _state(locator._state), + _leafInstanceLocator(locator._leafInstanceLocator), + _nonLeafInstanceLocator(locator._nonLeafInstanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_LeafInstanceOccurrencesUnder::Locator& Cell_LeafInstanceOccurrencesUnder::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _area = locator._area; - _state = locator._state; - _leafInstanceLocator = locator._leafInstanceLocator; - _nonLeafInstanceLocator = locator._nonLeafInstanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _area = locator._area; + _state = locator._state; + _leafInstanceLocator = locator._leafInstanceLocator; + _nonLeafInstanceLocator = locator._nonLeafInstanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_LeafInstanceOccurrencesUnder::Locator::GetElement() const // ************************************************************************ { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_leafInstanceLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_leafInstanceLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_nonLeafInstanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_LeafInstanceOccurrencesUnder::Locator::GetClone() const // ******************************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_LeafInstanceOccurrencesUnder::Locator::IsValid() const // **************************************************************** { - return (_state != 0); + return (_state != 0); } void Cell_LeafInstanceOccurrencesUnder::Locator::Progress() // *********************************************************** { - if (_state) { - switch (_state) { - case 1 : - _leafInstanceLocator.Progress(); - if (!_leafInstanceLocator.IsValid()) { - _state = 0; - _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_nonLeafInstanceLocator.IsValid()) { - _nonLeafInstanceLocator.Progress(); - while (!_state && _nonLeafInstanceLocator.IsValid()) { - Instance* instance = _nonLeafInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonLeafInstanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _leafInstanceLocator.Progress(); + if (!_leafInstanceLocator.IsValid()) { + _state = 0; + _nonLeafInstanceLocator = _cell->GetNonLeafInstancesUnder(_area).GetLocator(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Instance* instance = _nonLeafInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_nonLeafInstanceLocator.IsValid()) { + _nonLeafInstanceLocator.Progress(); + while (!_state && _nonLeafInstanceLocator.IsValid()) { + Instance* instance = _nonLeafInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetLeafInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonLeafInstanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_LeafInstanceOccurrencesUnder::Locator::_GetString() const // ********************************************************************* { - string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::LeafInstanceOccurrencesUnder::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + } + s += ">"; + return s; } @@ -2862,44 +2862,44 @@ string Cell_LeafInstanceOccurrencesUnder::Locator::_GetString() const Cell_TerminalInstanceOccurrences::Cell_TerminalInstanceOccurrences(const Cell* cell) // ******************************************************************************* -: Inherit(), - _cell(cell) +: Inherit(), + _cell(cell) { } Cell_TerminalInstanceOccurrences::Cell_TerminalInstanceOccurrences(const Cell_TerminalInstanceOccurrences& occurrences) // **************************************************************************************************** -: Inherit(), - _cell(occurrences._cell) +: Inherit(), + _cell(occurrences._cell) { } Cell_TerminalInstanceOccurrences& Cell_TerminalInstanceOccurrences::operator=(const Cell_TerminalInstanceOccurrences& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - return *this; + _cell = occurrences._cell; + return *this; } Collection* Cell_TerminalInstanceOccurrences::GetClone() const // ********************************************************************* { - return new Cell_TerminalInstanceOccurrences(*this); + return new Cell_TerminalInstanceOccurrences(*this); } Locator* Cell_TerminalInstanceOccurrences::GetLocator() const // ******************************************************************** { - return new Locator(_cell); + return new Locator(_cell); } string Cell_TerminalInstanceOccurrences::_GetString() const // ******************************************************* { - string s = "<" + _TName("Cell::TerminalInstanceOccurrences"); - if (_cell) s += " " + GetString(_cell); - s += ">"; - return s; + string s = "<" + _TName("Cell::TerminalInstanceOccurrences"); + if (_cell) s += " " + GetString(_cell); + s += ">"; + return s; } @@ -2910,131 +2910,131 @@ string Cell_TerminalInstanceOccurrences::_GetString() const Cell_TerminalInstanceOccurrences::Locator::Locator(const Cell* cell) // **************************************************************** -: Inherit(), - _cell(cell), - _state(0), - _terminalInstanceLocator(), - _nonTerminalInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _state(0), + _terminalInstanceLocator(), + _nonTerminalInstanceLocator(), + _occurrenceLocator() { - if (_cell) { - _terminalInstanceLocator = _cell->GetTerminalInstances().GetLocator(); - if (_terminalInstanceLocator.IsValid()) - _state = 1; - else { - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - } + if (_cell) { + _terminalInstanceLocator = _cell->GetTerminalInstances().GetLocator(); + if (_terminalInstanceLocator.IsValid()) + _state = 1; + else { + _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + } } Cell_TerminalInstanceOccurrences::Locator::Locator(const Locator& locator) // ********************************************************************** -: Inherit(), - _cell(locator._cell), - _state(locator._state), - _terminalInstanceLocator(locator._terminalInstanceLocator), - _nonTerminalInstanceLocator(locator._nonTerminalInstanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _state(locator._state), + _terminalInstanceLocator(locator._terminalInstanceLocator), + _nonTerminalInstanceLocator(locator._nonTerminalInstanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_TerminalInstanceOccurrences::Locator& Cell_TerminalInstanceOccurrences::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _state = locator._state; - _terminalInstanceLocator = locator._terminalInstanceLocator; - _nonTerminalInstanceLocator = locator._nonTerminalInstanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _state = locator._state; + _terminalInstanceLocator = locator._terminalInstanceLocator; + _nonTerminalInstanceLocator = locator._nonTerminalInstanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_TerminalInstanceOccurrences::Locator::GetElement() const // ******************************************************************* { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_TerminalInstanceOccurrences::Locator::GetClone() const // *************************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_TerminalInstanceOccurrences::Locator::IsValid() const // *********************************************************** { - return (_state != 0); + return (_state != 0); } void Cell_TerminalInstanceOccurrences::Locator::Progress() // ****************************************************** { - if (_state) { - switch (_state) { - case 1 : - _terminalInstanceLocator.Progress(); - if (!_terminalInstanceLocator.IsValid()) { - _state = 0; - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_nonTerminalInstanceLocator.IsValid()) { - _nonTerminalInstanceLocator.Progress(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrences().GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _terminalInstanceLocator.Progress(); + if (!_terminalInstanceLocator.IsValid()) { + _state = 0; + _nonTerminalInstanceLocator = _cell->GetNonTerminalInstances().GetLocator(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetTerminalInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_nonTerminalInstanceLocator.IsValid()) { + _nonTerminalInstanceLocator.Progress(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Cell* masterCell = _nonTerminalInstanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = + masterCell->GetTerminalInstanceOccurrences().GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_TerminalInstanceOccurrences::Locator::_GetString() const // **************************************************************** { - string s = "<" + _TName("Cell::TerminalInstanceOccurrences::Locator"); - if (_cell) s += " " + GetString(_cell); - s += ">"; - return s; + string s = "<" + _TName("Cell::TerminalInstanceOccurrences::Locator"); + if (_cell) s += " " + GetString(_cell); + s += ">"; + return s; } @@ -3045,58 +3045,58 @@ string Cell_TerminalInstanceOccurrences::Locator::_GetString() const Cell_TerminalInstanceOccurrencesUnder::Cell_TerminalInstanceOccurrencesUnder() // ************************************************************************* -: Inherit(), - _cell(NULL), - _area() +: Inherit(), + _cell(NULL), + _area() { } Cell_TerminalInstanceOccurrencesUnder::Cell_TerminalInstanceOccurrencesUnder(const Cell* cell, const Box& area) // **************************************************************************************************** -: Inherit(), - _cell(cell), - _area(area) +: Inherit(), + _cell(cell), + _area(area) { } Cell_TerminalInstanceOccurrencesUnder::Cell_TerminalInstanceOccurrencesUnder(const Cell_TerminalInstanceOccurrencesUnder& occurrences) // **************************************************************************************************** -: Inherit(), - _cell(occurrences._cell), - _area(occurrences._area) +: Inherit(), + _cell(occurrences._cell), + _area(occurrences._area) { } Cell_TerminalInstanceOccurrencesUnder& Cell_TerminalInstanceOccurrencesUnder::operator=(const Cell_TerminalInstanceOccurrencesUnder& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - _area = occurrences._area; - return *this; + _cell = occurrences._cell; + _area = occurrences._area; + return *this; } Collection* Cell_TerminalInstanceOccurrencesUnder::GetClone() const // ************************************************************************** { - return new Cell_TerminalInstanceOccurrencesUnder(*this); + return new Cell_TerminalInstanceOccurrencesUnder(*this); } Locator* Cell_TerminalInstanceOccurrencesUnder::GetLocator() const // ************************************************************************* { - return new Locator(_cell, _area); + return new Locator(_cell, _area); } string Cell_TerminalInstanceOccurrencesUnder::_GetString() const // ************************************************************ { - string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + } + s += ">"; + return s; } @@ -3107,160 +3107,160 @@ string Cell_TerminalInstanceOccurrencesUnder::_GetString() const Cell_TerminalInstanceOccurrencesUnder::Locator::Locator() // ***************************************************** -: Inherit(), - _cell(NULL), - _area(), - _state(0), - _terminalInstanceLocator(), - _nonTerminalInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _area(), + _state(0), + _terminalInstanceLocator(), + _nonTerminalInstanceLocator(), + _occurrenceLocator() { } Cell_TerminalInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area) // ************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _state(0), - _terminalInstanceLocator(), - _nonTerminalInstanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _area(area), + _state(0), + _terminalInstanceLocator(), + _nonTerminalInstanceLocator(), + _occurrenceLocator() { - if (_cell && !_area.isEmpty()) { - _terminalInstanceLocator = _cell->GetTerminalInstancesUnder(_area).GetLocator(); - if (_terminalInstanceLocator.IsValid()) - _state = 1; - else { - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - } + if (_cell && !_area.isEmpty()) { + _terminalInstanceLocator = _cell->GetTerminalInstancesUnder(_area).GetLocator(); + if (_terminalInstanceLocator.IsValid()) + _state = 1; + else { + _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Instance* instance = _nonTerminalInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + } } Cell_TerminalInstanceOccurrencesUnder::Locator::Locator(const Locator& locator) // *************************************************************************** -: Inherit(), - _cell(locator._cell), - _area(locator._area), - _state(locator._state), - _terminalInstanceLocator(locator._terminalInstanceLocator), - _nonTerminalInstanceLocator(locator._nonTerminalInstanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _area(locator._area), + _state(locator._state), + _terminalInstanceLocator(locator._terminalInstanceLocator), + _nonTerminalInstanceLocator(locator._nonTerminalInstanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_TerminalInstanceOccurrencesUnder::Locator& Cell_TerminalInstanceOccurrencesUnder::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _area = locator._area; - _state = locator._state; - _terminalInstanceLocator = locator._terminalInstanceLocator; - _nonTerminalInstanceLocator = locator._nonTerminalInstanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _area = locator._area; + _state = locator._state; + _terminalInstanceLocator = locator._terminalInstanceLocator; + _nonTerminalInstanceLocator = locator._nonTerminalInstanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_TerminalInstanceOccurrencesUnder::Locator::GetElement() const // ************************************************************************ { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_terminalInstanceLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_nonTerminalInstanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_TerminalInstanceOccurrencesUnder::Locator::GetClone() const // ******************************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_TerminalInstanceOccurrencesUnder::Locator::IsValid() const // **************************************************************** { - return (_state != 0); + return (_state != 0); } void Cell_TerminalInstanceOccurrencesUnder::Locator::Progress() // *********************************************************** { - if (_state) { - switch (_state) { - case 1 : - _terminalInstanceLocator.Progress(); - if (!_terminalInstanceLocator.IsValid()) { - _state = 0; - _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_nonTerminalInstanceLocator.IsValid()) { - _nonTerminalInstanceLocator.Progress(); - while (!_state && _nonTerminalInstanceLocator.IsValid()) { - Instance* instance = _nonTerminalInstanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _nonTerminalInstanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _terminalInstanceLocator.Progress(); + if (!_terminalInstanceLocator.IsValid()) { + _state = 0; + _nonTerminalInstanceLocator = _cell->GetNonTerminalInstancesUnder(_area).GetLocator(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Instance* instance = _nonTerminalInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_nonTerminalInstanceLocator.IsValid()) { + _nonTerminalInstanceLocator.Progress(); + while (!_state && _nonTerminalInstanceLocator.IsValid()) { + Instance* instance = _nonTerminalInstanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetTerminalInstanceOccurrencesUnder(masterArea).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _nonTerminalInstanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_TerminalInstanceOccurrencesUnder::Locator::_GetString() const // ********************************************************************* { - string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::TerminalInstanceOccurrencesUnder::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + } + s += ">"; + return s; } @@ -3271,58 +3271,58 @@ string Cell_TerminalInstanceOccurrencesUnder::Locator::_GetString() const Cell_ComponentOccurrences::Cell_ComponentOccurrences() // ************************************************* -: Inherit(), - _cell(NULL), - _mask(0) +: Inherit(), + _cell(NULL), + _mask(0) { } Cell_ComponentOccurrences::Cell_ComponentOccurrences(const Cell* cell, const Layer::Mask& mask) // ****************************************************************************************** -: Inherit(), - _cell(cell), - _mask(mask) +: Inherit(), + _cell(cell), + _mask(mask) { } Cell_ComponentOccurrences::Cell_ComponentOccurrences(const Cell_ComponentOccurrences& occurrences) // ******************************************************************************************* -: Inherit(), - _cell(occurrences._cell), - _mask(occurrences._mask) +: Inherit(), + _cell(occurrences._cell), + _mask(occurrences._mask) { } Cell_ComponentOccurrences& Cell_ComponentOccurrences::operator=(const Cell_ComponentOccurrences& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - _mask = occurrences._mask; - return *this; + _cell = occurrences._cell; + _mask = occurrences._mask; + return *this; } Collection* Cell_ComponentOccurrences::GetClone() const // ************************************************************** { - return new Cell_ComponentOccurrences(*this); + return new Cell_ComponentOccurrences(*this); } Locator* Cell_ComponentOccurrences::GetLocator() const // ************************************************************* { - return new Locator(_cell, _mask); + return new Locator(_cell, _mask); } string Cell_ComponentOccurrences::_GetString() const // ************************************************ { - string s = "<" + _TName("Cell::ComponentOccurrences"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentOccurrences"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -3333,148 +3333,148 @@ string Cell_ComponentOccurrences::_GetString() const Cell_ComponentOccurrences::Locator::Locator() // ***************************************** -: Inherit(), - _cell(NULL), - _mask(0), - _state(0), - _componentLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _mask(0), + _state(0), + _componentLocator(), + _instanceLocator(), + _occurrenceLocator() { } Cell_ComponentOccurrences::Locator::Locator(const Cell* cell, const Layer::Mask& mask) // ********************************************************************************** -: Inherit(), - _cell(cell), - _mask(mask), - _state(0), - _componentLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _mask(mask), + _state(0), + _componentLocator(), + _instanceLocator(), + _occurrenceLocator() { - if (_cell && (_mask != 0)) { - _componentLocator = _cell->GetComponents(_mask).GetLocator(); - if (_componentLocator.IsValid()) - _state = 1; - else { - _instanceLocator = _cell->GetInstances().GetLocator(); - while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - } + if (_cell && (_mask != 0)) { + _componentLocator = _cell->GetComponents(_mask).GetLocator(); + if (_componentLocator.IsValid()) + _state = 1; + else { + _instanceLocator = _cell->GetInstances().GetLocator(); + while (!_state && _instanceLocator.IsValid()) { + Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + } } Cell_ComponentOccurrences::Locator::Locator(const Locator& locator) // *************************************************************** -: Inherit(), - _cell(locator._cell), - _mask(locator._mask), - _state(locator._state), - _componentLocator(locator._componentLocator), - _instanceLocator(locator._instanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _mask(locator._mask), + _state(locator._state), + _componentLocator(locator._componentLocator), + _instanceLocator(locator._instanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_ComponentOccurrences::Locator& Cell_ComponentOccurrences::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _mask = locator._mask; - _state = locator._state; - _componentLocator = locator._componentLocator; - _instanceLocator = locator._instanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _mask = locator._mask; + _state = locator._state; + _componentLocator = locator._componentLocator; + _instanceLocator = locator._instanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_ComponentOccurrences::Locator::GetElement() const // ************************************************************ { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_componentLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_ComponentOccurrences::Locator::GetClone() const // ******************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_ComponentOccurrences::Locator::IsValid() const // **************************************************** { - return (_state != 0); + return (_state != 0); } void Cell_ComponentOccurrences::Locator::Progress() // *********************************************** { - if (_state) { - switch (_state) { - case 1 : - _componentLocator.Progress(); - if (!_componentLocator.IsValid()) { - _state = 0; - _instanceLocator = _cell->GetInstances().GetLocator(); - while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_instanceLocator.IsValid()) { - _instanceLocator.Progress(); - while (!_state && _instanceLocator.IsValid()) { - Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); - _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _componentLocator.Progress(); + if (!_componentLocator.IsValid()) { + _state = 0; + _instanceLocator = _cell->GetInstances().GetLocator(); + while (!_state && _instanceLocator.IsValid()) { + Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_instanceLocator.IsValid()) { + _instanceLocator.Progress(); + while (!_state && _instanceLocator.IsValid()) { + Cell* masterCell = _instanceLocator.GetElement()->GetMasterCell(); + _occurrenceLocator = masterCell->GetComponentOccurrences(_mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_ComponentOccurrences::Locator::_GetString() const // ********************************************************* { - string s = "<" + _TName("Cell::ComponentOccurrences::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentOccurrences::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -3485,63 +3485,63 @@ string Cell_ComponentOccurrences::Locator::_GetString() const Cell_ComponentOccurrencesUnder::Cell_ComponentOccurrencesUnder() // *********************************************************** -: Inherit(), - _cell(NULL), - _area(), - _mask(0) +: Inherit(), + _cell(NULL), + _area(), + _mask(0) { } Cell_ComponentOccurrencesUnder::Cell_ComponentOccurrencesUnder(const Cell* cell, const Box& area, const Layer::Mask& mask) // **************************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _mask(mask) +: Inherit(), + _cell(cell), + _area(area), + _mask(mask) { } Cell_ComponentOccurrencesUnder::Cell_ComponentOccurrencesUnder(const Cell_ComponentOccurrencesUnder& occurrences) // **************************************************************************************************** -: Inherit(), - _cell(occurrences._cell), - _area(occurrences._area), - _mask(occurrences._mask) +: Inherit(), + _cell(occurrences._cell), + _area(occurrences._area), + _mask(occurrences._mask) { } Cell_ComponentOccurrencesUnder& Cell_ComponentOccurrencesUnder::operator=(const Cell_ComponentOccurrencesUnder& occurrences) // **************************************************************************************************** { - _cell = occurrences._cell; - _area = occurrences._area; - _mask = occurrences._mask; - return *this; + _cell = occurrences._cell; + _area = occurrences._area; + _mask = occurrences._mask; + return *this; } Collection* Cell_ComponentOccurrencesUnder::GetClone() const // ******************************************************************* { - return new Cell_ComponentOccurrencesUnder(*this); + return new Cell_ComponentOccurrencesUnder(*this); } Locator* Cell_ComponentOccurrencesUnder::GetLocator() const // ****************************************************************** { - return new Locator(_cell, _area, _mask); + return new Locator(_cell, _area, _mask); } string Cell_ComponentOccurrencesUnder::_GetString() const // ***************************************************** { - string s = "<" + _TName("Cell::ComponentOccurrencesUnder"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentOccurrencesUnder"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + s += " " + GetString(_mask); + } + s += ">"; + return s; } @@ -3552,165 +3552,165 @@ string Cell_ComponentOccurrencesUnder::_GetString() const Cell_ComponentOccurrencesUnder::Locator::Locator() // ********************************************** -: Inherit(), - _cell(NULL), - _area(), - _mask(0), - _state(0), - _componentLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(NULL), + _area(), + _mask(0), + _state(0), + _componentLocator(), + _instanceLocator(), + _occurrenceLocator() { } Cell_ComponentOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area, const Layer::Mask& mask) // **************************************************************************************************** -: Inherit(), - _cell(cell), - _area(area), - _mask(mask), - _state(0), - _componentLocator(), - _instanceLocator(), - _occurrenceLocator() +: Inherit(), + _cell(cell), + _area(area), + _mask(mask), + _state(0), + _componentLocator(), + _instanceLocator(), + _occurrenceLocator() { - if (_cell && !_area.isEmpty() && (_mask != 0)) { - _componentLocator = _cell->GetComponentsUnder(_area, _mask).GetLocator(); - if (_componentLocator.IsValid()) - _state = 1; - else { - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - } + if (_cell && !_area.isEmpty() && (_mask != 0)) { + _componentLocator = _cell->GetComponentsUnder(_area, _mask).GetLocator(); + if (_componentLocator.IsValid()) + _state = 1; + else { + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + while (!_state && _instanceLocator.IsValid()) { + Instance* instance = _instanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + } } Cell_ComponentOccurrencesUnder::Locator::Locator(const Locator& locator) // ******************************************************************** -: Inherit(), - _cell(locator._cell), - _area(locator._area), - _mask(locator._mask), - _state(locator._state), - _componentLocator(locator._componentLocator), - _instanceLocator(locator._instanceLocator), - _occurrenceLocator(locator._occurrenceLocator) +: Inherit(), + _cell(locator._cell), + _area(locator._area), + _mask(locator._mask), + _state(locator._state), + _componentLocator(locator._componentLocator), + _instanceLocator(locator._instanceLocator), + _occurrenceLocator(locator._occurrenceLocator) { } Cell_ComponentOccurrencesUnder::Locator& Cell_ComponentOccurrencesUnder::Locator::operator=(const Locator& locator) // **************************************************************************************************** { - _cell = locator._cell; - _area = locator._area; - _mask = locator._mask; - _state = locator._state; - _componentLocator = locator._componentLocator; - _instanceLocator = locator._instanceLocator; - _occurrenceLocator = locator._occurrenceLocator; - return *this; + _cell = locator._cell; + _area = locator._area; + _mask = locator._mask; + _state = locator._state; + _componentLocator = locator._componentLocator; + _instanceLocator = locator._instanceLocator; + _occurrenceLocator = locator._occurrenceLocator; + return *this; } Occurrence Cell_ComponentOccurrencesUnder::Locator::GetElement() const // ***************************************************************** { - if (_state) { - switch (_state) { - case 1 : return Occurrence(_componentLocator.GetElement()); - case 2 : { - Occurrence occurrence = _occurrenceLocator.GetElement(); - Entity* entity = occurrence.GetEntity(); - Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); - return Occurrence(entity, path); - } - } - } - return Occurrence(); + if (_state) { + switch (_state) { + case 1 : return Occurrence(_componentLocator.GetElement()); + case 2 : { + Occurrence occurrence = _occurrenceLocator.GetElement(); + Entity* entity = occurrence.GetEntity(); + Path path = Path(_instanceLocator.GetElement(), occurrence.GetPath()); + return Occurrence(entity, path); + } + } + } + return Occurrence(); } Locator* Cell_ComponentOccurrencesUnder::Locator::GetClone() const // ************************************************************************* { - return new Locator(*this); + return new Locator(*this); } bool Cell_ComponentOccurrencesUnder::Locator::IsValid() const // ********************************************************* { - return (_state != 0); + return (_state != 0); } void Cell_ComponentOccurrencesUnder::Locator::Progress() // **************************************************** { - if (_state) { - switch (_state) { - case 1 : - _componentLocator.Progress(); - if (!_componentLocator.IsValid()) { - _state = 0; - _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); - while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - break; - case 2 : - _occurrenceLocator.Progress(); - if (!_occurrenceLocator.IsValid()) { - _state = 0; - if (_instanceLocator.IsValid()) { - _instanceLocator.Progress(); - while (!_state && _instanceLocator.IsValid()) { - Instance* instance = _instanceLocator.GetElement(); - Cell* masterCell = instance->GetMasterCell(); - Box masterArea = _area; - instance->GetTransformation().getInvert().applyOn(masterArea); - _occurrenceLocator = - masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); - if (_occurrenceLocator.IsValid()) - _state = 2; - else - _instanceLocator.Progress(); - } - } - } - break; - } - } + if (_state) { + switch (_state) { + case 1 : + _componentLocator.Progress(); + if (!_componentLocator.IsValid()) { + _state = 0; + _instanceLocator = _cell->GetInstancesUnder(_area).GetLocator(); + while (!_state && _instanceLocator.IsValid()) { + Instance* instance = _instanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + break; + case 2 : + _occurrenceLocator.Progress(); + if (!_occurrenceLocator.IsValid()) { + _state = 0; + if (_instanceLocator.IsValid()) { + _instanceLocator.Progress(); + while (!_state && _instanceLocator.IsValid()) { + Instance* instance = _instanceLocator.GetElement(); + Cell* masterCell = instance->GetMasterCell(); + Box masterArea = _area; + instance->GetTransformation().getInvert().applyOn(masterArea); + _occurrenceLocator = + masterCell->GetComponentOccurrencesUnder(masterArea, _mask).GetLocator(); + if (_occurrenceLocator.IsValid()) + _state = 2; + else + _instanceLocator.Progress(); + } + } + } + break; + } + } } string Cell_ComponentOccurrencesUnder::Locator::_GetString() const // ************************************************************** { - string s = "<" + _TName("Cell::ComponentOccurrencesUnder::Locator"); - if (_cell) { - s += " " + GetString(_cell); - s += " " + GetString(_area); - s += " " + GetString(_mask); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::ComponentOccurrencesUnder::Locator"); + if (_cell) { + s += " " + GetString(_cell); + s += " " + GetString(_area); + s += " " + GetString(_mask); + } + s += ">"; + return s; } // **************************************************************************************************** @@ -3719,58 +3719,58 @@ string Cell_ComponentOccurrencesUnder::Locator::_GetString() const Cell_HyperNetRootNetOccurrences::Cell_HyperNetRootNetOccurrences() // ************************************* -: Inherit(), - _cell(NULL), - _path() +: Inherit(), + _cell(NULL), + _path() { } Cell_HyperNetRootNetOccurrences::Cell_HyperNetRootNetOccurrences(const Cell* cell, Path path) // **************************************************************** -: Inherit(), - _cell(cell), - _path(path) +: Inherit(), + _cell(cell), + _path(path) { } Cell_HyperNetRootNetOccurrences::Cell_HyperNetRootNetOccurrences(const Cell_HyperNetRootNetOccurrences& netOccurrences) // **************************************************************************** -: Inherit(), - _cell(netOccurrences._cell), - _path(netOccurrences._path) +: Inherit(), + _cell(netOccurrences._cell), + _path(netOccurrences._path) { } Cell_HyperNetRootNetOccurrences& Cell_HyperNetRootNetOccurrences::operator=(const Cell_HyperNetRootNetOccurrences& netOccurrences) // *************************************************************************************** { - _cell = netOccurrences._cell; - _path = netOccurrences._path; - return *this; + _cell = netOccurrences._cell; + _path = netOccurrences._path; + return *this; } Collection* Cell_HyperNetRootNetOccurrences::GetClone() const // ******************************************************** { - return new Cell_HyperNetRootNetOccurrences(*this); + return new Cell_HyperNetRootNetOccurrences(*this); } Locator* Cell_HyperNetRootNetOccurrences::GetLocator() const // ******************************************************* { - return new Locator(_cell, _path); + return new Locator(_cell, _path); } string Cell_HyperNetRootNetOccurrences::_GetString() const // ****************************************** { - string s = "<" + _TName("Cell::HyperNetRootNetOccurrences"); - if (_cell) { - s += " " + GetString(_cell); - if (!_path.IsEmpty()) s += " " + GetString(_path); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::HyperNetRootNetOccurrences"); + if (_cell) { + s += " " + GetString(_cell); + if (!_path.IsEmpty()) s += " " + GetString(_path); + } + s += ">"; + return s; } @@ -3781,21 +3781,21 @@ string Cell_HyperNetRootNetOccurrences::_GetString() const Cell_HyperNetRootNetOccurrences::Locator::Locator() // *********************************** -: Inherit(), - _path(), - _netLocator(), - _instanceLocator(), - _hyperNetRootNetOccurrenceLocator() +: Inherit(), + _path(), + _netLocator(), + _instanceLocator(), + _hyperNetRootNetOccurrenceLocator() { } Cell_HyperNetRootNetOccurrences::Locator::Locator(const Cell* cell, Path path) // ************************************************************** -: Inherit(), - _path(path), - _netLocator(), - _instanceLocator(), - _hyperNetRootNetOccurrenceLocator() +: Inherit(), + _path(path), + _netLocator(), + _instanceLocator(), + _hyperNetRootNetOccurrenceLocator() { _netLocator=cell->GetNets().GetLocator(); @@ -3815,31 +3815,31 @@ Cell_HyperNetRootNetOccurrences::Locator::Locator(const Cell* cell, Path path) Cell_HyperNetRootNetOccurrences::Locator::Locator(const Locator& locator) // ********************************************************* -: Inherit(), - _path(locator._path), - _netLocator(locator._netLocator), - _instanceLocator(locator._instanceLocator), - _hyperNetRootNetOccurrenceLocator(locator._hyperNetRootNetOccurrenceLocator) +: Inherit(), + _path(locator._path), + _netLocator(locator._netLocator), + _instanceLocator(locator._instanceLocator), + _hyperNetRootNetOccurrenceLocator(locator._hyperNetRootNetOccurrenceLocator) { } Cell_HyperNetRootNetOccurrences::Locator& Cell_HyperNetRootNetOccurrences::Locator::operator=(const Locator& locator) // **************************************************************************************** { - _path = locator._path; - _netLocator = locator._netLocator; - _instanceLocator = locator._instanceLocator; - _hyperNetRootNetOccurrenceLocator = locator._hyperNetRootNetOccurrenceLocator; - return *this; + _path = locator._path; + _netLocator = locator._netLocator; + _instanceLocator = locator._instanceLocator; + _hyperNetRootNetOccurrenceLocator = locator._hyperNetRootNetOccurrenceLocator; + return *this; } 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(); @@ -3848,13 +3848,13 @@ Occurrence Cell_HyperNetRootNetOccurrences::Locator::GetElement() const Locator* Cell_HyperNetRootNetOccurrences::Locator::GetClone() const // ************************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_HyperNetRootNetOccurrences::Locator::IsValid() const // ********************************************** { - return (_netLocator.IsValid() || (_hyperNetRootNetOccurrenceLocator.IsValid())); + return (_netLocator.IsValid() || (_hyperNetRootNetOccurrenceLocator.IsValid())); } void Cell_HyperNetRootNetOccurrences::Locator::Progress() @@ -3883,11 +3883,11 @@ void Cell_HyperNetRootNetOccurrences::Locator::Progress() string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // *************************************************** { - string s = "<" + _TName("Cell::HyperNetRootNetOccurrences::Locator"); + string s = "<" + _TName("Cell::HyperNetRootNetOccurrences::Locator"); if (!_path.IsEmpty()) s += " " + _path.GetName(); - s += ">"; - return s; + s += ">"; + return s; } @@ -3897,44 +3897,44 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const //Cell_ImpactedMainViews::Cell_ImpactedMainViews(const Cell* cell) //// ************************************************************* -//: Inherit(), -// _cell(cell) +//: Inherit(), +// _cell(cell) //{ //} // //Cell_ImpactedMainViews::Cell_ImpactedMainViews(const Cell_ImpactedMainViews& impactedMainViews) //// ******************************************************************************************** -//: Inherit(), -// _cell(impactedMainViews._cell) +//: Inherit(), +// _cell(impactedMainViews._cell) //{ //} // //Cell_ImpactedMainViews& Cell_ImpactedMainViews::operator=(const Cell_ImpactedMainViews& impactedMainViews) //// **************************************************************************************************** //{ -// _cell = impactedMainViews._cell; -// return *this; +// _cell = impactedMainViews._cell; +// return *this; //} // //Collection* Cell_ImpactedMainViews::GetClone() const //// ************************************************************ //{ -// return new Cell_ImpactedMainViews(*this); +// return new Cell_ImpactedMainViews(*this); //} // //Locator* Cell_ImpactedMainViews::GetLocator() const //// *********************************************************** //{ -// return new Locator(_cell); +// return new Locator(_cell); //} // //string Cell_ImpactedMainViews::_GetString() const //// ********************************************** //{ -// string s = "<" + _TName("Cell::ImpactedMainViews"); -// if (_cell) s += " " + GetString(_cell); -// s += ">"; -// return s; +// string s = "<" + _TName("Cell::ImpactedMainViews"); +// if (_cell) s += " " + GetString(_cell); +// s += ">"; +// return s; //} // // @@ -3945,106 +3945,106 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const // //Cell_ImpactedMainViews::Locator::Locator(const Cell* cell) //// ******************************************************* -//: Inherit(), -// _cell(cell), -// _cellSet(), -// _cellStack(), -// _mainViewLocator(), -// _mainView(NULL) +//: Inherit(), +// _cell(cell), +// _cellSet(), +// _cellStack(), +// _mainViewLocator(), +// _mainView(NULL) //{ -// if (_cell) { -// _cellSet.insert((Cell*)_cell); -// _cellStack.push((Cell*)_cell); -// while (!_mainView && !_cellStack.empty()) { -// Cell* cell = _cellStack.top(); -// _cellStack.pop(); -// 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(); -// } -// } +// if (_cell) { +// _cellSet.insert((Cell*)_cell); +// _cellStack.push((Cell*)_cell); +// while (!_mainView && !_cellStack.empty()) { +// Cell* cell = _cellStack.top(); +// _cellStack.pop(); +// 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(); +// } +// } //} // //Cell_ImpactedMainViews::Locator::Locator(const Locator& locator) //// ************************************************************* -//: Inherit(), -// _cell(locator._cell), -// _cellSet(locator._cellSet), -// _cellStack(locator._cellStack), -// _mainViewLocator(locator._mainViewLocator), -// _mainView(locator._mainView) +//: Inherit(), +// _cell(locator._cell), +// _cellSet(locator._cellSet), +// _cellStack(locator._cellStack), +// _mainViewLocator(locator._mainViewLocator), +// _mainView(locator._mainView) //{ //} // //Cell_ImpactedMainViews::Locator& Cell_ImpactedMainViews::Locator::operator=(const Locator& locator) //// ************************************************************************************************ //{ -// _cell = locator._cell; -// _cellSet = locator._cellSet; -// _cellStack = locator._cellStack; -// _mainViewLocator = locator._mainViewLocator; -// _mainView = locator._mainView; -// return *this; +// _cell = locator._cell; +// _cellSet = locator._cellSet; +// _cellStack = locator._cellStack; +// _mainViewLocator = locator._mainViewLocator; +// _mainView = locator._mainView; +// return *this; //} // //MainView* Cell_ImpactedMainViews::Locator::GetElement() const //// ********************************************************** //{ -// return _mainView; +// return _mainView; //} // //Locator* Cell_ImpactedMainViews::Locator::GetClone() const //// ****************************************************************** //{ -// return new Locator(*this); +// return new Locator(*this); //} // //bool Cell_ImpactedMainViews::Locator::IsValid() const //// ************************************************** //{ -// return (_mainView != NULL); +// return (_mainView != NULL); //} // //void Cell_ImpactedMainViews::Locator::Progress() //// ********************************************* //{ -// if (_mainView) { -// _mainView = NULL; -// do { -// _mainViewLocator.Progress(); -// _mainView = _mainViewLocator.GetElement(); -// if (!_mainView && !_cellStack.empty()) { -// Cell* cell = _cellStack.top(); -// _cellStack.pop(); -// 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(); -// } -// } while (!_mainView && !_cellStack.empty()); -// } +// if (_mainView) { +// _mainView = NULL; +// do { +// _mainViewLocator.Progress(); +// _mainView = _mainViewLocator.GetElement(); +// if (!_mainView && !_cellStack.empty()) { +// Cell* cell = _cellStack.top(); +// _cellStack.pop(); +// 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(); +// } +// } while (!_mainView && !_cellStack.empty()); +// } //} // //string Cell_ImpactedMainViews::Locator::_GetString() const //// ******************************************************* //{ -// string s = "<" + _TName("Cell::ImpactedMainViews::Locator"); -// if (_cell) s += " " + GetString(_cell); -// s += ">"; -// return s; +// string s = "<" + _TName("Cell::ImpactedMainViews::Locator"); +// if (_cell) s += " " + GetString(_cell); +// s += ">"; +// return s; //} // // @@ -4054,53 +4054,53 @@ string Cell_HyperNetRootNetOccurrences::Locator::_GetString() const Cell_SubCells::Cell_SubCells() // *************************** -: Inherit(), - _cell(NULL) +: Inherit(), + _cell(NULL) { } Cell_SubCells::Cell_SubCells(const Cell* cell) // ******************************************* -: Inherit(), - _cell(cell) +: Inherit(), + _cell(cell) { } Cell_SubCells::Cell_SubCells(const Cell_SubCells& subCells) // ******************************************************** -: Inherit(), - _cell(subCells._cell) +: Inherit(), + _cell(subCells._cell) { } Cell_SubCells& Cell_SubCells::operator=(const Cell_SubCells& subCells) // ******************************************************************* { - _cell = subCells._cell; - return *this; + _cell = subCells._cell; + return *this; } Collection* Cell_SubCells::GetClone() const // *********************************************** { - return new Cell_SubCells(*this); + return new Cell_SubCells(*this); } Locator* Cell_SubCells::GetLocator() const // ********************************************** { - return new Locator(_cell->GetInstances().GetLocator()); + return new Locator(_cell->GetInstances().GetLocator()); } string Cell_SubCells::_GetString() const // ************************************* { - string s = "<" + _TName("Cell::SubCells"); - if (_cell) { - s += " " + GetString(_cell); - } - s += ">"; - return s; + string s = "<" + _TName("Cell::SubCells"); + if (_cell) { + s += " " + GetString(_cell); + } + s += ">"; + return s; } @@ -4111,17 +4111,17 @@ string Cell_SubCells::_GetString() const Cell_SubCells::Locator::Locator() // ********************************** -: Inherit(), - _cellSet(), - _instanceLocator() +: Inherit(), + _cellSet(), + _instanceLocator() { } Cell_SubCells::Locator::Locator(InstanceLocator instanceLocator) // ************************************************************* -: Inherit(), - _cellSet(), - _instanceLocator(instanceLocator) +: Inherit(), + _cellSet(), + _instanceLocator(instanceLocator) { if ( IsValid() ) _cellSet.insert ( _instanceLocator.GetElement()->GetMasterCell() ); @@ -4129,18 +4129,18 @@ Cell_SubCells::Locator::Locator(InstanceLocator instanceLocator) Cell_SubCells::Locator::Locator(const Locator& locator) // **************************************************** -: Inherit(), - _cellSet(locator._cellSet), - _instanceLocator(locator._instanceLocator) +: Inherit(), + _cellSet(locator._cellSet), + _instanceLocator(locator._instanceLocator) { } Cell_SubCells::Locator& Cell_SubCells::Locator::operator=(const Locator& locator) // ****************************************************************************** { - _cellSet = locator._cellSet; - _instanceLocator = locator._instanceLocator; - return *this; + _cellSet = locator._cellSet; + _instanceLocator = locator._instanceLocator; + return *this; } Cell* Cell_SubCells::Locator::GetElement() const @@ -4152,13 +4152,13 @@ Cell* Cell_SubCells::Locator::GetElement() const Locator* Cell_SubCells::Locator::GetClone() const // ***************************************************** { - return new Locator(*this); + return new Locator(*this); } bool Cell_SubCells::Locator::IsValid() const // ***************************************** { - return _instanceLocator.IsValid(); + return _instanceLocator.IsValid(); } void Cell_SubCells::Locator::Progress() @@ -4173,11 +4173,11 @@ void Cell_SubCells::Locator::Progress() string Cell_SubCells::Locator::_GetString() const // ************************************************** { - string s = "<" + _TName("Cell::SubCells::Locator"); - s += " " + _GetString(); - s += " " + GetString(_instanceLocator); - s += ">"; - return s; + string s = "<" + _TName("Cell::SubCells::Locator"); + s += " " + _GetString(); + s += " " + GetString(_instanceLocator); + s += ">"; + return s; } diff --git a/hurricane/src/viewer/CellViewer.cpp b/hurricane/src/viewer/CellViewer.cpp index 3061436f..07af8702 100644 --- a/hurricane/src/viewer/CellViewer.cpp +++ b/hurricane/src/viewer/CellViewer.cpp @@ -23,30 +23,27 @@ CellViewer::~CellViewer() { delete layersWidget; } -//void CellViewer::keyPressEvent(QKeyEvent *event) { -// switch (event->key()) { -// case Qt::Key_Plus: -// zoom(ZoomInFactor); -// break; -// case Qt::Key_Minus: -// zoom(ZoomOutFactor); -// break; -// case Qt::Key_Left: -// scroll(-ScrollStep, 0); -// break; -// case Qt::Key_Right: -// scroll(+ScrollStep, 0); -// break; -// case Qt::Key_Down: -// scroll(0, -ScrollStep); -// break; -// case Qt::Key_Up: -// scroll(0, +ScrollStep); -// break; -// default: -// QWidget::keyPressEvent(event); -// } -//} +static int scrollStep = GetUnit(200); + +void CellViewer::keyPressEvent(QKeyEvent *event) { + switch (event->key()) { + case Qt::Key_Left: + cellWidget->scroll(-scrollStep, 0); + break; + case Qt::Key_Right: + cellWidget->scroll(+scrollStep, 0); + break; + case Qt::Key_Down: + cellWidget->scroll(0, -scrollStep); + break; + case Qt::Key_Up: + cellWidget->scroll(0, +scrollStep); + break; + default: + QWidget::keyPressEvent(event); + } +} + // //void CellViewer::wheelEvent(QWheelEvent *event) { // int numDegrees = event->delta() / 8; diff --git a/hurricane/src/viewer/CellViewer.h b/hurricane/src/viewer/CellViewer.h index e74a88ba..c7befb26 100644 --- a/hurricane/src/viewer/CellViewer.h +++ b/hurricane/src/viewer/CellViewer.h @@ -31,6 +31,9 @@ class CellViewer : public QMainWindow { void zoomIn(); void zoomOut(); void fitToWindow(); + protected: + void keyPressEvent(QKeyEvent *event); + }; #endif diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 6b59a1d8..79f8303c 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -22,6 +22,7 @@ using namespace H; #include #include +#include #include #include @@ -34,7 +35,7 @@ QBrush getBrush(const string &pattern, int redValue, int greenValue, int blueVal if (pattern == "FFFFFFFFFFFFFFFF") { return QBrush(QColor(redValue, greenValue, blueValue)); } else { - char bits[8]; + uchar bits[8]; for (int i = 0; i < 8; i++) { int high = pattern[i * 2]; if (('0' <= high) && (high <= '9')) { @@ -64,10 +65,10 @@ QBrush getBrush(const string &pattern, int redValue, int greenValue, int blueVal } } } - bits[i] = (char)((high * 16) + low); + bits[i] = (uchar)((high * 16) + low); } - return QBrush(QColor(redValue, greenValue, blueValue), - QPixmap(bits)); + + return QBrush(QColor(redValue, greenValue, blueValue), QBitmap::fromData(QSize(8,8), bits, QImage::Format_Mono)); } } @@ -1616,8 +1617,7 @@ CellWidget::scroll(const Unit& dx, if ((getSize(width()) < labs(dx)) || (getSize(height()) < labs(dy))) { reframe(getCenter().getTranslated(-dx, -dy)); redraw(); - } - else { + } else { int sdx = getScreenSize(dx); int sdy = getScreenSize(dy); @@ -1649,32 +1649,35 @@ CellWidget::scroll(const Unit& dx, if (0 < sdy) { //bitBlt(this, sdx, 0, this, 0, sdy, w - sdx, h - sdy); invalidate(QRect(-1, -1, sdx + 1, h + 1)); - _redraw(); + //_redraw(); invalidate(QRect(sdx - 1, h - sdy - 1, w + 1, h + 1)); - _redraw(); - } - else { + //_redraw(); + update(); + } else { //bitBlt(this, sdx, -sdy, this, 0, 0, w - sdx, h + sdy, CopyROP); invalidate(QRect(-1, -1, sdx + 1, h + 1)); - _redraw(); + //_redraw(); invalidate(QRect(sdx - 1, -1, w + 1, -sdy + 1)); - _redraw(); + //_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(); + // _redraw(); invalidate(QRect(-1, h - sdy - 1, w + sdx + 1, h + 1)); - _redraw(); + //_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(); + //_redraw(); invalidate(QRect(-1, -1, w + sdx + 1, -sdy + 1)); - _redraw(); + //_redraw(); + update(); } }