17 #ifndef KATABATIC_AUTOSEGMENTS_H 18 #define KATABATIC_AUTOSEGMENTS_H 24 #include "hurricane/Collection.h" 25 #include "hurricane/DbU.h" 26 #include "hurricane/Box.h" 46 using Hurricane::Record;
76 typedef map<Segment*,AutoSegment*> AutoSegmentLut;
82 class AutoSegmentStack :
protected list<pair<AutoContact*,AutoSegment*> > {
84 inline bool isEmpty ()
const;
85 inline size_t getSize ()
const;
93 inline bool AutoSegmentStack::isEmpty ()
const {
return empty(); };
94 inline size_t AutoSegmentStack::getSize ()
const {
return size(); };
95 inline void AutoSegmentStack::pop () {
if ( !empty() ) pop_back(); };
96 inline AutoContact* AutoSegmentStack::getAutoContact ()
const {
return empty() ? NULL : back().first; };
97 inline AutoSegment* AutoSegmentStack::getAutoSegment ()
const {
return empty() ? NULL : back().second; };
107 class Locator :
public AutoSegmentHL {
110 inline Locator (
const Locator& );
112 virtual AutoSegmentHL* getClone ()
const;
113 virtual bool isValid ()
const;
114 virtual void progress ();
115 virtual string _getString ()
const;
126 virtual AutoSegmentHC* getClone ()
const;
127 virtual AutoSegmentHL* getLocator ()
const;
128 virtual string _getString ()
const;
137 inline AutoSegments_OnContact::Locator::Locator (
const Locator &locator )
139 , _master(locator._master)
140 , _hook(locator._hook)
141 , _element(locator._element)
154 , _master(segments._master)
155 , _contact(segments._contact)
166 class Locator :
public AutoSegmentHL {
168 inline Locator (
AutoSegment* segment ,
unsigned int flags );
169 inline Locator (
const Locator &locator );
171 virtual AutoSegmentHL*
getClone ()
const;
172 virtual bool isValid ()
const;
173 virtual void progress ();
174 virtual string _getString ()
const;
178 AutoSegmentStack _stack;
185 virtual AutoSegmentHC*
getClone ()
const;
187 virtual string _getString ()
const;
196 inline AutoSegments_Aligneds::Locator::Locator (
const Locator &locator )
198 , _flags (locator._flags)
199 , _master(locator._master)
200 , _stack (locator._stack)
213 , _flags (autosegments._flags)
214 , _segment(autosegments._segment)
225 class Locator :
public AutoSegmentHL {
228 inline Locator (
const Locator& );
230 virtual AutoSegmentHL*
getClone ()
const;
231 virtual bool isValid ()
const;
232 virtual void progress ();
233 virtual string _getString ()
const;
237 AutoSegmentStack _stack;
238 vector<AutoSegment*> _perpandiculars;
245 virtual AutoSegmentHC*
getClone ()
const;
247 virtual string _getString ()
const;
255 inline AutoSegments_Perpandiculars::Locator::Locator (
const Locator& locator )
257 , _flags (locator._flags)
258 , _master (locator._master)
259 , _stack (locator._stack)
274 , _segment(autosegments._segment)
285 class Locator :
public AutoSegmentHL {
287 Locator (
GCell* fcell,
unsigned int flags );
288 inline Locator (
const Locator& );
291 virtual AutoSegmentHL*
getClone ()
const;
292 virtual bool isValid ()
const;
293 virtual void progress ();
294 virtual string _getString ()
const;
297 vector<AutoContact*>::const_iterator _itContact;
298 vector<AutoContact*>::const_iterator _itEnd;
307 virtual AutoSegmentHC*
getClone ()
const;
309 virtual string _getString ()
const;
318 inline AutoSegments_AnchorOnGCell::Locator::Locator (
const Locator &locator )
320 , _flags (locator._flags)
321 , _itContact (locator._itContact)
322 , _itEnd (locator._itEnd)
323 , _hookLocator (locator._hookLocator->getClone())
324 , _element (locator._element)
338 , _fcell(autosegments._fcell)
339 , _flags(autosegments._flags)
346 class AutoSegments_CachedOnContact :
public AutoSegmentHC {
350 class Locator :
public AutoSegmentHL {
352 Locator (
AutoContact* sourceAnchor,
unsigned int direction );
353 inline Locator (
const Locator& );
356 virtual AutoSegmentHL*
getClone ()
const;
357 virtual bool isValid ()
const;
358 virtual void progress ();
359 virtual string _getString ()
const;
367 inline AutoSegments_CachedOnContact (
AutoContact* sourceContact
369 inline AutoSegments_CachedOnContact (
const AutoSegments_CachedOnContact& );
370 virtual AutoSegmentHC*
getClone ()
const;
372 virtual string _getString ()
const;
376 unsigned int _direction;
382 inline AutoSegments_CachedOnContact::Locator::Locator (
const Locator &locator )
384 , _helper(locator._helper)
388 inline AutoSegments_CachedOnContact::AutoSegments_CachedOnContact
389 (
AutoContact* sourceContact,
unsigned int direction )
391 , _direction (direction)
392 , _sourceContact(sourceContact)
398 inline AutoSegments_CachedOnContact::AutoSegments_CachedOnContact
399 (
const AutoSegments_CachedOnContact& autosegments )
401 , _direction (autosegments._direction)
402 , _sourceContact(autosegments._sourceContact)
411 virtual AutoSegmentHF*
getClone ()
const;
413 virtual string _getString ()
const;
424 virtual AutoSegmentHF*
getClone ()
const;
425 virtual bool accept (
AutoSegment* segment )
const;
426 virtual string _getString ()
const;
428 unsigned int _direction;
434 , _direction(direction)
440 , _direction(filter._direction)
AutoSegments_Aligneds(AutoSegment *, unsigned int flags=KbNoFlags)
Definition: AutoSegments.h:204
Definition: Constants.h:28
virtual AutoSegmentHL * getLocator() const
Definition: Constants.h:29
Hurricane::Filter< AutoSegment * > AutoSegmentHF
Definition: AutoSegments.h:64
AutoSegments_AnchorOnGCell(GCell *fcell, unsigned int flags)
Definition: AutoSegments.h:328
virtual AutoSegmentHC * getClone() const
Filter to select accoutable AutoSegment.
Definition: AutoSegments.h:409
Routing Global Cell.
Definition: GCell.h:74
Abstract base class for AutoSegment.
Definition: AutoSegment.h:104
The namespace dedicated to Katabatic.
Definition: Katabatic.dox:13
Locator Helper Collection's Locators.
Definition: AutoContact.h:273
All AutoSegment Beginning and/or Stopping in a GCell.
Definition: AutoSegments.h:281
Hurricane::Collection< AutoSegment * > AutoSegmentHC
Definition: AutoSegments.h:72
virtual AutoSegmentHC * getClone() const
Filter to select AutoSegment in a given direction.
Definition: AutoSegments.h:420
Hurricane::Locator< AutoSegment * > AutoSegmentHL
Definition: AutoSegments.h:71
Definition: Constants.h:27
All perpandicular AutoSegment to a set of aligneds.
Definition: AutoSegments.h:221
All aligned AutoSegment of a set.
Definition: AutoSegments.h:162
virtual AutoSegmentHL * getLocator() const
AutoSegments_Perpandiculars(AutoSegment *master)
Definition: AutoSegments.h:265
AutoSegments_InDirection(unsigned int direction)
Definition: AutoSegments.h:432