Hurricane VLSI Database


Diagonal.h
1 // -*- C++ -*-
2 //
3 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
4 //
5 // This file is part of Hurricane.
6 //
7 // Hurricane is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
11 //
12 // Hurricane is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
14 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the Lesser GNU General Public
18 // License along with Hurricane. If not, see
19 // <http://www.gnu.org/licenses/>.
20 //
21 // +-----------------------------------------------------------------+
22 // | H U R R I C A N E |
23 // | V L S I B a c k e n d D a t a - B a s e |
24 // | |
25 // | Authors : Jean-Paul Chaput |
26 // | E-mail : Jean-Paul.Chaput@lip6.fr |
27 // | =============================================================== |
28 // | C++ Header : "./hurricane/Diagonal.h" |
29 // +-----------------------------------------------------------------+
30 
31 
32 #ifndef HURRICANE_DIAGONAL_H
33 #define HURRICANE_DIAGONAL_H
34 
35 #include "hurricane/Component.h"
36 
37 
38 namespace Hurricane {
39 
40  class Layer;
41 
42 
43 // -------------------------------------------------------------------
44 // Class : "Diagonal".
45 
46  class Diagonal : public Component {
47  public:
48  typedef Component Super;
49 
50  public:
51  static Diagonal* create ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
52  // Accessors.
53  virtual bool isNonRectangle () const;
54  virtual DbU::Unit getX () const;
55  virtual DbU::Unit getY () const;
56  virtual DbU::Unit getSourceX () const;
57  virtual DbU::Unit getSourceY () const;
58  virtual DbU::Unit getTargetX () const;
59  virtual DbU::Unit getTargetY () const;
60  virtual Point getSourcePosition () const;
61  virtual Point getTargetPosition () const;
62  virtual Box getBoundingBox () const;
63  virtual Box getBoundingBox ( const BasicLayer* ) const;
64  virtual size_t getPointsSize () const;
65  virtual Point getPoint ( size_t i ) const;
66  DbU::Unit getWidth () const;
67  virtual const Layer* getLayer () const;
68  // Mutators.
69  void setLayer ( const Layer* );
70  void setWidth ( DbU::Unit );
71  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
72  void setSource ( Point );
73  void setTarget ( Point );
74  // Hurricane management.
75  virtual void _toJson ( JsonWriter* ) const;
76  static JsonObject* getJsonObject ( unsigned long flags );
77  virtual string _getTypeName () const;
78  virtual string _getString () const;
79  virtual Record* _getRecord () const;
80  protected:
81  Diagonal ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
82  void _updateB ();
83  private:
84  const Layer* _layer;
85  Point _source;
86  Point _target;
87  DbU::Unit _width;
88  DbU::Unit _B; // octagon half Y.
89  };
90 
91 
92 // -------------------------------------------------------------------
93 // Class : "JsonRoutingDiagonal".
94 
95  class JsonDiagonal : public JsonComponent {
96  public:
97  static void initialize ();
98  JsonDiagonal ( unsigned long flags );
99  virtual std::string getTypeName () const;
100  virtual JsonDiagonal* clone ( unsigned long ) const;
101  virtual void toData ( JsonStack& );
102  };
103 
104 } // Hurricane namespace.
105 
106 
107 INSPECTOR_P_SUPPORT(Hurricane::Diagonal);
108 
109 #endif // HURRICANE_DIAGONAL_H
BasicLayer description (API)
Definition: BasicLayer.h:44
Box description (API)
Definition: Box.h:31
Component description (API)
Definition: Component.h:42
std::int64_t Unit
Definition: DbU.h:67
Diagonal description (API)
Definition: Diagonal.h:46
static Diagonal * create(Net *, const Layer *, const Point &source, const Point &target, DbU::Unit width)
Component Super
Definition: Diagonal.h:48
Support for JSON export.
Definition: JsonObject.h:83
JSON Parser Stack.
Definition: JsonObject.h:249
Layer description (API)
Definition: Layer.h:52
Net description (API)
Definition: Net.h:48
Point description (API)
Definition: Point.h:32
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5


Generated by doxygen 1.9.1 on Thu Aug 11 2022 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved