Hurricane VLSI Database


Vertical.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Vertical.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_VERTICAL
21 #define HURRICANE_VERTICAL
22 
23 #include "hurricane/Segment.h"
24 #include "hurricane/Verticals.h"
25 
26 namespace Hurricane {
27 
28 
29  class Layer;
30 
31 
32 // ****************************************************************************************************
33 // Vertical declaration
34 // ****************************************************************************************************
35 
36 class Vertical : 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 _x;
53  private: DbU::Unit _dySource;
54  private: DbU::Unit _dyTarget;
55 
56 // Constructors
57 // ************
58 
59  protected: Vertical ( Net* net
60  , Component* source
61  , Component* target
62  , const Layer* layer
63  , const DbU::Unit& x
64  , const DbU::Unit& width = 0
65  , const DbU::Unit& dySource = 0
66  , const DbU::Unit& dyTarget = 0
67  );
68 
69  public: static Vertical* create ( Net* net
70  , const Layer* layer
71  , const DbU::Unit& x
72  , const DbU::Unit& width = 0
73  , const DbU::Unit& dySource = 0
74  , const DbU::Unit& dyTarget = 0
75  );
76  public: static Vertical* create ( Component* source
77  , Component* target
78  , const Layer* layer
79  , const DbU::Unit& x
80  , const DbU::Unit& width = 0
81  , const DbU::Unit& dySource = 0
82  , const DbU::Unit& dyTarget = 0
83  );
84 
85 // Accessors
86 // *********
87 
88  public: virtual DbU::Unit getX() const {return _x;};
89  public: virtual Point getCenter() const;
90  public: virtual Box getBoundingBox() const;
91  public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
92  public: virtual DbU::Unit getSourceX() const {return getX();};
93  public: virtual DbU::Unit getSourceY() const;
94  public: virtual DbU::Unit getTargetX() const {return getX();};
95  public: virtual DbU::Unit getTargetY() const;
96  public: virtual DbU::Unit getLength() const;
97  public: const DbU::Unit& getDySource() const {return _dySource;};
98  public: const DbU::Unit& getDyTarget() const {return _dyTarget;};
99 
100 // Updators
101 // ********
102 
103  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
104 
105  public: void setX(const DbU::Unit& x);
106  public: void setDySource(const DbU::Unit& dySource);
107  public: void setDyTarget(const DbU::Unit& dyTarget);
108  public: void translate(const DbU::Unit& dx);
109 
110 // Others
111 // ******
112 
113  public: virtual void _toJson(JsonWriter*) const;
114  public: static JsonObject* getJsonObject(unsigned long flags);
115  public: virtual string _getTypeName() const {return _TName("Vertical");};
116  public: virtual string _getString() const;
117  public: virtual Record* _getRecord() const;
118 
119 };
120 
121 
122 inline const FastRTTI& Vertical::fastRTTI () { return _fastRTTI; }
123 
124 
125 class JsonVertical : public JsonSegment {
126 // **************************************
127 
128  public: static void initialize();
129  public: JsonVertical(unsigned long flags);
130  public: virtual string getTypeName() const;
131  public: virtual JsonVertical* clone(unsigned long) const;
132  public: virtual void toData(JsonStack&);
133 };
134 
135 } // End of Hurricane namespace.
136 
137 
138 INSPECTOR_P_SUPPORT(Hurricane::Vertical);
139 
140 
141 #endif // HURRICANE_VERTICAL
142 
143 
144 // ****************************************************************************************************
145 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
146 // ****************************************************************************************************
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
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
Vertical description (API)
Definition: Vertical.h:36
Segment Inherit
Definition: Vertical.h:47
void translate(const DbU::Unit &dx)
static Vertical * create(Net *net, const Layer *layer, const DbU::Unit &x, const DbU::Unit &width=0, const DbU::Unit &dySource=0, const DbU::Unit &dyTarget=0)
const DbU::Unit & getDySource() const
Definition: Vertical.h:97
static Vertical * create(Component *source, Component *target, const Layer *layer, const DbU::Unit &x, const DbU::Unit &width=0, const DbU::Unit &dySource=0, const DbU::Unit &dyTarget=0)
void setX(const DbU::Unit &x)
const DbU::Unit & getDyTarget() const
Definition: Vertical.h:98
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