# 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
35 class RoutingEventQueue {
36
37 public:
38 RoutingEventQueue ();
39 ~RoutingEventQueue ();
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& );
66 RoutingEventQueue ( 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
Kite::RoutingEvent
Atomic Placement Request for a TrackSegment.
Definition: RoutingEvent.h:55
Kite::RoutingEventQueue::RoutingEventQueue
RoutingEventQueue()
Definition: RoutingEventQueue.cpp:47
Kite::RoutingEventQueue::empty
bool empty() const
Definition: RoutingEventQueue.h:72
Kite::RoutingEventQueue::add
void add(TrackElement *, unsigned int level)
Definition: RoutingEventQueue.cpp:76
Kite::RoutingEventQueue::pop
RoutingEvent * pop()
Definition: RoutingEventQueue.cpp:120
Kite::RoutingEventQueue::commit
void commit()
Definition: RoutingEventQueue.cpp:90
Kite::RoutingEventQueue::getTopEventLevel
unsigned int getTopEventLevel() const
Definition: RoutingEventQueue.h:74
Kite::RoutingEventQueue::~RoutingEventQueue
~RoutingEventQueue()
Definition: RoutingEventQueue.cpp:54
Kite::RoutingEventQueue::repushInvalidateds
void repushInvalidateds()
Definition: RoutingEventQueue.cpp:171
Kite::RoutingEventQueue::push
void push(RoutingEvent *)
Definition: RoutingEventQueue.h:76
Kite::RoutingEventQueue::size
size_t size() const
Definition: RoutingEventQueue.h:73
Kite::TrackElement
Abstract Class for all Elements inserted inside a Track.
Definition: TrackElement.h:100
Kite::RoutingEventQueue
The priority Queue of RoutingEvent.
Definition: RoutingEventQueue.h:35
Kite::RoutingEventQueue::clear
void clear()
Definition: RoutingEventQueue.cpp:203
Kite::RoutingEventQueue::repush
void repush(RoutingEvent *)
Definition: RoutingEventQueue.cpp:149
Kite
The namespace dedicated to Kite.
Definition: Constants.h:22
Kite::RoutingEventQueue::load
void load(const vector< TrackElement *> &)
Definition: RoutingEventQueue.cpp:58

Generated by doxygen 1.8.14 on Mon Apr 27 2020 | Return to top of page

Kite - Detailed Router | Copyright © 2008-2016 UPMC. All rights reserved