00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _SETUP_H_
00036 #define _SETUP_H_
00037
00038 #include "../main/includes.h"
00039 #include "../string/string.h"
00040
00047 class Setup {
00048 public:
00049
00051 enum e {
00052
00054 COMMUN_PORT = 25595,
00055
00057 COMMUN_SHMEM_SIZE = 256*1024
00058 };
00059
00061 enum eCommunType {
00062
00064 COMMUN_SOCKET,
00065
00067 COMMUN_SHMEM
00068 };
00069
00071 enum eLEVEL {
00072
00073 LEVEL_OBJECT,
00074 LEVEL_METHOD,
00075 LEVEL_TRACE
00076 };
00077
00079 struct Alloc {
00080
00082 int turnedOn;
00083
00088 eLEVEL level;
00089
00091 int traceDepth;
00092
00094 int threadsEnabled;
00095 };
00096
00098 struct Cpu {
00099
00101 int turnedOn;
00102
00104 int sampling;
00105
00109 eLEVEL level;
00110
00112 int traceDepth;
00113
00115 int threadsEnabled;
00116 };
00117
00119 struct Mon {
00120
00122 int turnedOn;
00123
00127 eLEVEL level;
00128
00130 int traceDepth;
00131
00133 int threadsEnabled;
00134 };
00135
00137 struct Com {
00138
00140 eCommunType communType;
00141
00143 int connectMode;
00144
00146 String hostname;
00147
00149 unsigned short port;
00150
00152 int shmemSize;
00153
00155 String shmemId;
00156
00158 Com() :
00159
00160 communType( COMMUN_SOCKET),
00161 connectMode( 0),
00162
00163 hostname( "127.0.0.1"),
00164 port( COMMUN_PORT),
00165
00166 shmemSize( COMMUN_SHMEM_SIZE),
00167 shmemId( "com")
00168
00169 {}
00170 };
00171
00172 public:
00173
00175 Alloc alloc;
00176
00178 Cpu cpu;
00179
00181 Mon mon;
00182
00184 Com com;
00185
00186 public:
00187
00195 Setup( char* options = NULL);
00196
00201 void processOptions(char* options);
00202
00203 private:
00204
00209 void processOption(char* option);
00210
00216 void setParameter(char* name, char* value);
00217 };
00218
00219 #endif //_SETUP_H_