Kite - Detailed Router


RoutingEventQueue.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | K i t e - D e t a i l e d R o u t e r |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./kite/RoutingEventQueue.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KITE_ROUTING_EVENT_QUEUE_H
18 #define KITE_ROUTING_EVENT_QUEUE_H
19 
20 #include <set>
21 #include <vector>
22 #include "kite/RoutingEvent.h"
23 
24 
25 namespace Kite {
26 
27  using std::set;
28  using std::multiset;
29  using std::vector;
30 
31 
32 // -------------------------------------------------------------------
33 // Class : "RoutingEventQueue".
34 
36 
37  public:
40  inline bool empty () const;
41  inline size_t size () const;
42  inline unsigned int getTopEventLevel () const;
43  RoutingEvent* pop ();
44  void load ( const vector<TrackElement*>& );
45  void add ( TrackElement*, unsigned int level );
46  inline void push ( RoutingEvent* );
47  void repush ( RoutingEvent* );
48  void repushInvalidateds ();
49  void commit ();
50  void prepareRepair ();
51  void clear ();
52  void dump () const;
53  void _keyCheck () const;
54  Record* _getRecord () const;
55  string _getString () const;
56  inline string _getTypeName () const;
57 
58  protected:
59  // Attributes.
60  unsigned int _topEventLevel;
61  RoutingEventSet _pushRequests;
62  multiset<RoutingEvent*,RoutingEvent::Compare> _events;
63 
64  private:
65  RoutingEventQueue& operator= ( const RoutingEventQueue& );
67 
68  };
69 
70 
71 // Inline Functions.
72  inline bool RoutingEventQueue::empty () const { return _events.empty(); }
73  inline size_t RoutingEventQueue::size () const { return _events.size(); }
74  inline unsigned int RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; }
75  inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; }
76  inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); }
77 
78 
79 } // Kite namespace.
80 
81 
82 #endif // KITE_ROUTING_EVENT_QUEUE_H
Atomic Placement Request for a TrackSegment.
Definition: RoutingEvent.h:55
RoutingEventQueue()
Definition: RoutingEventQueue.cpp:47
bool empty() const
Definition: RoutingEventQueue.h:72
void add(TrackElement *, unsigned int level)
Definition: RoutingEventQueue.cpp:76
RoutingEvent * pop()
Definition: RoutingEventQueue.cpp:120
void commit()
Definition: RoutingEventQueue.cpp:90
unsigned int getTopEventLevel() const
Definition: RoutingEventQueue.h:74
~RoutingEventQueue()
Definition: RoutingEventQueue.cpp:54
void repushInvalidateds()
Definition: RoutingEventQueue.cpp:171
void push(RoutingEvent *)
Definition: RoutingEventQueue.h:76
size_t size() const
Definition: RoutingEventQueue.h:73
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
The priority Queue of RoutingEvent.
Definition: RoutingEventQueue.h:35
void clear()
Definition: RoutingEventQueue.cpp:203
void repush(RoutingEvent *)
Definition: RoutingEventQueue.cpp:149
The namespace dedicated to Kite.
Definition: Constants.h:22
void load(const vector< TrackElement *> &)
Definition: RoutingEventQueue.cpp:58


Generated by doxygen 1.8.14 on Thu Nov 12 2020 Return to top of page
Kite - Detailed Router Copyright © 2008-2020 Sorbonne Universite. All rights reserved