forked from libresilicon/qtflow
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlefmacro.cpp
92 lines (76 loc) · 1.22 KB
/
lefmacro.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include "lefmacro.h"
namespace lef {
LEFMacro::LEFMacro(QString n) :
m_sizeW(0),
m_sizeH(0),
m_name(n),
m_obstructions(new LEFObstruction)
{
}
QString LEFMacro::getName()
{
return m_name;
}
void LEFMacro::addPin(QString n)
{
m_pins.append(new LEFPin(n));
}
bool LEFMacro::pinExists(QString n)
{
foreach(lef::LEFPin *pin, m_pins)
if(pin->getName()==n)
return true;
return false;
}
QVector<LEFPin*> LEFMacro::getPins()
{
return m_pins;
}
LEFPin* LEFMacro::getPin(QString name)
{
LEFPin *p = NULL;
foreach(p, m_pins)
if(p->getName()==name)
return p;
return p;
}
QVector<QString> LEFMacro::getPinNames()
{
QVector<QString> ret;
foreach(LEFPin *m, m_pins) ret.append(m->getName());
return ret;
}
void LEFMacro::setSize(qreal w, qreal h)
{
m_sizeW = w;
m_sizeH = h;
}
qreal LEFMacro::getWidth()
{
return m_sizeW;
}
qreal LEFMacro::getHeight()
{
return m_sizeH;
}
LEFObstruction *LEFMacro::getObstruction()
{
return m_obstructions;
}
QString LEFMacro::getClass()
{
return m_class;
}
QString LEFMacro::getSite()
{
return m_site;
}
void LEFMacro::setClass(QString s)
{
m_class = s;
}
void LEFMacro::setSite(QString s)
{
m_site = s;
}
}