Hurricane VLSI Database


Plug.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Plug.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_PLUG
21 #define HURRICANE_PLUG
22 
23 #include "hurricane/Component.h"
24 #include "hurricane/Plugs.h"
25 
26 namespace Hurricane {
27 
28 class Net;
29 class Instance;
30 
31 
32 
33 // ****************************************************************************************************
34 // Plug declaration
35 // ****************************************************************************************************
36 
37 class Plug : public Component {
38 // **************************
39  private:
40  static FastRTTI _fastRTTI;
41  public:
42  static inline const FastRTTI& fastRTTI ();
43  virtual const FastRTTI& vfastRTTI () const;
44 
45 // Types
46 // *****
47 
48  public: typedef Component Inherit;
49 
50 // Attributes
51 // **********
52 
53  private: Instance* _instance;
54  private: Net* _masterNet;
55  private: Plug* _nextOfInstancePlugMap;
56 
57 // Constructors
58 // ************
59 
60  protected: Plug(Instance* instance, Net* masterNet);
61 
62 // Destructor
63 // **********
64 
65  public: virtual void destroy();
66 
67 // Accessors
68 // *********
69 
70  public: virtual Cell* getCell() const;
71  public: virtual DbU::Unit getX() const;
72  public: virtual DbU::Unit getY() const;
73  public: virtual Point getPosition() const;
74  public: virtual Box getBoundingBox() const;
75  public: virtual const Layer* getLayer() const {return NULL;};
76  public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
77  public: Instance* getInstance() const {return _instance;};
78  public: Net* getMasterNet() const {return _masterNet;};
79 
80 // Filters
81 // *******
82 
83  public: static PlugFilter getIsConnectedFilter();
85 
86 // Predicates
87 // **********
88 
89  public: bool isConnected() const {return (getNet() != NULL);};
90 
91 // Updators
92 // ********
93 
94  public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy) {};
95 
96  public: void setNet(Net* net);
97 
98  public: virtual void materialize() {};
99  public: virtual void unmaterialize() {};
100 
101 // Others
102 // ******
103 
104  public: static Plug* _create(Instance* instance, Net* masterNet);
105  protected: virtual void _postCreate();
106 
107  public: void _destroy();
108  protected: virtual void _preDestroy();
109 
110  public: virtual string getName() const;
111  public: virtual void _toJson(JsonWriter*) const;
112  public: virtual string _getTypeName() const {return _TName("Plug");};
113  public: virtual string _getString() const;
114  public: virtual Record* _getRecord() const;
115  public: Plug* _getNextOfInstancePlugMap() const {return _nextOfInstancePlugMap;};
116 
117  public: virtual void _setMasterNet(Net* masterNet) {_masterNet = masterNet;};
118  public: void _setNextOfInstancePlugMap(Plug* plug) {_nextOfInstancePlugMap = plug;};
119 
120 };
121 
122 
123  inline const FastRTTI& Plug::fastRTTI () { return _fastRTTI; }
124 
125 
126 class JsonPlug : public JsonComponent {
127 // ************************************
128 
129  public: static void initialize();
130  public: JsonPlug(unsigned long flags);
131  public: virtual string getTypeName() const;
132  public: virtual JsonPlug* clone(unsigned long) const;
133  public: virtual void toData(JsonStack&);
134 };
135 
136 
137 class JsonPlugRef : public JsonObject {
138 // ************************************
139 
140  public: static void initialize();
141  public: JsonPlugRef(unsigned long flags);
142  public: virtual string getTypeName() const;
143  public: virtual JsonPlugRef* clone(unsigned long) const;
144  public: virtual void toData(JsonStack&);
145 };
146 
147 } // End of Hurricane namespace.
148 
149 
150 INSPECTOR_P_SUPPORT(Hurricane::Plug);
151 
152 
153 #endif // HURRICANE_PLUG
154 
155 
156 // ****************************************************************************************************
157 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
158 // ****************************************************************************************************
BasicLayer description (API)
Definition: BasicLayer.h:42
Box description (API)
Definition: Box.h:30
The model (API).
Definition: Cell.h:64
Component description (API)
Definition: Component.h:43
Net * getNet() const
Definition: Component.h:102
std::int64_t Unit
Definition: DbU.h:67
Generic Filter auto-pointer.
Definition: Filter.h:86
Instance description (API)
Definition: Instance.h:35
Layer description (API)
Definition: Layer.h:120
Net description (API)
Definition: Net.h:46
Plug description (API)
Definition: Plug.h:37
bool isConnected() const
Definition: Plug.h:89
static PlugFilter getIsConnectedFilter()
Net * getMasterNet() const
Definition: Plug.h:78
Instance * getInstance() const
Definition: Plug.h:77
Component Inherit
Definition: Plug.h:48
static PlugFilter getIsUnconnectedFilter()
void setNet(Net *net)
Point description (API)
Definition: Point.h:30
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