00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLCORE_EVENT_H__
00024 #define __PLCORE_EVENT_H__
00025 #pragma once
00026
00027
00028
00029
00030
00031 #include "PLCore/Base/Func/FuncGenFunPtr.h"
00032 #include "PLCore/Base/Event/DynEvent.h"
00033 #include "PLCore/Base/Event/EventHandler.h"
00034
00035
00036
00037
00038
00039 namespace PLCore {
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 template <typename T0 = NullType, typename T1 = NullType, typename T2 = NullType, typename T3 = NullType, typename T4 = NullType, typename T5 = NullType, typename T6 = NullType, typename T7 = NullType, typename T8 = NullType, typename T9 = NullType, typename T10 = NullType, typename T11 = NullType, typename T12 = NullType, typename T13 = NullType, typename T14 = NullType, typename T15 = NullType>
00053 class PLCORE_TMPL Event : public DynEvent {
00054 public:
00055 typedef typename Type<T0> ::_Type _T0;
00056 typedef typename Type<T1> ::_Type _T1;
00057 typedef typename Type<T2> ::_Type _T2;
00058 typedef typename Type<T3> ::_Type _T3;
00059 typedef typename Type<T4> ::_Type _T4;
00060 typedef typename Type<T5> ::_Type _T5;
00061 typedef typename Type<T6> ::_Type _T6;
00062 typedef typename Type<T7> ::_Type _T7;
00063 typedef typename Type<T8> ::_Type _T8;
00064 typedef typename Type<T9> ::_Type _T9;
00065 typedef typename Type<T10>::_Type _T10;
00066 typedef typename Type<T11>::_Type _T11;
00067 typedef typename Type<T12>::_Type _T12;
00068 typedef typename Type<T13>::_Type _T13;
00069 typedef typename Type<T14>::_Type _T14;
00070 typedef typename Type<T15>::_Type _T15;
00071 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TypeHandler;
00072 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TypeSignature;
00073 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> TypeParams;
00074
00075 Event()
00076 {
00077 }
00078
00079 virtual ~Event()
00080 {
00081 }
00082
00083 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10, _T11 t11, _T12 t12, _T13 t13, _T14 t14, _T15 t15) const
00084 {
00085
00086 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00087 while (pElement) {
00088
00089 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00090
00091
00092 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15);
00093
00094
00095 pElement = pNextElement;
00096 }
00097 }
00098
00099 virtual String GetSignature() const override
00100 {
00101 return TypeSignature::GetSignatureID();
00102 }
00103
00104 virtual uint32 GetNumOfParameters() const override
00105 {
00106 return 16;
00107 }
00108
00109 virtual int GetParameterTypeID(uint32 nIndex) const override
00110 {
00111 switch (nIndex) {
00112 case 0: return Type<T0> ::TypeID;
00113 case 1: return Type<T1> ::TypeID;
00114 case 2: return Type<T2> ::TypeID;
00115 case 3: return Type<T3> ::TypeID;
00116 case 4: return Type<T4> ::TypeID;
00117 case 5: return Type<T5> ::TypeID;
00118 case 6: return Type<T6> ::TypeID;
00119 case 7: return Type<T7> ::TypeID;
00120 case 8: return Type<T8> ::TypeID;
00121 case 9: return Type<T9> ::TypeID;
00122 case 10: return Type<T10>::TypeID;
00123 case 11: return Type<T11>::TypeID;
00124 case 12: return Type<T12>::TypeID;
00125 case 13: return Type<T13>::TypeID;
00126 case 14: return Type<T14>::TypeID;
00127 case 15: return Type<T15>::TypeID;
00128 default: return TypeInvalid;
00129 }
00130 }
00131
00132 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00133 {
00134 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(pFunc, pUserData));
00135 }
00136
00137 virtual void Emit(DynParams &cParams) const override
00138 {
00139
00140 if (cParams.GetSignature() == GetSignature()) {
00141
00142 TypeParams &cP = static_cast<TypeParams&>(cParams);
00143
00144
00145 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00146 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00147 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00148 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13), Type<T14>::ConvertStorageToReal(cP.Param14), Type<T15>::ConvertStorageToReal(cP.Param15));
00149 }
00150 }
00151
00152 virtual void Emit(const DynParams &cParams) const override
00153 {
00154
00155 if (cParams.GetSignature() == GetSignature()) {
00156
00157 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00158
00159
00160 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00161 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00162 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00163 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13), Type<T14>::ConvertStorageToReal(cP.Param14), Type<T15>::ConvertStorageToReal(cP.Param15));
00164 }
00165 }
00166
00167 virtual void Emit(const String &sParams) const override
00168 {
00169 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::FromString(sParams);
00170 Emit(cParams);
00171 }
00172
00173 virtual void Emit(const XmlElement &cElement) const override
00174 {
00175 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::FromXml(cElement);
00176 Emit(cParams);
00177 }
00178 };
00179
00180
00181
00182
00183
00184
00185
00186
00187 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
00188 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> : public DynEvent {
00189 public:
00190 typedef typename Type<T0> ::_Type _T0;
00191 typedef typename Type<T1> ::_Type _T1;
00192 typedef typename Type<T2> ::_Type _T2;
00193 typedef typename Type<T3> ::_Type _T3;
00194 typedef typename Type<T4> ::_Type _T4;
00195 typedef typename Type<T5> ::_Type _T5;
00196 typedef typename Type<T6> ::_Type _T6;
00197 typedef typename Type<T7> ::_Type _T7;
00198 typedef typename Type<T8> ::_Type _T8;
00199 typedef typename Type<T9> ::_Type _T9;
00200 typedef typename Type<T10>::_Type _T10;
00201 typedef typename Type<T11>::_Type _T11;
00202 typedef typename Type<T12>::_Type _T12;
00203 typedef typename Type<T13>::_Type _T13;
00204 typedef typename Type<T14>::_Type _T14;
00205 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TypeHandler;
00206 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TypeSignature;
00207 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> TypeParams;
00208
00209 Event()
00210 {
00211 }
00212
00213 virtual ~Event()
00214 {
00215 }
00216
00217 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10, _T11 t11, _T12 t12, _T13 t13, _T14 t14) const
00218 {
00219
00220 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00221 while (pElement) {
00222
00223 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00224
00225
00226 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14);
00227
00228
00229 pElement = pNextElement;
00230 }
00231 }
00232
00233 virtual String GetSignature() const override
00234 {
00235 return TypeSignature::GetSignatureID();
00236 }
00237
00238 virtual uint32 GetNumOfParameters() const override
00239 {
00240 return 15;
00241 }
00242
00243 virtual int GetParameterTypeID(uint32 nIndex) const override
00244 {
00245 switch (nIndex) {
00246 case 0: return Type<T0> ::TypeID;
00247 case 1: return Type<T1> ::TypeID;
00248 case 2: return Type<T2> ::TypeID;
00249 case 3: return Type<T3> ::TypeID;
00250 case 4: return Type<T4> ::TypeID;
00251 case 5: return Type<T5> ::TypeID;
00252 case 6: return Type<T6> ::TypeID;
00253 case 7: return Type<T7> ::TypeID;
00254 case 8: return Type<T8> ::TypeID;
00255 case 9: return Type<T9> ::TypeID;
00256 case 10: return Type<T10>::TypeID;
00257 case 11: return Type<T11>::TypeID;
00258 case 12: return Type<T12>::TypeID;
00259 case 13: return Type<T13>::TypeID;
00260 case 14: return Type<T14>::TypeID;
00261 default: return TypeInvalid;
00262 }
00263 }
00264
00265 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00266 {
00267 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(pFunc, pUserData));
00268 }
00269
00270 virtual void Emit(DynParams &cParams) const override
00271 {
00272
00273 if (cParams.GetSignature() == GetSignature()) {
00274
00275 TypeParams &cP = static_cast<TypeParams&>(cParams);
00276
00277
00278 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00279 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00280 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00281 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13), Type<T14>::ConvertStorageToReal(cP.Param14));
00282 }
00283 }
00284
00285 virtual void Emit(const DynParams &cParams) const override
00286 {
00287
00288 if (cParams.GetSignature() == GetSignature()) {
00289
00290 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00291
00292
00293 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00294 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00295 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00296 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13), Type<T14>::ConvertStorageToReal(cP.Param14));
00297 }
00298 }
00299
00300 virtual void Emit(const String &sParams) const override
00301 {
00302 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::FromString(sParams);
00303 Emit(cParams);
00304 }
00305
00306 virtual void Emit(const XmlElement &cElement) const override
00307 {
00308 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::FromXml(cElement);
00309 Emit(cParams);
00310 }
00311 };
00312
00313
00314
00315
00316
00317
00318
00319
00320 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
00321 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> : public DynEvent {
00322 public:
00323 typedef typename Type<T0> ::_Type _T0;
00324 typedef typename Type<T1> ::_Type _T1;
00325 typedef typename Type<T2> ::_Type _T2;
00326 typedef typename Type<T3> ::_Type _T3;
00327 typedef typename Type<T4> ::_Type _T4;
00328 typedef typename Type<T5> ::_Type _T5;
00329 typedef typename Type<T6> ::_Type _T6;
00330 typedef typename Type<T7> ::_Type _T7;
00331 typedef typename Type<T8> ::_Type _T8;
00332 typedef typename Type<T9> ::_Type _T9;
00333 typedef typename Type<T10>::_Type _T10;
00334 typedef typename Type<T11>::_Type _T11;
00335 typedef typename Type<T12>::_Type _T12;
00336 typedef typename Type<T13>::_Type _T13;
00337 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TypeHandler;
00338 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TypeSignature;
00339 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> TypeParams;
00340
00341 Event()
00342 {
00343 }
00344
00345 virtual ~Event()
00346 {
00347 }
00348
00349 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10, _T11 t11, _T12 t12, _T13 t13) const
00350 {
00351
00352 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00353 while (pElement) {
00354
00355 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00356
00357
00358 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13);
00359
00360
00361 pElement = pNextElement;
00362 }
00363 }
00364
00365 virtual String GetSignature() const override
00366 {
00367 return TypeSignature::GetSignatureID();
00368 }
00369
00370 virtual uint32 GetNumOfParameters() const override
00371 {
00372 return 14;
00373 }
00374
00375 virtual int GetParameterTypeID(uint32 nIndex) const override
00376 {
00377 switch (nIndex) {
00378 case 0: return Type<T0> ::TypeID;
00379 case 1: return Type<T1> ::TypeID;
00380 case 2: return Type<T2> ::TypeID;
00381 case 3: return Type<T3> ::TypeID;
00382 case 4: return Type<T4> ::TypeID;
00383 case 5: return Type<T5> ::TypeID;
00384 case 6: return Type<T6> ::TypeID;
00385 case 7: return Type<T7> ::TypeID;
00386 case 8: return Type<T8> ::TypeID;
00387 case 9: return Type<T9> ::TypeID;
00388 case 10: return Type<T10>::TypeID;
00389 case 11: return Type<T11>::TypeID;
00390 case 12: return Type<T12>::TypeID;
00391 case 13: return Type<T13>::TypeID;
00392 default: return TypeInvalid;
00393 }
00394 }
00395
00396 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00397 {
00398 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(pFunc, pUserData));
00399 }
00400
00401 virtual void Emit(DynParams &cParams) const override
00402 {
00403
00404 if (cParams.GetSignature() == GetSignature()) {
00405
00406 TypeParams &cP = static_cast<TypeParams&>(cParams);
00407
00408
00409 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00410 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00411 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00412 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13));
00413 }
00414 }
00415
00416 virtual void Emit(const DynParams &cParams) const override
00417 {
00418
00419 if (cParams.GetSignature() == GetSignature()) {
00420
00421 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00422
00423
00424 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00425 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00426 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00427 Type<T12>::ConvertStorageToReal(cP.Param12), Type<T13>::ConvertStorageToReal(cP.Param13));
00428 }
00429 }
00430
00431 virtual void Emit(const String &sParams) const override
00432 {
00433 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::FromString(sParams);
00434 Emit(cParams);
00435 }
00436
00437 virtual void Emit(const XmlElement &cElement) const override
00438 {
00439 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::FromXml(cElement);
00440 Emit(cParams);
00441 }
00442 };
00443
00444
00445
00446
00447
00448
00449
00450
00451 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
00452 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> : public DynEvent {
00453 public:
00454 typedef typename Type<T0> ::_Type _T0;
00455 typedef typename Type<T1> ::_Type _T1;
00456 typedef typename Type<T2> ::_Type _T2;
00457 typedef typename Type<T3> ::_Type _T3;
00458 typedef typename Type<T4> ::_Type _T4;
00459 typedef typename Type<T5> ::_Type _T5;
00460 typedef typename Type<T6> ::_Type _T6;
00461 typedef typename Type<T7> ::_Type _T7;
00462 typedef typename Type<T8> ::_Type _T8;
00463 typedef typename Type<T9> ::_Type _T9;
00464 typedef typename Type<T10>::_Type _T10;
00465 typedef typename Type<T11>::_Type _T11;
00466 typedef typename Type<T12>::_Type _T12;
00467 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TypeHandler;
00468 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TypeSignature;
00469 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TypeParams;
00470
00471 Event()
00472 {
00473 }
00474
00475 virtual ~Event()
00476 {
00477 }
00478
00479 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10, _T11 t11, _T12 t12) const
00480 {
00481
00482 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00483 while (pElement) {
00484
00485 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00486
00487
00488 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12);
00489
00490
00491 pElement = pNextElement;
00492 }
00493 }
00494
00495 virtual String GetSignature() const override
00496 {
00497 return TypeSignature::GetSignatureID();
00498 }
00499
00500 virtual uint32 GetNumOfParameters() const override
00501 {
00502 return 13;
00503 }
00504
00505 virtual int GetParameterTypeID(uint32 nIndex) const override
00506 {
00507 switch (nIndex) {
00508 case 0: return Type<T0> ::TypeID;
00509 case 1: return Type<T1> ::TypeID;
00510 case 2: return Type<T2> ::TypeID;
00511 case 3: return Type<T3> ::TypeID;
00512 case 4: return Type<T4> ::TypeID;
00513 case 5: return Type<T5> ::TypeID;
00514 case 6: return Type<T6> ::TypeID;
00515 case 7: return Type<T7> ::TypeID;
00516 case 8: return Type<T8> ::TypeID;
00517 case 9: return Type<T9> ::TypeID;
00518 case 10: return Type<T10>::TypeID;
00519 case 11: return Type<T11>::TypeID;
00520 case 12: return Type<T12>::TypeID;
00521 default: return TypeInvalid;
00522 }
00523 }
00524
00525 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00526 {
00527 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(pFunc, pUserData));
00528 }
00529
00530 virtual void Emit(DynParams &cParams) const override
00531 {
00532
00533 if (cParams.GetSignature() == GetSignature()) {
00534
00535 TypeParams &cP = static_cast<TypeParams&>(cParams);
00536
00537
00538 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00539 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00540 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00541 Type<T12>::ConvertStorageToReal(cP.Param12));
00542 }
00543 }
00544
00545 virtual void Emit(const DynParams &cParams) const override
00546 {
00547
00548 if (cParams.GetSignature() == GetSignature()) {
00549
00550 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00551
00552
00553 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00554 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00555 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11),
00556 Type<T12>::ConvertStorageToReal(cP.Param12));
00557 }
00558 }
00559
00560 virtual void Emit(const String &sParams) const override
00561 {
00562 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::FromString(sParams);
00563 Emit(cParams);
00564 }
00565
00566 virtual void Emit(const XmlElement &cElement) const override
00567 {
00568 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::FromXml(cElement);
00569 Emit(cParams);
00570 }
00571 };
00572
00573
00574
00575
00576
00577
00578
00579
00580 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
00581 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> : public DynEvent {
00582 public:
00583 typedef typename Type<T0> ::_Type _T0;
00584 typedef typename Type<T1> ::_Type _T1;
00585 typedef typename Type<T2> ::_Type _T2;
00586 typedef typename Type<T3> ::_Type _T3;
00587 typedef typename Type<T4> ::_Type _T4;
00588 typedef typename Type<T5> ::_Type _T5;
00589 typedef typename Type<T6> ::_Type _T6;
00590 typedef typename Type<T7> ::_Type _T7;
00591 typedef typename Type<T8> ::_Type _T8;
00592 typedef typename Type<T9> ::_Type _T9;
00593 typedef typename Type<T10>::_Type _T10;
00594 typedef typename Type<T11>::_Type _T11;
00595 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TypeHandler;
00596 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TypeSignature;
00597 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TypeParams;
00598
00599 Event()
00600 {
00601 }
00602
00603 virtual ~Event()
00604 {
00605 }
00606
00607 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10, _T11 t11) const
00608 {
00609
00610 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00611 while (pElement) {
00612
00613 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00614
00615
00616 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11);
00617
00618
00619 pElement = pNextElement;
00620 }
00621 }
00622
00623 virtual String GetSignature() const override
00624 {
00625 return TypeSignature::GetSignatureID();
00626 }
00627
00628 virtual uint32 GetNumOfParameters() const override
00629 {
00630 return 12;
00631 }
00632
00633 virtual int GetParameterTypeID(uint32 nIndex) const override
00634 {
00635 switch (nIndex) {
00636 case 0: return Type<T0> ::TypeID;
00637 case 1: return Type<T1> ::TypeID;
00638 case 2: return Type<T2> ::TypeID;
00639 case 3: return Type<T3> ::TypeID;
00640 case 4: return Type<T4> ::TypeID;
00641 case 5: return Type<T5> ::TypeID;
00642 case 6: return Type<T6> ::TypeID;
00643 case 7: return Type<T7> ::TypeID;
00644 case 8: return Type<T8> ::TypeID;
00645 case 9: return Type<T9> ::TypeID;
00646 case 10: return Type<T10>::TypeID;
00647 case 11: return Type<T11>::TypeID;
00648 default: return TypeInvalid;
00649 }
00650 }
00651
00652 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00653 {
00654 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(pFunc, pUserData));
00655 }
00656
00657 virtual void Emit(DynParams &cParams) const override
00658 {
00659
00660 if (cParams.GetSignature() == GetSignature()) {
00661
00662 TypeParams &cP = static_cast<TypeParams&>(cParams);
00663
00664
00665 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00666 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00667 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11));
00668 }
00669 }
00670
00671 virtual void Emit(const DynParams &cParams) const override
00672 {
00673
00674 if (cParams.GetSignature() == GetSignature()) {
00675
00676 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00677
00678
00679 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00680 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00681 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10), Type<T11>::ConvertStorageToReal(cP.Param11));
00682 }
00683 }
00684
00685 virtual void Emit(const String &sParams) const override
00686 {
00687 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::FromString(sParams);
00688 Emit(cParams);
00689 }
00690
00691 virtual void Emit(const XmlElement &cElement) const override
00692 {
00693 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::FromXml(cElement);
00694 Emit(cParams);
00695 }
00696 };
00697
00698
00699
00700
00701
00702
00703
00704
00705 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
00706 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> : public DynEvent {
00707 public:
00708 typedef typename Type<T0> ::_Type _T0;
00709 typedef typename Type<T1> ::_Type _T1;
00710 typedef typename Type<T2> ::_Type _T2;
00711 typedef typename Type<T3> ::_Type _T3;
00712 typedef typename Type<T4> ::_Type _T4;
00713 typedef typename Type<T5> ::_Type _T5;
00714 typedef typename Type<T6> ::_Type _T6;
00715 typedef typename Type<T7> ::_Type _T7;
00716 typedef typename Type<T8> ::_Type _T8;
00717 typedef typename Type<T9> ::_Type _T9;
00718 typedef typename Type<T10>::_Type _T10;
00719 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TypeHandler;
00720 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TypeSignature;
00721 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TypeParams;
00722
00723 Event()
00724 {
00725 }
00726
00727 virtual ~Event()
00728 {
00729 }
00730
00731 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9, _T10 t10) const
00732 {
00733
00734 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00735 while (pElement) {
00736
00737 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00738
00739
00740 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
00741
00742
00743 pElement = pNextElement;
00744 }
00745 }
00746
00747 virtual String GetSignature() const override
00748 {
00749 return TypeSignature::GetSignatureID();
00750 }
00751
00752 virtual uint32 GetNumOfParameters() const override
00753 {
00754 return 11;
00755 }
00756
00757 virtual int GetParameterTypeID(uint32 nIndex) const override
00758 {
00759 switch (nIndex) {
00760 case 0: return Type<T0> ::TypeID;
00761 case 1: return Type<T1> ::TypeID;
00762 case 2: return Type<T2> ::TypeID;
00763 case 3: return Type<T3> ::TypeID;
00764 case 4: return Type<T4> ::TypeID;
00765 case 5: return Type<T5> ::TypeID;
00766 case 6: return Type<T6> ::TypeID;
00767 case 7: return Type<T7> ::TypeID;
00768 case 8: return Type<T8> ::TypeID;
00769 case 9: return Type<T9> ::TypeID;
00770 case 10: return Type<T10>::TypeID;
00771 default: return TypeInvalid;
00772 }
00773 }
00774
00775 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00776 {
00777 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(pFunc, pUserData));
00778 }
00779
00780 virtual void Emit(DynParams &cParams) const override
00781 {
00782
00783 if (cParams.GetSignature() == GetSignature()) {
00784
00785 TypeParams &cP = static_cast<TypeParams&>(cParams);
00786
00787
00788 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00789 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00790 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10));
00791 }
00792 }
00793
00794 virtual void Emit(const DynParams &cParams) const override
00795 {
00796
00797 if (cParams.GetSignature() == GetSignature()) {
00798
00799 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00800
00801
00802 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00803 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00804 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9), Type<T10>::ConvertStorageToReal(cP.Param10));
00805 }
00806 }
00807
00808 virtual void Emit(const String &sParams) const override
00809 {
00810 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::FromString(sParams);
00811 Emit(cParams);
00812 }
00813
00814 virtual void Emit(const XmlElement &cElement) const override
00815 {
00816 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::FromXml(cElement);
00817 Emit(cParams);
00818 }
00819 };
00820
00821
00822
00823
00824
00825
00826
00827
00828 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
00829 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> : public DynEvent {
00830 public:
00831 typedef typename Type<T0> ::_Type _T0;
00832 typedef typename Type<T1> ::_Type _T1;
00833 typedef typename Type<T2> ::_Type _T2;
00834 typedef typename Type<T3> ::_Type _T3;
00835 typedef typename Type<T4> ::_Type _T4;
00836 typedef typename Type<T5> ::_Type _T5;
00837 typedef typename Type<T6> ::_Type _T6;
00838 typedef typename Type<T7> ::_Type _T7;
00839 typedef typename Type<T8> ::_Type _T8;
00840 typedef typename Type<T9> ::_Type _T9;
00841 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TypeHandler;
00842 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TypeSignature;
00843 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TypeParams;
00844
00845 Event()
00846 {
00847 }
00848
00849 virtual ~Event()
00850 {
00851 }
00852
00853 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8, _T9 t9) const
00854 {
00855
00856 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00857 while (pElement) {
00858
00859 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00860
00861
00862 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
00863
00864
00865 pElement = pNextElement;
00866 }
00867 }
00868
00869 virtual String GetSignature() const override
00870 {
00871 return TypeSignature::GetSignatureID();
00872 }
00873
00874 virtual uint32 GetNumOfParameters() const override
00875 {
00876 return 10;
00877 }
00878
00879 virtual int GetParameterTypeID(uint32 nIndex) const override
00880 {
00881 switch (nIndex) {
00882 case 0: return Type<T0> ::TypeID;
00883 case 1: return Type<T1> ::TypeID;
00884 case 2: return Type<T2> ::TypeID;
00885 case 3: return Type<T3> ::TypeID;
00886 case 4: return Type<T4> ::TypeID;
00887 case 5: return Type<T5> ::TypeID;
00888 case 6: return Type<T6> ::TypeID;
00889 case 7: return Type<T7> ::TypeID;
00890 case 8: return Type<T8> ::TypeID;
00891 case 9: return Type<T9> ::TypeID;
00892 default: return TypeInvalid;
00893 }
00894 }
00895
00896 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
00897 {
00898 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(pFunc, pUserData));
00899 }
00900
00901 virtual void Emit(DynParams &cParams) const override
00902 {
00903
00904 if (cParams.GetSignature() == GetSignature()) {
00905
00906 TypeParams &cP = static_cast<TypeParams&>(cParams);
00907
00908
00909 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00910 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00911 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9));
00912 }
00913 }
00914
00915 virtual void Emit(const DynParams &cParams) const override
00916 {
00917
00918 if (cParams.GetSignature() == GetSignature()) {
00919
00920 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
00921
00922
00923 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
00924 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
00925 Type<T8> ::ConvertStorageToReal(cP.Param8), Type<T9> ::ConvertStorageToReal(cP.Param9));
00926 }
00927 }
00928
00929 virtual void Emit(const String &sParams) const override
00930 {
00931 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::FromString(sParams);
00932 Emit(cParams);
00933 }
00934
00935 virtual void Emit(const XmlElement &cElement) const override
00936 {
00937 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::FromXml(cElement);
00938 Emit(cParams);
00939 }
00940 };
00941
00942
00943
00944
00945
00946
00947
00948
00949 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
00950 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7, T8> : public DynEvent {
00951 public:
00952 typedef typename Type<T0> ::_Type _T0;
00953 typedef typename Type<T1> ::_Type _T1;
00954 typedef typename Type<T2> ::_Type _T2;
00955 typedef typename Type<T3> ::_Type _T3;
00956 typedef typename Type<T4> ::_Type _T4;
00957 typedef typename Type<T5> ::_Type _T5;
00958 typedef typename Type<T6> ::_Type _T6;
00959 typedef typename Type<T7> ::_Type _T7;
00960 typedef typename Type<T8> ::_Type _T8;
00961 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7, T8> TypeHandler;
00962 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7, T8> TypeSignature;
00963 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8> TypeParams;
00964
00965 Event()
00966 {
00967 }
00968
00969 virtual ~Event()
00970 {
00971 }
00972
00973 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7, _T8 t8) const
00974 {
00975
00976 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
00977 while (pElement) {
00978
00979 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
00980
00981
00982 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7, t8);
00983
00984
00985 pElement = pNextElement;
00986 }
00987 }
00988
00989 virtual String GetSignature() const override
00990 {
00991 return TypeSignature::GetSignatureID();
00992 }
00993
00994 virtual uint32 GetNumOfParameters() const override
00995 {
00996 return 9;
00997 }
00998
00999 virtual int GetParameterTypeID(uint32 nIndex) const override
01000 {
01001 switch (nIndex) {
01002 case 0: return Type<T0> ::TypeID;
01003 case 1: return Type<T1> ::TypeID;
01004 case 2: return Type<T2> ::TypeID;
01005 case 3: return Type<T3> ::TypeID;
01006 case 4: return Type<T4> ::TypeID;
01007 case 5: return Type<T5> ::TypeID;
01008 case 6: return Type<T6> ::TypeID;
01009 case 7: return Type<T7> ::TypeID;
01010 case 8: return Type<T8> ::TypeID;
01011 default: return TypeInvalid;
01012 }
01013 }
01014
01015 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01016 {
01017 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7, T8>(pFunc, pUserData));
01018 }
01019
01020 virtual void Emit(DynParams &cParams) const override
01021 {
01022
01023 if (cParams.GetSignature() == GetSignature()) {
01024
01025 TypeParams &cP = static_cast<TypeParams&>(cParams);
01026
01027
01028 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01029 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
01030 Type<T8> ::ConvertStorageToReal(cP.Param8));
01031 }
01032 }
01033
01034 virtual void Emit(const DynParams &cParams) const override
01035 {
01036
01037 if (cParams.GetSignature() == GetSignature()) {
01038
01039 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01040
01041
01042 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01043 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7),
01044 Type<T8> ::ConvertStorageToReal(cP.Param8));
01045 }
01046 }
01047
01048 virtual void Emit(const String &sParams) const override
01049 {
01050 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8>::FromString(sParams);
01051 Emit(cParams);
01052 }
01053
01054 virtual void Emit(const XmlElement &cElement) const override
01055 {
01056 Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7, T8>::FromXml(cElement);
01057 Emit(cParams);
01058 }
01059 };
01060
01061
01062
01063
01064
01065
01066
01067
01068 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
01069 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6, T7> : public DynEvent {
01070 public:
01071 typedef typename Type<T0> ::_Type _T0;
01072 typedef typename Type<T1> ::_Type _T1;
01073 typedef typename Type<T2> ::_Type _T2;
01074 typedef typename Type<T3> ::_Type _T3;
01075 typedef typename Type<T4> ::_Type _T4;
01076 typedef typename Type<T5> ::_Type _T5;
01077 typedef typename Type<T6> ::_Type _T6;
01078 typedef typename Type<T7> ::_Type _T7;
01079 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6, T7> TypeHandler;
01080 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6, T7> TypeSignature;
01081 typedef Params<void, T0, T1, T2, T3, T4, T5, T6, T7> TypeParams;
01082
01083 Event()
01084 {
01085 }
01086
01087 virtual ~Event()
01088 {
01089 }
01090
01091 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6, _T7 t7) const
01092 {
01093
01094 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01095 while (pElement) {
01096
01097 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01098
01099
01100 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6, t7);
01101
01102
01103 pElement = pNextElement;
01104 }
01105 }
01106
01107 virtual String GetSignature() const override
01108 {
01109 return TypeSignature::GetSignatureID();
01110 }
01111
01112 virtual uint32 GetNumOfParameters() const override
01113 {
01114 return 8;
01115 }
01116
01117 virtual int GetParameterTypeID(uint32 nIndex) const override
01118 {
01119 switch (nIndex) {
01120 case 0: return Type<T0> ::TypeID;
01121 case 1: return Type<T1> ::TypeID;
01122 case 2: return Type<T2> ::TypeID;
01123 case 3: return Type<T3> ::TypeID;
01124 case 4: return Type<T4> ::TypeID;
01125 case 5: return Type<T5> ::TypeID;
01126 case 6: return Type<T6> ::TypeID;
01127 case 7: return Type<T7> ::TypeID;
01128 default: return TypeInvalid;
01129 }
01130 }
01131
01132 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01133 {
01134 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6, T7>(pFunc, pUserData));
01135 }
01136
01137 virtual void Emit(DynParams &cParams) const override
01138 {
01139
01140 if (cParams.GetSignature() == GetSignature()) {
01141
01142 TypeParams &cP = static_cast<TypeParams&>(cParams);
01143
01144
01145 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01146 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7));
01147 }
01148 }
01149
01150 virtual void Emit(const DynParams &cParams) const override
01151 {
01152
01153 if (cParams.GetSignature() == GetSignature()) {
01154
01155 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01156
01157
01158 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01159 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6), Type<T7> ::ConvertStorageToReal(cP.Param7));
01160 }
01161 }
01162
01163 virtual void Emit(const String &sParams) const override
01164 {
01165 Params<void, T0, T1, T2, T3, T4, T5, T6, T7> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7>::FromString(sParams);
01166 Emit(cParams);
01167 }
01168
01169 virtual void Emit(const XmlElement &cElement) const override
01170 {
01171 Params<void, T0, T1, T2, T3, T4, T5, T6, T7> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6, T7>::FromXml(cElement);
01172 Emit(cParams);
01173 }
01174 };
01175
01176
01177
01178
01179
01180
01181
01182
01183 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
01184 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5, T6> : public DynEvent {
01185 public:
01186 typedef typename Type<T0> ::_Type _T0;
01187 typedef typename Type<T1> ::_Type _T1;
01188 typedef typename Type<T2> ::_Type _T2;
01189 typedef typename Type<T3> ::_Type _T3;
01190 typedef typename Type<T4> ::_Type _T4;
01191 typedef typename Type<T5> ::_Type _T5;
01192 typedef typename Type<T6> ::_Type _T6;
01193 typedef EventHandler<T0, T1, T2, T3, T4, T5, T6> TypeHandler;
01194 typedef Signature<void, T0, T1, T2, T3, T4, T5, T6> TypeSignature;
01195 typedef Params<void, T0, T1, T2, T3, T4, T5, T6> TypeParams;
01196
01197 Event()
01198 {
01199 }
01200
01201 virtual ~Event()
01202 {
01203 }
01204
01205 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5, _T6 t6) const
01206 {
01207
01208 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01209 while (pElement) {
01210
01211 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01212
01213
01214 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5, t6);
01215
01216
01217 pElement = pNextElement;
01218 }
01219 }
01220
01221 virtual String GetSignature() const override
01222 {
01223 return TypeSignature::GetSignatureID();
01224 }
01225
01226 virtual uint32 GetNumOfParameters() const override
01227 {
01228 return 7;
01229 }
01230
01231 virtual int GetParameterTypeID(uint32 nIndex) const override
01232 {
01233 switch (nIndex) {
01234 case 0: return Type<T0> ::TypeID;
01235 case 1: return Type<T1> ::TypeID;
01236 case 2: return Type<T2> ::TypeID;
01237 case 3: return Type<T3> ::TypeID;
01238 case 4: return Type<T4> ::TypeID;
01239 case 5: return Type<T5> ::TypeID;
01240 case 6: return Type<T6> ::TypeID;
01241 default: return TypeInvalid;
01242 }
01243 }
01244
01245 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01246 {
01247 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5, T6>(pFunc, pUserData));
01248 }
01249
01250 virtual void Emit(DynParams &cParams) const override
01251 {
01252
01253 if (cParams.GetSignature() == GetSignature()) {
01254
01255 TypeParams &cP = static_cast<TypeParams&>(cParams);
01256
01257
01258 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01259 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6));
01260 }
01261 }
01262
01263 virtual void Emit(const DynParams &cParams) const override
01264 {
01265
01266 if (cParams.GetSignature() == GetSignature()) {
01267
01268 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01269
01270
01271 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01272 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5), Type<T6> ::ConvertStorageToReal(cP.Param6));
01273 }
01274 }
01275
01276 virtual void Emit(const String &sParams) const override
01277 {
01278 Params<void, T0, T1, T2, T3, T4, T5, T6> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6>::FromString(sParams);
01279 Emit(cParams);
01280 }
01281
01282 virtual void Emit(const XmlElement &cElement) const override
01283 {
01284 Params<void, T0, T1, T2, T3, T4, T5, T6> cParams = Params<void, T0, T1, T2, T3, T4, T5, T6>::FromXml(cElement);
01285 Emit(cParams);
01286 }
01287 };
01288
01289
01290
01291
01292
01293
01294
01295
01296 template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
01297 class PLCORE_TMPL Event<T0, T1, T2, T3, T4, T5> : public DynEvent {
01298 public:
01299 typedef typename Type<T0> ::_Type _T0;
01300 typedef typename Type<T1> ::_Type _T1;
01301 typedef typename Type<T2> ::_Type _T2;
01302 typedef typename Type<T3> ::_Type _T3;
01303 typedef typename Type<T4> ::_Type _T4;
01304 typedef typename Type<T5> ::_Type _T5;
01305 typedef EventHandler<T0, T1, T2, T3, T4, T5> TypeHandler;
01306 typedef Signature<void, T0, T1, T2, T3, T4, T5> TypeSignature;
01307 typedef Params<void, T0, T1, T2, T3, T4, T5> TypeParams;
01308
01309 Event()
01310 {
01311 }
01312
01313 virtual ~Event()
01314 {
01315 }
01316
01317 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4, _T5 t5) const
01318 {
01319
01320 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01321 while (pElement) {
01322
01323 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01324
01325
01326 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4, t5);
01327
01328
01329 pElement = pNextElement;
01330 }
01331 }
01332
01333 virtual String GetSignature() const override
01334 {
01335 return TypeSignature::GetSignatureID();
01336 }
01337
01338 virtual uint32 GetNumOfParameters() const override
01339 {
01340 return 6;
01341 }
01342
01343 virtual int GetParameterTypeID(uint32 nIndex) const override
01344 {
01345 switch (nIndex) {
01346 case 0: return Type<T0> ::TypeID;
01347 case 1: return Type<T1> ::TypeID;
01348 case 2: return Type<T2> ::TypeID;
01349 case 3: return Type<T3> ::TypeID;
01350 case 4: return Type<T4> ::TypeID;
01351 case 5: return Type<T5> ::TypeID;
01352 default: return TypeInvalid;
01353 }
01354 }
01355
01356 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01357 {
01358 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4, T5>(pFunc, pUserData));
01359 }
01360
01361 virtual void Emit(DynParams &cParams) const override
01362 {
01363
01364 if (cParams.GetSignature() == GetSignature()) {
01365
01366 TypeParams &cP = static_cast<TypeParams&>(cParams);
01367
01368
01369 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01370 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5));
01371 }
01372 }
01373
01374 virtual void Emit(const DynParams &cParams) const override
01375 {
01376
01377 if (cParams.GetSignature() == GetSignature()) {
01378
01379 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01380
01381
01382 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01383 Type<T4> ::ConvertStorageToReal(cP.Param4), Type<T5> ::ConvertStorageToReal(cP.Param5));
01384 }
01385 }
01386
01387 virtual void Emit(const String &sParams) const override
01388 {
01389 Params<void, T0, T1, T2, T3, T4, T5> cParams = Params<void, T0, T1, T2, T3, T4, T5>::FromString(sParams);
01390 Emit(cParams);
01391 }
01392
01393 virtual void Emit(const XmlElement &cElement) const override
01394 {
01395 Params<void, T0, T1, T2, T3, T4, T5> cParams = Params<void, T0, T1, T2, T3, T4, T5>::FromXml(cElement);
01396 Emit(cParams);
01397 }
01398 };
01399
01400
01401
01402
01403
01404
01405
01406
01407 template <typename T0, typename T1, typename T2, typename T3, typename T4>
01408 class PLCORE_TMPL Event<T0, T1, T2, T3, T4> : public DynEvent {
01409 public:
01410 typedef typename Type<T0> ::_Type _T0;
01411 typedef typename Type<T1> ::_Type _T1;
01412 typedef typename Type<T2> ::_Type _T2;
01413 typedef typename Type<T3> ::_Type _T3;
01414 typedef typename Type<T4> ::_Type _T4;
01415 typedef EventHandler<T0, T1, T2, T3, T4> TypeHandler;
01416 typedef Signature<void, T0, T1, T2, T3, T4> TypeSignature;
01417 typedef Params<void, T0, T1, T2, T3, T4> TypeParams;
01418
01419 Event()
01420 {
01421 }
01422
01423 virtual ~Event()
01424 {
01425 }
01426
01427 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3, _T4 t4) const
01428 {
01429
01430 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01431 while (pElement) {
01432
01433 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01434
01435
01436 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3, t4);
01437
01438
01439 pElement = pNextElement;
01440 }
01441 }
01442
01443 virtual String GetSignature() const override
01444 {
01445 return TypeSignature::GetSignatureID();
01446 }
01447
01448 virtual uint32 GetNumOfParameters() const override
01449 {
01450 return 5;
01451 }
01452
01453 virtual int GetParameterTypeID(uint32 nIndex) const override
01454 {
01455 switch (nIndex) {
01456 case 0: return Type<T0> ::TypeID;
01457 case 1: return Type<T1> ::TypeID;
01458 case 2: return Type<T2> ::TypeID;
01459 case 3: return Type<T3> ::TypeID;
01460 case 4: return Type<T4> ::TypeID;
01461 default: return TypeInvalid;
01462 }
01463 }
01464
01465 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01466 {
01467 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3, T4>(pFunc, pUserData));
01468 }
01469
01470 virtual void Emit(DynParams &cParams) const override
01471 {
01472
01473 if (cParams.GetSignature() == GetSignature()) {
01474
01475 TypeParams &cP = static_cast<TypeParams&>(cParams);
01476
01477
01478 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01479 Type<T4> ::ConvertStorageToReal(cP.Param4));
01480 }
01481 }
01482
01483 virtual void Emit(const DynParams &cParams) const override
01484 {
01485
01486 if (cParams.GetSignature() == GetSignature()) {
01487
01488 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01489
01490
01491 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3),
01492 Type<T4> ::ConvertStorageToReal(cP.Param4));
01493 }
01494 }
01495
01496 virtual void Emit(const String &sParams) const override
01497 {
01498 Params<void, T0, T1, T2, T3, T4> cParams = Params<void, T0, T1, T2, T3, T4>::FromString(sParams);
01499 Emit(cParams);
01500 }
01501
01502 virtual void Emit(const XmlElement &cElement) const override
01503 {
01504 Params<void, T0, T1, T2, T3, T4> cParams = Params<void, T0, T1, T2, T3, T4>::FromXml(cElement);
01505 Emit(cParams);
01506 }
01507 };
01508
01509
01510
01511
01512
01513
01514
01515
01516 template <typename T0, typename T1, typename T2, typename T3>
01517 class PLCORE_TMPL Event<T0, T1, T2, T3> : public DynEvent {
01518 public:
01519 typedef typename Type<T0> ::_Type _T0;
01520 typedef typename Type<T1> ::_Type _T1;
01521 typedef typename Type<T2> ::_Type _T2;
01522 typedef typename Type<T3> ::_Type _T3;
01523 typedef EventHandler<T0, T1, T2, T3> TypeHandler;
01524 typedef Signature<void, T0, T1, T2, T3> TypeSignature;
01525 typedef Params<void, T0, T1, T2, T3> TypeParams;
01526
01527 Event()
01528 {
01529 }
01530
01531 virtual ~Event()
01532 {
01533 }
01534
01535 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2, _T3 t3) const
01536 {
01537
01538 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01539 while (pElement) {
01540
01541 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01542
01543
01544 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2, t3);
01545
01546
01547 pElement = pNextElement;
01548 }
01549 }
01550
01551 virtual String GetSignature() const override
01552 {
01553 return TypeSignature::GetSignatureID();
01554 }
01555
01556 virtual uint32 GetNumOfParameters() const override
01557 {
01558 return 4;
01559 }
01560
01561 virtual int GetParameterTypeID(uint32 nIndex) const override
01562 {
01563 switch (nIndex) {
01564 case 0: return Type<T0> ::TypeID;
01565 case 1: return Type<T1> ::TypeID;
01566 case 2: return Type<T2> ::TypeID;
01567 case 3: return Type<T3> ::TypeID;
01568 default: return TypeInvalid;
01569 }
01570 }
01571
01572 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01573 {
01574 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2, T3>(pFunc, pUserData));
01575 }
01576
01577 virtual void Emit(DynParams &cParams) const override
01578 {
01579
01580 if (cParams.GetSignature() == GetSignature()) {
01581
01582 TypeParams &cP = static_cast<TypeParams&>(cParams);
01583
01584
01585 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3));
01586 }
01587 }
01588
01589 virtual void Emit(const DynParams &cParams) const override
01590 {
01591
01592 if (cParams.GetSignature() == GetSignature()) {
01593
01594 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01595
01596
01597 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2), Type<T3> ::ConvertStorageToReal(cP.Param3));
01598 }
01599 }
01600
01601 virtual void Emit(const String &sParams) const override
01602 {
01603 Params<void, T0, T1, T2, T3> cParams = Params<void, T0, T1, T2, T3>::FromString(sParams);
01604 Emit(cParams);
01605 }
01606
01607 virtual void Emit(const XmlElement &cElement) const override
01608 {
01609 Params<void, T0, T1, T2, T3> cParams = Params<void, T0, T1, T2, T3>::FromXml(cElement);
01610 Emit(cParams);
01611 }
01612 };
01613
01614
01615
01616
01617
01618
01619
01620
01621 template <typename T0, typename T1, typename T2>
01622 class PLCORE_TMPL Event<T0, T1, T2> : public DynEvent {
01623 public:
01624 typedef typename Type<T0> ::_Type _T0;
01625 typedef typename Type<T1> ::_Type _T1;
01626 typedef typename Type<T2> ::_Type _T2;
01627 typedef EventHandler<T0, T1, T2> TypeHandler;
01628 typedef Signature<void, T0, T1, T2> TypeSignature;
01629 typedef Params<void, T0, T1, T2> TypeParams;
01630
01631 Event()
01632 {
01633 }
01634
01635 virtual ~Event()
01636 {
01637 }
01638
01639 virtual void operator ()(_T0 t0, _T1 t1, _T2 t2) const
01640 {
01641
01642 const typename SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01643 while (pElement) {
01644
01645 const typename SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01646
01647
01648 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1, t2);
01649
01650
01651 pElement = pNextElement;
01652 }
01653 }
01654
01655 virtual String GetSignature() const override
01656 {
01657 return TypeSignature::GetSignatureID();
01658 }
01659
01660 virtual uint32 GetNumOfParameters() const override
01661 {
01662 return 3;
01663 }
01664
01665 virtual int GetParameterTypeID(uint32 nIndex) const override
01666 {
01667 switch (nIndex) {
01668 case 0: return Type<T0> ::TypeID;
01669 case 1: return Type<T1> ::TypeID;
01670 case 2: return Type<T2> ::TypeID;
01671 default: return TypeInvalid;
01672 }
01673 }
01674
01675 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01676 {
01677 return new TypeHandler(new FuncGenFunPtr<void, T0, T1, T2>(pFunc, pUserData));
01678 }
01679
01680 virtual void Emit(DynParams &cParams) const override
01681 {
01682
01683 if (cParams.GetSignature() == GetSignature()) {
01684
01685 TypeParams &cP = static_cast<TypeParams&>(cParams);
01686
01687
01688 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2));
01689 }
01690 }
01691
01692 virtual void Emit(const DynParams &cParams) const override
01693 {
01694
01695 if (cParams.GetSignature() == GetSignature()) {
01696
01697 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01698
01699
01700 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1), Type<T2> ::ConvertStorageToReal(cP.Param2));
01701 }
01702 }
01703
01704 virtual void Emit(const String &sParams) const override
01705 {
01706 Params<void, T0, T1, T2> cParams = Params<void, T0, T1, T2>::FromString(sParams);
01707 Emit(cParams);
01708 }
01709
01710 virtual void Emit(const XmlElement &cElement) const override
01711 {
01712 Params<void, T0, T1, T2> cParams = Params<void, T0, T1, T2>::FromXml(cElement);
01713 Emit(cParams);
01714 }
01715 };
01716
01717
01718
01719
01720
01721
01722
01723
01724 template <typename T0, typename T1>
01725 class PLCORE_TMPL Event<T0, T1> : public DynEvent {
01726 public:
01727 typedef typename Type<T0> ::_Type _T0;
01728 typedef typename Type<T1> ::_Type _T1;
01729 typedef EventHandler<T0, T1> TypeHandler;
01730 typedef Signature<void, T0, T1> TypeSignature;
01731 typedef Params<void, T0, T1> TypeParams;
01732
01733 Event()
01734 {
01735 }
01736
01737 virtual ~Event()
01738 {
01739 }
01740
01741 virtual void operator ()(_T0 t0, _T1 t1) const
01742 {
01743
01744 const SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01745 while (pElement) {
01746
01747 const SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01748
01749
01750 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0, t1);
01751
01752
01753 pElement = pNextElement;
01754 }
01755 }
01756
01757 virtual String GetSignature() const override
01758 {
01759 return TypeSignature::GetSignatureID();
01760 }
01761
01762 virtual uint32 GetNumOfParameters() const override
01763 {
01764 return 2;
01765 }
01766
01767 virtual int GetParameterTypeID(uint32 nIndex) const override
01768 {
01769 switch (nIndex) {
01770 case 0: return Type<T0> ::TypeID;
01771 case 1: return Type<T1> ::TypeID;
01772 default: return TypeInvalid;
01773 }
01774 }
01775
01776 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01777 {
01778 return new TypeHandler(new FuncGenFunPtr<void, T0, T1>(pFunc, pUserData));
01779 }
01780
01781 virtual void Emit(DynParams &cParams) const override
01782 {
01783
01784 if (cParams.GetSignature() == GetSignature()) {
01785
01786 TypeParams &cP = static_cast<TypeParams&>(cParams);
01787
01788
01789 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1));
01790 }
01791 }
01792
01793 virtual void Emit(const DynParams &cParams) const override
01794 {
01795
01796 if (cParams.GetSignature() == GetSignature()) {
01797
01798 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01799
01800
01801 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0), Type<T1> ::ConvertStorageToReal(cP.Param1));
01802 }
01803 }
01804
01805 virtual void Emit(const String &sParams) const override
01806 {
01807 Params<void, T0, T1> cParams = Params<void, T0, T1>::FromString(sParams);
01808 Emit(cParams);
01809 }
01810
01811 virtual void Emit(const XmlElement &cElement) const override
01812 {
01813 Params<void, T0, T1> cParams = Params<void, T0, T1>::FromXml(cElement);
01814 Emit(cParams);
01815 }
01816 };
01817
01818
01819
01820
01821
01822
01823
01824
01825 template <typename T0>
01826 class PLCORE_TMPL Event<T0> : public DynEvent {
01827 public:
01828 typedef typename Type<T0>::_Type _T0;
01829
01830 public:
01831 typedef EventHandler<T0> TypeHandler;
01832 typedef Signature<void, T0> TypeSignature;
01833 typedef Params<void, T0> TypeParams;
01834
01835 Event()
01836 {
01837 }
01838
01839 virtual ~Event()
01840 {
01841 }
01842
01843 virtual void operator ()(_T0 t0) const
01844 {
01845
01846 const SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01847 while (pElement) {
01848
01849 const SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01850
01851
01852 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor(t0);
01853
01854
01855 pElement = pNextElement;
01856 }
01857 }
01858
01859 virtual String GetSignature() const override
01860 {
01861 return TypeSignature::GetSignatureID();
01862 }
01863
01864 virtual uint32 GetNumOfParameters() const override
01865 {
01866 return 1;
01867 }
01868
01869 virtual int GetParameterTypeID(uint32 nIndex) const override
01870 {
01871 switch (nIndex) {
01872 case 0: return Type<T0> ::TypeID;
01873 default: return TypeInvalid;
01874 }
01875 }
01876
01877 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01878 {
01879 return new TypeHandler(new FuncGenFunPtr<void, T0>(pFunc, pUserData));
01880 }
01881
01882 virtual void Emit(DynParams &cParams) const override
01883 {
01884
01885 if (cParams.GetSignature() == GetSignature()) {
01886
01887 TypeParams &cP = static_cast<TypeParams&>(cParams);
01888
01889
01890 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0));
01891 }
01892 }
01893
01894 virtual void Emit(const DynParams &cParams) const override
01895 {
01896
01897 if (cParams.GetSignature() == GetSignature()) {
01898
01899 const TypeParams &cP = static_cast<const TypeParams&>(cParams);
01900
01901
01902 (*this)(Type<T0> ::ConvertStorageToReal(cP.Param0));
01903 }
01904 }
01905
01906 virtual void Emit(const String &sParams) const override
01907 {
01908 Params<void, T0> cParams = Params<void, T0>::FromString(sParams);
01909 Emit(cParams);
01910 }
01911
01912 virtual void Emit(const XmlElement &cElement) const override
01913 {
01914 Params<void, T0> cParams = Params<void, T0>::FromXml(cElement);
01915 Emit(cParams);
01916 }
01917 };
01918
01919
01920
01921
01922
01923
01924
01925
01926 template <>
01927 class PLCORE_TMPL Event<> : public DynEvent {
01928 public:
01929 typedef EventHandler<> TypeHandler;
01930 typedef Signature<void> TypeSignature;
01931 typedef Params<void> TypeParams;
01932
01933 Event()
01934 {
01935 }
01936
01937 virtual ~Event()
01938 {
01939 }
01940
01941 virtual void operator ()() const
01942 {
01943
01944 const SimpleList<DynEventHandler*>::ListElement *pElement = m_lstHandlers.pFirstElement;
01945 while (pElement) {
01946
01947 const SimpleList<DynEventHandler*>::ListElement *pNextElement = pElement->pNextElement;
01948
01949
01950 static_cast<TypeHandler*>(pElement->Data)->m_cFunctor();
01951
01952
01953 pElement = pNextElement;
01954 }
01955 }
01956
01957 virtual String GetSignature() const override
01958 {
01959 return TypeSignature::GetSignatureID();
01960 }
01961
01962 virtual uint32 GetNumOfParameters() const override
01963 {
01964 return 0;
01965 }
01966
01967 virtual int GetParameterTypeID(uint32 nIndex) const override
01968 {
01969
01970 return TypeInvalid;
01971 }
01972
01973 virtual DynEventHandler *CreateGenericEventHandler(const FUNC &pFunc, void *pUserData = nullptr) const override
01974 {
01975 return new TypeHandler(new FuncGenFunPtr<void>(pFunc, pUserData));
01976 }
01977
01978 virtual void Emit(DynParams &cParams) const override
01979 {
01980
01981 if (cParams.GetSignature() == GetSignature()) {
01982
01983 (*this)();
01984 }
01985 }
01986
01987 virtual void Emit(const DynParams &cParams) const override
01988 {
01989
01990 if (cParams.GetSignature() == GetSignature()) {
01991
01992 (*this)();
01993 }
01994 }
01995
01996 virtual void Emit(const String &sParams) const override
01997 {
01998 Params<void> cParams = Params<void>::FromString(sParams);
01999 Emit(cParams);
02000 }
02001
02002 virtual void Emit(const XmlElement &cElement) const override
02003 {
02004 Params<void> cParams = Params<void>::FromXml(cElement);
02005 Emit(cParams);
02006 }
02007 };
02008
02009
02010
02011
02012
02013 }
02014
02015
02016 #endif // __PLCORE_EVENT_H__