Hurricane VLSI Database


Horizontal.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Horizontal.h
3 // Authors: R. Escassut
4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
5 //
6 // This file is part of Hurricane.
7 //
8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
9 // Lesser General Public License as 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 WITHOUT ANY WARRANTY; without even
13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
17 // not, see <http://www.gnu.org/licenses/>.
18 // ****************************************************************************************************
19 
20 #ifndef HURRICANE_HORIZONTAL
21 #define HURRICANE_HORIZONTAL
22 
23 #include "hurricane/Segment.h"
24 #include "hurricane/Horizontals.h"
25 
26 namespace Hurricane {
27 
28 
29  class Layer;
30 
31 
32 // ****************************************************************************************************
33 // Horizontal declaration
34 // ****************************************************************************************************
35 
36 class Horizontal : public Segment {
37 // ******************************
38 
39 // Types
40 // *****
41 
42  public: typedef Segment Inherit;
43 
44 // Attributes
45 // **********
46 
47  private: DbU::Unit _y;
48  private: DbU::Unit _dxSource;
49  private: DbU::Unit _dxTarget;
50 
51 // Constructors
52 // ************
53 
54  protected: Horizontal ( Net* net
55  , Component* source
56  , Component* target
57  , const Layer* layer
58  , const DbU::Unit& y
59  , const DbU::Unit& width = 0
60  , const DbU::Unit& dxSource = 0
61  , const DbU::Unit& dxTarget = 0
62  );
63  public: static Horizontal* create ( Net* net
64  , const Layer* layer
65  , const DbU::Unit& y
66  , const DbU::Unit& width = 0
67  , const DbU::Unit& dxSource = 0
68  , const DbU::Unit& dxTarget = 0
69  );
70  public: static Horizontal* create ( Component* source
71  , Component* target
72  , const Layer* layer
73  , const DbU::Unit& y
74  , const DbU::Unit& width = 0
75  , const DbU::Unit& dxSource = 0
76  , const DbU::Unit& dxTarget = 0
77  );
78 
79 // Accessors
80 // *********
81 
82  public: virtual DbU::Unit getY() const {return _y;};
83  public: virtual Point getCenter() const;
84  public: virtual Box getBoundingBox() const;
85  public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
86  public: virtual DbU::Unit getSourceX() const;
87  public: virtual DbU::Unit getSourceY() const {return getY();};
88  public: virtual DbU::Unit getTargetX() const;
89  public: virtual DbU::Unit getTargetY() const {return getY();};
90  public: virtual DbU::Unit getLength() const;
91  public: const DbU::Unit& getDxSource() const {return _dxSource;};
92  public: const DbU::Unit& getDxTarget() const {return _dxTarget;};
93 
94 // Updators
95 // ********
96 
97  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
98 
99  public: void setY(const DbU::Unit& y);
100  public: void setDxSource(const DbU::Unit& dxSource);
101  public: void setDxTarget(const DbU::Unit& dxSource);
102  public: void translate(const DbU::Unit& dy);
103 
104 // Others
105 // ******
106 
107  public: virtual void _toJson(JsonWriter*) const;
108  public: static JsonObject* getJsonObject(unsigned long flags);
109  public: virtual string _getTypeName() const {return _TName("Horizontal");};
110  public: virtual string _getString() const;
111  public: virtual Record* _getRecord() const;
112 
113 };
114 
115 
116 class JsonHorizontal : public JsonSegment {
117 // ****************************************
118 
119  public: static void initialize();
120  public: JsonHorizontal(unsigned long flags);
121  public: virtual string getTypeName() const;
122  public: virtual JsonHorizontal* clone(unsigned long) const;
123  public: virtual void toData(JsonStack&);
124 };
125 
126 } // End of Hurricane namespace.
127 
128 
129 INSPECTOR_P_SUPPORT(Hurricane::Horizontal);
130 
131 
132 #endif // HURRICANE_HORIZONTAL
133 
134 
135 // ****************************************************************************************************
136 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
137 // ****************************************************************************************************
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
Horizontal description (API)
Definition: Horizontal.h:36
static Horizontal * create(Net *net, const Layer *layer, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &dxSource=0, const DbU::Unit &dxTarget=0)
void translate(const DbU::Unit &dy)
Segment Inherit
Definition: Horizontal.h:42
void setY(const DbU::Unit &y)
const DbU::Unit & getDxSource() const
Definition: Horizontal.h:91
const DbU::Unit & getDxTarget() const
Definition: Horizontal.h:92
static Horizontal * create(Component *source, Component *target, const Layer *layer, const DbU::Unit &y, const DbU::Unit &width=0, const DbU::Unit &dxSource=0, const DbU::Unit &dxTarget=0)
Support for JSON export.
Definition: JsonObject.h:83
Layer description (API)
Definition: Layer.h:52
Net description (API)
Definition: Net.h:48
Point description (API)
Definition: Point.h:32
Segment description (API)
Definition: Segment.h:33
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