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

Generated by doxygen 1.8.14 on Sun Mar 8 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved