-
Notifications
You must be signed in to change notification settings - Fork 0
/
defStru.h
59 lines (51 loc) · 1.01 KB
/
defStru.h
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
#pragma once
#include "QString.h"
#include <vector>
#include "help.h"
using namespace std;
namespace DEF
{
struct component
{
qstring instName;
qstring cellName;
float x;
float y;
qstring dire;
static component get(qstring stri)
{
component com;
qstringList strList=help::splitSpace(stri);
for(int i=0;i<strList.size();i++)
{
if(strList[i]=="-")
{
com.instName=strList[i+1];
com.cellName=strList[i+2];
}
else if(strList[i]=="(")
{
com.x=strList[i+1].toFloat();
com.y=strList[i+2].toFloat();
}
else if(strList[i]==")")
{
com.dire=strList[i+1];
break;
}
}
return com;
}
};
struct pin
{
qstring instName;
qstring pinName;
};
struct net
{
qstring name;
vector<pin> allPin; //连接这些pin
net(qstring name):name(name){}
};
}