MTMCSim
0.5
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
Pages
topConf.h
Go to the documentation of this file.
1
#ifndef _TOPPARA_H_INCLUDED
2
#define _TOPPARA_H_INCLUDED
3
#include "
SimuPara.h
"
4
#include "
Util.h
"
5
6
namespace
MTMCSim{
7
class
topConf
:
public
SimuPara
8
{
9
public
:
10
string
workingDir
,
relative_profileFN
,
tempFN
,
formatFN
;
11
int
queueSize
,
nThreads
;
12
string
simuName
;
13
int
mulMode
;
14
int
noSimu
;
15
16
shared_ptr<SimuPara>
clone
()
const
17
{
return
shared_ptr<topConf>(
new
topConf
(*
this
));}
18
19
20
void
loadPara
(
const
paraMap
& para,
DispUI
& ui)
21
{
22
using namespace
Util;
23
if
(!
getIntPara
(para,
"nThreads"
,
nThreads
))
24
paraMissingWarning
(ui,
"nThreads"
);
25
26
if
(!
getIntPara
(para,
"queueSize"
,
queueSize
))
27
paraMissingWarning
(ui,
"queueSize"
);
28
29
if
(!
getStrPara
(para,
"profile file name"
,
relative_profileFN
))
30
paraMissingWarning
(ui,
"profile file name"
);
31
string
dir =
relative_profileFN
.substr(0,
relative_profileFN
.find(
'/'
));
32
33
if
(!
getStrPara
(para,
"format file name"
,
formatFN
))
34
{
35
paraMissingWarning
(ui,
"format file name"
);
36
formatFN
= dir +
"/Format.txt"
;
37
}
38
39
if
(!
getStrPara
(para,
"temp file name"
,
tempFN
))
40
{
41
paraMissingWarning
(ui,
"temp file name"
);
42
tempFN
= dir +
"/tempFile.txt"
;
43
}
44
45
if
(!
getStrPara
(para,
"simulation name"
,
simuName
))
46
paraMissingWarning
(ui,
"simulation name"
);
47
if
(!
getIntPara
(para,
"multiple run mode"
,
mulMode
))
48
paraMissingWarning
(ui,
"multiple run mode"
);
49
if
(!
getIntPara
(para,
"no simulation"
,
noSimu
))
50
paraMissingWarning
(ui,
"no simulation"
);
51
52
53
54
55
}
56
};
57
58
}
59
60
61
62
63
64
#endif
include
topConf.h
Generated on Sun Jul 21 2013 01:02:13 for MTMCSim by
1.8.4