Hurricane VLSI Database


Diagonal.h
1 // -*- C++ -*-
2 //
3 // Copyright (c) BULL S.A. 2000-2023, 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 #pragma once
33 #include "hurricane/Component.h"
34 
35 
36 namespace Hurricane {
37 
38  class Layer;
39 
40 
41 // -------------------------------------------------------------------
42 // Class : "Diagonal".
43 
44  class Diagonal : public Component {
45  public:
46  typedef Component Super;
47 
48  public:
49  static Diagonal* create ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
50  // Accessors.
51  virtual bool isNonRectangle () const;
52  virtual DbU::Unit getX () const;
53  virtual DbU::Unit getY () const;
54  virtual DbU::Unit getSourceX () const;
55  virtual DbU::Unit getSourceY () const;
56  virtual DbU::Unit getTargetX () const;
57  virtual DbU::Unit getTargetY () const;
58  virtual Point getSourcePosition () const;
59  virtual Point getTargetPosition () const;
60  virtual Box getBoundingBox () const;
61  virtual Box getBoundingBox ( const BasicLayer* ) const;
62  virtual size_t getPointsSize () const;
63  virtual Point getPoint ( size_t i ) const;
64  DbU::Unit getWidth () const;
65  virtual const Layer* getLayer () const;
66  // Mutators.
67  void setLayer ( const Layer* );
68  void setWidth ( DbU::Unit );
69  virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
70  void setSource ( Point );
71  void setTarget ( Point );
72  // Hurricane management.
73  virtual void _toJson ( JsonWriter* ) const;
74  static JsonObject* getJsonObject ( unsigned long flags );
75  virtual string _getTypeName () const;
76  virtual string _getString () const;
77  virtual Record* _getRecord () const;
78  protected:
79  Diagonal ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
80  void _updateB ();
81  private:
82  const Layer* _layer;
83  Point _source;
84  Point _target;
85  DbU::Unit _width;
86  DbU::Unit _dWidth; // octagon half Y.
87  };
88 
89 
90 // -------------------------------------------------------------------
91 // Class : "JsonRoutingDiagonal".
92 
93  class JsonDiagonal : public JsonComponent {
94  public:
95  static void initialize ();
96  JsonDiagonal ( unsigned long flags );
97  virtual std::string getTypeName () const;
98  virtual JsonDiagonal* clone ( unsigned long ) const;
99  virtual void toData ( JsonStack& );
100  };
101 
102 } // Hurricane namespace.
103 
104 
105 INSPECTOR_P_SUPPORT(Hurricane::Diagonal);
BasicLayer description (API)
Definition: BasicLayer.h:42
Box description (API)
Definition: Box.h:29
Component description (API)
Definition: Component.h:43
std::int64_t Unit
Definition: DbU.h:67
Diagonal description (API)
Definition: Diagonal.h:44
static Diagonal * create(Net *, const Layer *, const Point &source, const Point &target, DbU::Unit width)
Component Super
Definition: Diagonal.h:46
Support for JSON export.
Definition: JsonObject.h:83
JSON Parser Stack.
Definition: JsonObject.h:249
Layer description (API)
Definition: Layer.h:50
Net description (API)
Definition: Net.h:46
Point description (API)
Definition: Point.h:30
Contains Almost Everything.
Definition: BasicLayer.h:39


Generated by doxygen 1.9.1 on Wed Nov 20 2024 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved