Katabatic - Routing Toolbox


GCellGrid.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 a t a b a t i c - Routing Toolbox |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./katabatic/GCellGrid.h" |
14 // +-----------------------------------------------------------------+
15 
16 
17 #ifndef KATABATIC_GCELL_GRID_H
18 #define KATABATIC_GCELL_GRID_H
19 
20 namespace Hurricane {
21  class Cell;
22 }
23 
24 #include "katabatic/Constants.h"
25 #include "katabatic/Grid.h"
26 #include "katabatic/GCell.h"
27 
28 
29 namespace Katabatic {
30 
31 
32  using Hurricane::Cell;
33  using Hurricane::_TName;
34 
35  class KatabaticEngine;
36 
37 
38 // -------------------------------------------------------------------
39 // Class : "Katabatic::GCellGrid".
40 
41 
42  class GCellGrid : public Grid<GCell> {
43  public:
44  enum DensityMode { AverageHVDensity=1 // Average between all densities.
45  , AverageHDensity =2 // Average between all H densities.
46  , AverageVDensity =3 // Average between all V densities.
47  , MaxHVDensity =4 // Maximum between average H and average V.
48  , MaxVDensity =5 // Maximum of V densities.
49  , MaxHDensity =6 // Maximum of H densities.
50  , MaxDensity =7 // Maximum of H & V densities.
51  };
52 
53  public:
54  Cell* getCell () const;
55  inline KatabaticEngine* getKatabatic () const;
56  inline unsigned int getDensityMode () const;
57  inline size_t getHEdgeCapacity () const;
58  inline size_t getVEdgeCapacity () const;
59  Interval getUSide ( unsigned int ) const;
60  size_t checkDensity () const;
61  bool checkEdgeOverflow ( size_t hreserved, size_t vreserved ) const;
62  size_t updateDensity ();
63  void updateContacts ( unsigned int flags=KbOpenSession );
64  inline void setDensityMode ( unsigned int );
65  void _xmlWrite ( ostream& );
66  virtual Record* _getRecord () const;
67  virtual string _getString () const;
68  virtual string _getTypeName () const;
69 
70  // Attributes.
71  protected:
72  KatabaticEngine* _katabatic;
73  int _densityMode;
74  size_t _hEdgeCapacity;
75  size_t _vEdgeCapacity;
76 
77  // Constructors & Destructors.
78  protected:
80  virtual ~GCellGrid ();
81  void _postCreate ();
82  void _preDestroy ();
83  static GCellGrid* create ( KatabaticEngine* );
84  private:
85  GCellGrid ( const GCellGrid& );
86  GCellGrid& operator= ( const GCellGrid& );
87 
88  // Friends.
89  friend class KatabaticEngine;
90  };
91 
92 
93  inline KatabaticEngine* GCellGrid::getKatabatic () const { return _katabatic; }
94  inline unsigned int GCellGrid::getDensityMode () const { return _densityMode; }
95  inline size_t GCellGrid::getHEdgeCapacity () const { return _hEdgeCapacity; }
96  inline size_t GCellGrid::getVEdgeCapacity () const { return _vEdgeCapacity; }
97  inline void GCellGrid::setDensityMode ( unsigned int mode ) { _densityMode=mode; }
98 
99 
100 } // End of Katabatic namespace.
101 
102 
103 INSPECTOR_P_SUPPORT(Katabatic::GCellGrid);
104 
105 
106 
107 #endif // __KATABATIC_GCELL_GRID__
size_t updateDensity()
Definition: GCellGrid.cpp:158
void _preDestroy()
Definition: GCellGrid.cpp:115
Definition: Constants.h:23
Definition: GCellGrid.h:46
unsigned int getDensityMode() const
Definition: GCellGrid.h:94
Template Class for Regular Grid.
Definition: Grid.h:136
Cell * getCell() const
Definition: GCellGrid.cpp:127
Interval getUSide(unsigned int) const
Definition: GCellGrid.cpp:133
Definition: GCellGrid.h:48
Definition: GCellGrid.h:47
Definition: GCellGrid.h:44
void setDensityMode(unsigned int)
Definition: GCellGrid.h:97
void updateContacts(unsigned int flags=KbOpenSession)
Definition: GCellGrid.cpp:147
Definition: GCellGrid.h:50
GCell Grid.
Definition: GCellGrid.h:42
static GCellGrid * create(KatabaticEngine *)
Definition: GCellGrid.cpp:103
The namespace dedicated to Katabatic.
Definition: Katabatic.dox:13
The Katabatic Tool.
Definition: KatabaticEngine.h:91
size_t checkDensity() const
Definition: GCellGrid.cpp:168
void _postCreate()
Definition: GCellGrid.cpp:53
size_t getHEdgeCapacity() const
Definition: GCellGrid.h:95
DensityMode
Definition: GCellGrid.h:44
Definition: GCellGrid.h:49
size_t getVEdgeCapacity() const
Definition: GCellGrid.h:96
KatabaticEngine * getKatabatic() const
Definition: GCellGrid.h:93
Definition: GCellGrid.h:45


Generated by doxygen 1.8.14 on Sun May 26 2019 Return to top of page
Katabatic - Routing Toolbox Copyright © 2008-2016 UPMC. All rights reserved