1 /*
2  * CvcMaps.hh
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 #ifndef CVCMAPS_HH_
25 #define CVCMAPS_HH_
26 
27 #include "Cvc.hh"
28 
29 extern unordered_map<string, relation_t> gRelationStringMap;
30 
31 extern map<relation_t, string> gRelationMap;
32 
33 extern unordered_map<string, modelType_t> gModelTypeStringMap;
34 
35 extern map<modelType_t, string> gModelTypeMap;
36 
37 extern map<modelType_t, string> gBaseModelTypePrefixMap;
38 
39 extern map<eventQueue_t, string> gEventQueueTypeMap;
40 
41 #define String_to_Voltage(value) (IsValidVoltage_(value) ? round(from_string<float>(value) * VOLTAGE_SCALE + 0.1) : UNKNOWN_VOLTAGE)
42 #define Voltage_to_float(value) (float(value) / VOLTAGE_SCALE)
43 
44 #endif /* CVCMAPS_HH_ */
45