1 /*
2  * CvcMaps.cc
3  *
4  * Copyright 2014-2018 D. Mitch Bailey  cvc at shuharisystem dot com
5  *
6  * This file is part of cvc.
7  *
8  * cvc is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * cvc is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with cvc.  If not, see <http://www.gnu.org/licenses/>.
20  *
21  * You can download cvc from https://github.com/d-m-bailey/cvc.git
22  */
23 
24 #include "CvcMaps.hh"
25 
26 unordered_map<string, relation_t> gRelationStringMap({
27 	{"=", equals},
28 	{"<", lessThan},
29 	{">", greaterThan},
30 	{"=>", notLessThan},
31 	{">=", notLessThan},
32 	{"=<", notGreaterThan},
33 	{"<=", notGreaterThan},
34 });
35 
36 map<relation_t, string> gRelationMap({
37 	{equals, "="},
38 	{lessThan, "<"},
39 	{greaterThan, ">"},
40 	{notLessThan, ">="},
41 	{notGreaterThan, "<="},
42 });
43 
44 unordered_map<string, modelType_t> gModelTypeStringMap({
45 	{"M", MOSFET},
46 	{"MN", NMOS},	{"LDDN", LDDN},
47 	{"MP", PMOS},	{"LDDP", LDDP},
48 	{"R", RESISTOR},	{"RESISTOR", RESISTOR},
49 	{"C", CAPACITOR},	{"CAPACITOR", CAPACITOR},
50 	{"D", DIODE},	{"DIODE", DIODE},
51 	{"switch_on", SWITCH_ON},
52 	{"switch_off", SWITCH_OFF},
53 	{"fuse_on", FUSE_ON},
54 	{"fuse_off", FUSE_OFF},
55 	{"Q", BIPOLAR}, {"BIPOLAR", BIPOLAR},
56 	{"BOX", BOX}
57 });
58 
59 map<modelType_t, string> gModelTypeMap({
60 	{MOSFET, "mosfet"},
61 	{NMOS, "nmos"},
62 	{PMOS, "pmos"},
63 	{LDDN, "lddn"},
64 	{LDDP, "lddp"},
65 	{RESISTOR, "resistor"},
66 	{CAPACITOR, "capacitor"},
67 	{DIODE, "diode"},
68 	{SWITCH_ON, "switch_on"},
69 	{SWITCH_OFF, "switch_off"},
70 	{FUSE_ON, "fuse_on"},
71 	{FUSE_OFF, "fuse_off"},
72 	{BIPOLAR, "bipolar"},
73 	{BOX, "box"}
74 });
75 
76 map<modelType_t, string> gBaseModelTypePrefixMap({
77 	{MOSFET, "M"},
78 	{NMOS, "M"},
79 	{PMOS, "M"},
80 	{LDDN, "M"},
81 	{LDDP, "M"},
82 	{RESISTOR, "R"},
83 	{CAPACITOR, "C"},
84 	{DIODE, "D"},
85 	{SWITCH_ON, ""},
86 	{SWITCH_OFF, ""},
87 	{FUSE_ON, ""},
88 	{FUSE_OFF, ""},
89 	{BIPOLAR, "Q"},
90 	{BOX, "X"}
91 });
92 
93 map<eventQueue_t, string> gEventQueueTypeMap({
94 	{MAX_QUEUE, "MaximumQueue"},
95 	{MIN_QUEUE, "MinimumQueue"},
96 	{SIM_QUEUE, "SimulationQueue"},
97 });
98 
99 
100 
101