17 #ifndef KITE_TRACK_ELEMENT_H 18 #define KITE_TRACK_ELEMENT_H 23 #include "hurricane/Interval.h" 30 #include "katabatic/AutoSegment.h" 31 #include "kite/Constants.h" 32 #include "kite/Session.h" 33 #include "kite/TrackElements.h" 40 using Hurricane::Record;
48 using Katabatic::KbNoFlags;
55 typedef map<Segment*,TrackElement*> TrackElementLut;
65 virtual void notify (
unsigned int flags );
71 inline SegmentObserver::SegmentObserver (
TrackElement* owner )
79 enum TrackElementFlags { TElemCreated =0x00000001
80 , TElemBlockage =0x00000002
81 , TElemFixed =0x00000004
82 , TElemLocked =0x00000008
83 , TElemRouted =0x00000010
84 , TElemSourceDogleg=0x00000020
85 , TElemTargetDogleg=0x00000040
86 , TElemRipple =0x00000080
87 , TElemInvalidated =0x00000100
92 bool operator() ( TrackElement* lhs, TrackElement* rhs );
95 struct CompareByPosition {
96 bool operator() (
const TrackElement* lhs,
const TrackElement* rhs )
const;
115 virtual bool isStrongTerminal (
unsigned int flags=0 )
const;
119 virtual bool isReduced ()
const;
120 virtual bool isUTurn ()
const;
121 virtual bool isUserDefined ()
const;
131 virtual bool canSlacken ()
const;
132 virtual bool canPivotUp (
float reserve )
const;
133 virtual bool canPivotDown (
float reserve )
const;
134 virtual bool canMoveUp (
float reserve,
unsigned int flags=KbWithPerpands )
const;
140 virtual unsigned long getId ()
const;
163 virtual size_t getGCells ( Katabatic::GCellVector& )
const;
170 inline void setFlags (
unsigned int );
172 inline void setRouted ();
178 virtual void reschedule (
unsigned int level );
182 virtual void updatePPitch ();
184 virtual void setAxis (
DbU::Unit,
unsigned int flags=Katabatic::SegAxisSet );
190 virtual bool moveAside (
unsigned int flags );
191 virtual bool slacken (
unsigned int flags=KbNoFlags );
192 virtual bool moveUp (
unsigned int flags );
193 virtual bool moveDown (
unsigned int flags );
195 virtual void desalignate ();
197 virtual bool _check ()
const;
198 virtual Record* _getRecord ()
const;
199 virtual string _getString ()
const;
200 virtual string _getTypeName ()
const;
217 virtual void _postCreate ();
218 virtual void _preDestroy ();
227 inline SegmentObserver* TrackElement::getObserver () {
return &_observer; }
246 inline void TrackElement::setRouted()
248 _flags |= TElemRouted;
249 if (base()) base()->
setFlags( Katabatic::SegFixed );
266 return (perpandicular != NULL);
virtual Interval getTargetConstraints() const
Definition: TrackElement.cpp:169
virtual DataNegociate * getDataNegociate(unsigned int flags=KtDataSelf) const
Definition: TrackElement.cpp:170
virtual bool isSlackened() const
Definition: TrackElement.cpp:147
virtual size_t getGCells(Katabatic::GCellVector &) const
Definition: TrackElement.cpp:253
Box getBoundingBox() const
Definition: TrackElement.h:252
virtual TrackElement * getParent() const
Definition: TrackElement.cpp:167
static Unit lambda(double value)
virtual bool isDogleg() const
Definition: TrackElement.cpp:148
virtual TrackElement * getPrevious() const
Definition: TrackElement.cpp:236
bool isInvalidated() const
Definition: TrackElement.h:231
void() SegmentOverlapCostCB(const TrackElement *, TrackCost &)
Definition: TrackElement.h:56
bool canRipple() const
Definition: TrackElement.h:237
virtual bool isBipoint() const
Definition: TrackElement.cpp:143
virtual void notify(unsigned int flags)
Definition: TrackElement.cpp:99
virtual unsigned long getFreedomDegree() const
Definition: TrackElement.cpp:162
DbU::Unit getTargetU() const
Definition: TrackElement.h:242
Observer on the base AutoSegment.
Definition: TrackElement.h:62
virtual void detach()
Definition: TrackElement.cpp:182
DbU::Unit getLength() const
Definition: TrackElement.h:240
virtual void revalidate()
Definition: TrackElement.cpp:183
virtual bool isLocal() const
Definition: TrackElement.cpp:141
void setIndex(size_t)
Definition: TrackElement.h:244
virtual TrackElement * getSourceDogleg()
Definition: TrackElement.cpp:174
virtual bool canDogleg()
Definition: TrackElement.cpp:157
virtual const Layer * getLayer() const =0
Structure managing one routing track.
Definition: Track.h:42
virtual unsigned long getId() const
Definition: TrackElement.cpp:161
void setFlags(unsigned int)
void unsetFlags(unsigned int)
Definition: TrackElement.h:229
virtual Net * getNet() const =0
bool hasTargetDogleg() const
Definition: TrackElement.h:236
virtual bool isVertical() const =0
virtual float getMaxUnderDensity(unsigned int flags=0) const
Definition: TrackElement.cpp:165
Definition: Constants.h:40
virtual void setDoglegLevel(unsigned int)
Definition: TrackElement.cpp:179
bool isRouted() const
Definition: TrackElement.h:234
virtual void invalidate()
Definition: TrackElement.cpp:172
virtual Interval getFreeInterval() const
Definition: TrackElement.cpp:243
virtual TrackElement * getTargetDogleg()
Definition: TrackElement.cpp:175
DbU::Unit getSourceU() const
Definition: TrackElement.h:241
virtual TrackElement * getCanonical(Interval &)
Definition: TrackElement.cpp:173
virtual void setTrack(Track *)
Definition: TrackElement.cpp:177
static SegmentOverlapCostCB * setOverlapCostCB(SegmentOverlapCostCB *)
Definition: TrackElement.cpp:130
void setFlags(unsigned int)
Definition: TrackElement.h:228
virtual Interval getSourceConstraints() const
Definition: TrackElement.cpp:168
virtual DbU::Unit getAxis() const =0
virtual void reschedule(unsigned int level)
Definition: TrackElement.cpp:181
bool isLocked() const
Definition: TrackElement.h:233
virtual bool isHorizontal() const =0
virtual void incOverlapCost(Net *, TrackCost &) const
Definition: TrackElement.cpp:260
virtual bool _check() const
Definition: TrackElement.cpp:197
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
virtual unsigned int getDoglegLevel() const
Definition: TrackElement.cpp:166
virtual TrackElements getPerpandiculars()
Definition: TrackElement.cpp:171
virtual TrackElement * makeDogleg()
Definition: TrackElement.cpp:186
virtual bool isGlobal() const
Definition: TrackElement.cpp:142
bool hasSourceDogleg() const
Definition: TrackElement.h:235
bool isBlockage() const
Definition: TrackElement.h:232
virtual void updateFreedomDegree()
Definition: TrackElement.cpp:178
virtual bool isStrap() const
Definition: TrackElement.cpp:146
bool isCreated() const
Definition: TrackElement.h:230
virtual unsigned int getDirection() const =0
Track * getTrack() const
Definition: TrackElement.h:238
The namespace dedicated to Kite.
Definition: Constants.h:22
size_t getIndex() const
Definition: TrackElement.h:239
Interval getCanonicalInterval() const
Definition: TrackElement.h:243
virtual bool isTerminal() const
Definition: TrackElement.cpp:144
virtual void swapTrack(TrackElement *)
Definition: TrackElement.cpp:180
virtual void setAxis(DbU::Unit, unsigned int flags=Katabatic::SegAxisSet)
Definition: TrackElement.cpp:185
virtual TrackElement * getNext() const
Definition: TrackElement.cpp:229
virtual bool isFixed() const
Definition: TrackElement.cpp:140
Algorimthmic datas associated the TrackSegment.
Definition: DataNegociate.h:50