00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _OPENCITY_MAINSIM_H_
00021 #define _OPENCITY_MAINSIM_H_ 1
00022
00023 #include "main.h"
00024
00025 #include "simulator.h"
00026
00027
00028
00031 class MainSim : public Simulator {
00032 public:
00033
00036 enum OPENCITY_MICROSIM {
00037 OC_MICROSIM_RES = 0,
00038 OC_MICROSIM_COM,
00039 OC_MICROSIM_IND,
00040 OC_MICROSIM_ELE,
00041 OC_MICROSIM_TRA,
00042 OC_MICROSIM_MAX,
00043 OC_MICROSIM_DEFAULT
00044 };
00045
00046
00054 MainSim(
00055 SDL_mutex* mutex,
00056 BuildingLayer* pblayer,
00057 Map* pmap );
00058
00059
00060
00063 ~MainSim();
00064
00065
00066
00070 void
00071 SaveTo( std::fstream& rfs );
00072
00073
00074
00078 void
00079 LoadFrom( std::fstream& rfs );
00080
00081
00082
00085 int
00086 Main();
00087
00088
00089
00095 void
00096 AddStructure(
00097 const uint w1, const uint l1,
00098 const uint w2, const uint l2,
00099 const OPENCITY_MICROSIM sim = OC_MICROSIM_DEFAULT);
00100
00101
00102
00108 void
00109 RemoveStructure(
00110 const uint w1, const uint l1,
00111 const uint w2, const uint l2,
00112 const OPENCITY_MICROSIM sim = OC_MICROSIM_DEFAULT );
00113
00114
00115
00119 void
00120 Run();
00121
00122
00123
00127 void
00128 Stop();
00129
00130
00131
00135 void
00136 Return();
00137
00138
00139
00144 void
00145 RefreshSimValue();
00146
00147
00148
00153 const int
00154 GetValue(const OPENCITY_MICROSIM sim) const;
00155
00156
00157 private:
00158 Simulator* _tpSimulator[OC_MICROSIM_MAX];
00159 };
00160
00161 #endif
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194