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  private:
39  static FastRTTI _fastRTTI;
40  public:
41  static inline const FastRTTI& fastRTTI ();
42  virtual const FastRTTI& vfastRTTI () const;
43 
44 // Types
45 // *****
46 
47  public: typedef Segment Inherit;
48 
49 // Attributes
50 // **********
51 
52  private: DbU::Unit _y;
53  private: DbU::Unit _dxSource;
54  private: DbU::Unit _dxTarget;
55 
56 // Constructors
57 // ************
58 
59  protected: Horizontal ( Net* net
60  , Component* source
61  , Component* target
62  , const Layer* layer
63  , const DbU::Unit& y
64  , const DbU::Unit& width = 0
65  , const DbU::Unit& dxSource = 0
66  , const DbU::Unit& dxTarget = 0
67  );
68  public: static Horizontal* create ( Net* net
69  , const Layer* layer
70  , const DbU::Unit& y
71  , const DbU::Unit& width = 0
72  , const DbU::Unit& dxSource = 0
73  , const DbU::Unit& dxTarget = 0
74  );
75  public: static Horizontal* create ( Component* source
76  , Component* target
77  , const Layer* layer
78  , const DbU::Unit& y
79  , const DbU::Unit& width = 0
80  , const DbU::Unit& dxSource = 0
81  , const DbU::Unit& dxTarget = 0
82  );
83 
84 // Accessors
85 // *********
86 
87  public: virtual DbU::Unit getY() const {return _y;};
88  public: virtual Point getCenter() const;
89  public: virtual Box getBoundingBox() const;
90  public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
91  public: virtual DbU::Unit getSourceX() const;
92  public: virtual DbU::Unit getSourceY() const {return getY();};
93  public: virtual DbU::Unit getTargetX() const;
94  public: virtual DbU::Unit getTargetY() const {return getY();};
95  public: virtual DbU::Unit getLength() const;
96  public: const DbU::Unit& getDxSource() const {return _dxSource;};
97  public: const DbU::Unit& getDxTarget() const {return _dxTarget;};
98 
99 // Updators
100 // ********
101 
102  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
103 
104  public: void setY(const DbU::Unit& y);
105  public: void setDxSource(const DbU::Unit& dxSource);
106  public: void setDxTarget(const DbU::Unit& dxSource);
107  public: void translate(const DbU::Unit& dy);
108 
109 // Others
110 // ******
111 
112  public: virtual void _toJson(JsonWriter*) const;
113  public: static JsonObject* getJsonObject(unsigned long flags);
114  public: virtual string _getTypeName() const {return _TName("Horizontal");};
115  public: virtual string _getString() const;
116  public: virtual Record* _getRecord() const;
117 
118 };
119 
120 
121 inline const FastRTTI& Horizontal::fastRTTI () { return _fastRTTI; }
122 
123 
124 class JsonHorizontal : public JsonSegment {
125 // ****************************************
126 
127  public: static void initialize();
128  public: JsonHorizontal(unsigned long flags);
129  public: virtual string getTypeName() const;
130  public: virtual JsonHorizontal* clone(unsigned long) const;
131  public: virtual void toData(JsonStack&);
132 };
133 
134 } // End of Hurricane namespace.
135 
136 
137 INSPECTOR_P_SUPPORT(Hurricane::Horizontal);
138 
139 
140 #endif // HURRICANE_HORIZONTAL
141 
142 
143 // ****************************************************************************************************
144 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
145 // ****************************************************************************************************
BasicLayer description (API)
Definition: BasicLayer.h:42
Box description (API)
Definition: Box.h:30
Component description (API)
Definition: Component.h:43
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:47
void setY(const DbU::Unit &y)
const DbU::Unit & getDxSource() const
Definition: Horizontal.h:96
const DbU::Unit & getDxTarget() const
Definition: Horizontal.h:97
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:120
Net description (API)
Definition: Net.h:46
Point description (API)
Definition: Point.h:30
Segment description (API)
Definition: Segment.h:33
Contains Almost Everything.
Definition: BasicLayer.h:39


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