Debian Codegraph @

HercConfiguration/DeviceTypes.cpp

raw symbols SCIP
1 /*
2 * File: DeviceTypes.cpp
3 *
4 * Author: Jacob Dekel
5 * Created on: Oct 15, 2009
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id$
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25 #include "HerculesStudio.h"cxx . . $ `<file>/HercStudio/HerculesStudio.h`/
26 #include "DeviceTypes.h"cxx . . $ `<file>/HercConfiguration/DeviceTypes.h`/
27 #include "Environment.h"cxx . . $ `<file>/HercStudio/Environment.h`/
28
29
30 #define NUM_DEVICEScxx . . $ `HercConfiguration/DeviceTypes.cpp:30:9`! 12
31 stdcxx . . $ std/::vectorcxx . . $ std/vector#<QIconcxx . . $ QIcon#> DeviceTypescxx . . $ DeviceTypes#::sDeviceIconscxx . . $ DeviceTypes#sDeviceIcons.;
32 DeviceTypescxx . . $ DeviceTypes# DeviceTypescxx . . $ DeviceTypes#::mInstancecxx . . $ DeviceTypes#mInstance.;
33
34 const char *DeviceTypescxx . . $ DeviceTypes#::sDeviceNamescxx . . $ DeviceTypes#sDeviceNames.[NUM_DEVICEScxx . . $ `HercConfiguration/DeviceTypes.cpp:30:9`!] =
35 {
36 "Unknown",
37 "Display Terminal",
38 "SYSG",
39 "Consoles",
40 "Printers",
41 "Card Readers",
42 "Card Punch",
43 "Line Printers",
44 "Tape Drives",
45 "CTC",
46 "Dasd",
47 "OSA"
48 };
49
50 const char *DeviceTypescxx . . $ DeviceTypes#::sDeviceIconNamescxx . . $ DeviceTypes#sDeviceIconNames.[NUM_DEVICEScxx . . $ `HercConfiguration/DeviceTypes.cpp:30:9`!] =
51 {
52 "/unknown.jpg", //0
53 "/terminal.jpg", //1
54 "/terminal.jpg", //2
55 "/console.jpg", //3
56 "/printer.jpg", //4
57 "/card.jpg", //5
58 "/unknown.jpg", //6
59 "/printer.jpg", //7
60 "/tape.jpg", //8
61 "/net.jpg", //9
62 "/dasd.jpg", //10
63 "/net.jpg" //11
64 };
65
66
67 DeviceTypescxx . . $ DeviceTypes#::DeviceTypescxx . . $ DeviceTypes#DeviceTypes(49f6e7a06ebc5aa8).()
68 {
69 }
70
71 DeviceTypescxx . . $ DeviceTypes#::~cxx . . $ DeviceTypes#`~DeviceTypes`(49f6e7a06ebc5aa8).DeviceTypescxx . . $ DeviceTypes#()
72 {
73 }
74
75 DeviceTypescxx . . $ DeviceTypes# & DeviceTypescxx . . $ DeviceTypes#::instancecxx . . $ DeviceTypes#instance(c065a99473e12f8e).()
76 {
77 return mInstancecxx . . $ DeviceTypes#mInstance.;
78 }
79
80 QIconcxx . . $ QIcon# & DeviceTypescxx . . $ DeviceTypes#::getIconcxx . . $ DeviceTypes#getIcon(bb7825627a920bdb).(DeviceTypescxx . . $ DeviceTypes#::Typecxx . . $ DeviceTypes#Type# type)
81 {
82 if (sDeviceIconscxx . . $ DeviceTypes#sDeviceIcons..emptycxx . . $ std/vector#empty(50ce9a9e25b4a850).())
83 {
84 stdcxx . . $ std/::stringcxx . . $ std/string# iconsPath = Environmentcxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).::getIconsPathcxx . . $ Environment#getIconsPath(75da78375bc7a3dd).();
85 for (int i=0; i<NUM_DEVICEScxx . . $ `HercConfiguration/DeviceTypes.cpp:30:9`!; i++)
86 {
87 QStringcxx . . $ QString# iPathcxx . . $ QString#QString(e1217c004a86c950). = iconsPathcxx . . $ QString#QString(85c52e162fed56f9)..c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).();
88 iPath +=cxx . . $ QString#`operator+=`(d02845eef0c33901). sDeviceIconNamescxx . . $ DeviceTypes#sDeviceIconNames.[i];
89 hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(5,i <<" ipath:"<<iPath.toStdString());
90 sDeviceIconscxx . . $ DeviceTypes#sDeviceIcons..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(iPath));
91 }
92 }
93 return sDeviceIconscxx . . $ DeviceTypes#sDeviceIcons..atcxx . . $ std/vector#at(428bb168810b9e52).(type);
94 }
95
96 const char *DeviceTypescxx . . $ DeviceTypes#::getNamecxx . . $ DeviceTypes#getName(22828f0427237af0).(Typecxx . . $ DeviceTypes#Type# type)
97 {
98 if (type < 0 || type > NUM_DEVICEScxx . . $ `HercConfiguration/DeviceTypes.cpp:30:9`!) return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
99 return sDeviceNamescxx . . $ DeviceTypes#sDeviceNames.[type];
100 }