00001 #ifndef __TYPEDECL_H__
00002 #define __TYPEDECL_H__
00003
00004 #define RTTI_FIELD(x, flags) \
00005 *new RTTIFieldDescriptor(#x, (char*)&x-(char*)this, sizeof(x), flags, RTTITypeOf(x))
00006
00007 #define RTTI_ARRAY(x, flags) \
00008 *new RTTIFieldDescriptor(#x, (char*)&x-(char*)this, sizeof(x), flags, \
00009 new RTTIArrayType(RTTITypeOf(*x), sizeof(x)/sizeof(*x)))
00010
00011 #define RTTI_PTR(x, flags) \
00012 *new RTTIFieldDescriptor(#x, (char*)&x-(char*)this, sizeof(x), flags, \
00013 RTTITypeOfPtr(&x))
00014
00015 #define RTTI_PTR_TO_PTR(x, flags) \
00016 *new RTTIFieldDescriptor(#x, (char*)&x-(char*)this, sizeof(x), flags, \
00017 RTTITypeOfPtrToPtr(&x))
00018
00019 #define RTTI_BASE_CLASS(BC, flags) \
00020 *new RTTIFieldDescriptor(#BC, (char*)(BC*)this - (char*)this, sizeof(BC), flags, \
00021 new RTTIDerivedType(&BC::RTTIDescriptor))
00022
00023
00024 #define RTTI_NO_FIELDS (*(RTTIFieldDescriptor*)0)
00025 #define RTTI_NO_METHODS (*(RTTIMethodDescriptor*)0)
00026
00027 #define RTTI_FUNC(x, flags) *new RTTIMethodDescriptor(#x, flags, RTTIFuncTypeOf(&self::x))
00028
00029 #define RTTI_PROC(x, flags) *new RTTIMethodDescriptor(#x, flags, RTTIProcTypeOf(&self::x))
00030
00031
00032 #define RTTI_DESCRIBE_STRUCT(components) \
00033 static RTTIClassDescriptor RTTIDescriptor; \
00034 static RTTIClassDescriptor* RTTIGetClass() { \
00035 return &RTTIDescriptor; \
00036 } \
00037 RTTIFieldDescriptor* RTTIDescribeFields() { \
00038 return &components; \
00039 } \
00040 RTTIMethodDescriptor* RTTIDescribeMethods() { \
00041 return NULL; \
00042 }
00043
00044 #define RTTI_DESCRIBE_CLASS(T, fields, methods) \
00045 static RTTIClassDescriptor RTTIDescriptor; \
00046 static RTTIClassDescriptor* RTTIGetClass() { \
00047 return &RTTIDescriptor; \
00048 } \
00049 RTTIFieldDescriptor* RTTIDescribeFields() { \
00050 return &fields; \
00051 } \
00052 typedef T self; \
00053 RTTIMethodDescriptor* RTTIDescribeMethods() { \
00054 return &methods; \
00055 } \
00056
00057
00058 #define RTTI_REGISTER_STRUCT(T, flags) RTTI_REGISTER_CLASS(T, flags)
00059
00060 #if defined(__GNUC__) && __GNUC_MINOR__ < 96
00061 #define RTTI_REGISTER_CLASS(T, flags) \
00062 static RTTIFieldDescriptor* RTTIDescribeFieldsOf##T() { \
00063 return T().RTTIDescribeFields(); \
00064 } \
00065 static RTTIMethodDescriptor* RTTIDescribeMethodsOf##T() { \
00066 return T().RTTIDescribeMethods(); \
00067 } \
00068 static T* RTTIDefaultConstructorOf##T() { \
00069 return new T(); \
00070 } \
00071 RTTIClassDescriptor T::RTTIDescriptor(#T, sizeof(T), &RTTIDescribeFieldsOf##T, \
00072 &RTTIDescribeMethodsOf##T, \
00073 (RTTIClassDescriptor::RTTICreateInstanceFunc)&RTTIDefaultConstructorOf##T, flags); \
00074 RTTIClassDescriptor* RTTIGetClassDescriptor(T*) { \
00075 return &T::RTTIDescriptor; \
00076 }
00077
00078 template<class __T>
00079 inline RTTIType* RTTITypeOf(__T&) {
00080 extern RTTIClassDescriptor* RTTIGetClassDescriptor(__T*);
00081 return RTTIGetClassDescriptor((__T*)0);
00082 }
00083
00084 #else
00085
00086 #define RTTI_REGISTER_CLASS(T, flags) \
00087 static RTTIFieldDescriptor* RTTIDescribeFieldsOf##T() { \
00088 return T().RTTIDescribeFields(); \
00089 } \
00090 static RTTIMethodDescriptor* RTTIDescribeMethodsOf##T() { \
00091 return T().RTTIDescribeMethods(); \
00092 } \
00093 static T* RTTIDefaultConstructorOf##T() { \
00094 return new T(); \
00095 } \
00096 RTTIClassDescriptor T::RTTIDescriptor(#T, sizeof(T), &RTTIDescribeFieldsOf##T, \
00097 &RTTIDescribeMethodsOf##T, \
00098 (RTTIClassDescriptor::RTTICreateInstanceFunc)&RTTIDefaultConstructorOf##T, flags); \
00099 template<> \
00100 RTTIClassDescriptor* RTTIClassDescriptorHelper<T>::getClassDescriptor() { \
00101 return &T::RTTIDescriptor; \
00102 }
00103
00104 template<class __T>
00105 class RTTIClassDescriptorHelper {
00106 public:
00107 static RTTIClassDescriptor* getClassDescriptor();
00108 };
00109
00110 template<class __T>
00111 inline RTTIType* RTTITypeOf(__T&) {
00112 return RTTIClassDescriptorHelper<__T>::getClassDescriptor();
00113 }
00114 #endif
00115
00116 template<>
00117 inline RTTIType* RTTITypeOf(char&) {
00118 return &RTTIType::charType;
00119 }
00120
00121 template<>
00122 inline RTTIType* RTTITypeOf(unsigned char&) {
00123 return &RTTIType::ucharType;
00124 }
00125
00126 template<>
00127 inline RTTIType* RTTITypeOf(signed char&) {
00128 return &RTTIType::scharType;
00129 }
00130
00131 template<>
00132 inline RTTIType* RTTITypeOf(short&) {
00133 return &RTTIType::shortType;
00134 }
00135
00136 template<>
00137 inline RTTIType* RTTITypeOf(unsigned short&) {
00138 return &RTTIType::ushortType;
00139 }
00140
00141 template<>
00142 inline RTTIType* RTTITypeOf(int&) {
00143 return &RTTIType::intType;
00144 }
00145
00146 template<>
00147 inline RTTIType* RTTITypeOf(unsigned int&) {
00148 return &RTTIType::uintType;
00149 }
00150
00151 template<>
00152 inline RTTIType* RTTITypeOf(long&) {
00153 return &RTTIType::longType;
00154 }
00155
00156 template<>
00157 inline RTTIType* RTTITypeOf(unsigned long&) {
00158 return &RTTIType::ulongType;
00159 }
00160
00161 template<>
00162 inline RTTIType* RTTITypeOf(float&) {
00163 return &RTTIType::floatType;
00164 }
00165
00166 template<>
00167 inline RTTIType* RTTITypeOf(double&) {
00168 return &RTTIType::doubleType;
00169 }
00170
00171 template<>
00172 inline RTTIType* RTTITypeOf(bool&) {
00173 return &RTTIType::boolType;
00174 }
00175
00176
00177 const int RTTI_MAX_PARAMETERS = 5;
00178
00179
00180 inline RTTIType* RTTITypeOfPtr(char*) {
00181 return &RTTIType::charType;
00182 }
00183
00184 inline RTTIType* RTTITypeOfPtr(unsigned char*) {
00185 return &RTTIType::ucharType;
00186 }
00187
00188 inline RTTIType* RTTITypeOfPtr(signed char*) {
00189 return &RTTIType::scharType;
00190 }
00191
00192 inline RTTIType* RTTITypeOfPtr(short*) {
00193 return &RTTIType::shortType;
00194 }
00195
00196 inline RTTIType* RTTITypeOfPtr(unsigned short*) {
00197 return &RTTIType::ushortType;
00198 }
00199
00200 inline RTTIType* RTTITypeOfPtr(int*) {
00201 return &RTTIType::intType;
00202 }
00203
00204 inline RTTIType* RTTITypeOfPtr(unsigned int*) {
00205 return &RTTIType::uintType;
00206 }
00207
00208 inline RTTIType* RTTITypeOfPtr(long*) {
00209 return &RTTIType::longType;
00210 }
00211
00212 inline RTTIType* RTTITypeOfPtr(unsigned long*) {
00213 return &RTTIType::ulongType;
00214 }
00215
00216 inline RTTIType* RTTITypeOfPtr(float*) {
00217 return &RTTIType::floatType;
00218 }
00219
00220 inline RTTIType* RTTITypeOfPtr(double*) {
00221 return &RTTIType::doubleType;
00222 }
00223
00224 inline RTTIType* RTTITypeOfPtr(bool*) {
00225 return &RTTIType::boolType;
00226 }
00227
00228 #if defined(__GNUC__) && __GNUC_MINOR__ < 96
00229 template<class __P>
00230 inline RTTIType* RTTITypeOfPtr(__P const*const*) {
00231 extern RTTIClassDescriptor* RTTIGetClassDescriptor(__P*);
00232 return new RTTIPtrType(RTTIGetClassDescriptor((__P*)0));
00233 }
00234 #else
00235 template<class __P>
00236 inline RTTIType* RTTITypeOfPtr(__P const*const*) {
00237 return new RTTIPtrType(&__P::RTTIDescriptor);
00238 }
00239 #endif
00240
00241
00242 template<>
00243 inline RTTIType* RTTITypeOfPtr(char const*const*) {
00244 return new RTTIPtrType(&RTTIType::charType);
00245 }
00246
00247 template<>
00248 inline RTTIType* RTTITypeOfPtr(unsigned char const*const*) {
00249 return new RTTIPtrType(&RTTIType::ucharType);
00250 }
00251
00252 template<>
00253 inline RTTIType* RTTITypeOfPtr(signed char const*const*) {
00254 return new RTTIPtrType(&RTTIType::scharType);
00255 }
00256
00257 template<>
00258 inline RTTIType* RTTITypeOfPtr(short const*const*) {
00259 return new RTTIPtrType(&RTTIType::shortType);
00260 }
00261
00262 template<>
00263 inline RTTIType* RTTITypeOfPtr(unsigned short const*const*) {
00264 return new RTTIPtrType(&RTTIType::ushortType);
00265 }
00266
00267 template<>
00268 inline RTTIType* RTTITypeOfPtr(int const*const*) {
00269 return new RTTIPtrType(&RTTIType::intType);
00270 }
00271
00272 template<>
00273 inline RTTIType* RTTITypeOfPtr(unsigned int const*const*) {
00274 return new RTTIPtrType(&RTTIType::uintType);
00275 }
00276
00277 template<>
00278 inline RTTIType* RTTITypeOfPtr(long const*const*) {
00279 return new RTTIPtrType(&RTTIType::longType);
00280 }
00281
00282 template<>
00283 inline RTTIType* RTTITypeOfPtr(unsigned long const*const*) {
00284 return new RTTIPtrType(&RTTIType::ulongType);
00285 }
00286
00287 template<>
00288 inline RTTIType* RTTITypeOfPtr(float const*const*) {
00289 return new RTTIPtrType(&RTTIType::floatType);
00290 }
00291
00292 template<>
00293 inline RTTIType* RTTITypeOfPtr(double const*const*) {
00294 return new RTTIPtrType(&RTTIType::doubleType);
00295 }
00296
00297 template<>
00298 inline RTTIType* RTTITypeOfPtr(bool const*const*) {
00299 return new RTTIPtrType(&RTTIType::boolType);
00300 }
00301
00302 #if defined(__GNUC__) && __GNUC_MINOR__ < 96
00303 template<class __P>
00304 inline RTTIType* RTTITypeOfPtrToPtr(__P const*const*const*) {
00305 extern RTTIClassDescriptor* RTTIGetClassDescriptor(__P*);
00306 return new RTTIPtrType(new RTTIPtrType(RTTIGetClassDescriptor((__P*)0)));
00307 }
00308 #else
00309 template<class __P>
00310 inline RTTIType* RTTITypeOfPtrToPtr(__P const*const*const*) {
00311 return new RTTIPtrType(new RTTIPtrType(&__P::RTTIDescriptor));
00312 }
00313 #endif
00314
00315 template<class __RT, class __C>
00316 class RTTIFuncType0 : public RTTIMethodType {
00317 public:
00318 typedef __RT (__C::*fptr)();
00319 fptr f;
00320 RTTIFuncType0(fptr f) {
00321 this->f = f;
00322 methodClass = &__C::RTTIDescriptor;
00323 returnType = RTTITypeOfPtr((__RT*)0);
00324 nParams = 0;
00325 paramType = NULL;
00326 }
00327 void invoke(void* result, void* obj, void* params[]) {
00328 *(__RT*)result = (((__C*)obj)->*f)();
00329 }
00330 };
00331
00332 template<class __RT, class __C, class __P1>
00333 class RTTIFuncType1 : public RTTIMethodType{
00334 public:
00335 typedef __RT (__C::*fptr)(__P1);
00336 fptr f;
00337 RTTIFuncType1(fptr f) {
00338 this->f = f;
00339 methodClass = &__C::RTTIDescriptor;
00340 returnType = RTTITypeOfPtr((__RT*)0);
00341 nParams = 1;
00342 paramTypes = new RTTIType*[1];
00343 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00344 }
00345 void invoke(void* result, void* obj, void* params[]) {
00346 *(__RT*)result = (((__C*)obj)->*f)(*(__P1*)params[0]);
00347 }
00348 };
00349
00350 template<class __RT, class __C, class __P1, class __P2>
00351 class RTTIFuncType2 : public RTTIMethodType{
00352 public:
00353 typedef __RT (__C::*fptr)(__P1, __P2);
00354 fptr f;
00355 RTTIFuncType2(fptr f) {
00356 this->f = f;
00357 methodClass = &__C::RTTIDescriptor;
00358 returnType = RTTITypeOfPtr((__RT*)0);
00359 nParams = 2;
00360 paramTypes = new RTTIType*[2];
00361 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00362 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00363 }
00364 void invoke(void* result, void* obj, void* params[]) {
00365 *(__RT*)result = (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1]);
00366 }
00367 };
00368
00369 template<class __RT, class __C, class __P1, class __P2, class __P3>
00370 class RTTIFuncType3 : public RTTIMethodType{
00371 public:
00372 typedef __RT (__C::*fptr)(__P1, __P2, __P3);
00373 fptr f;
00374 RTTIFuncType3(fptr f) {
00375 this->f = f;
00376 methodClass = &__C::RTTIDescriptor;
00377 returnType = RTTITypeOfPtr((__RT*)0);
00378 nParams = 3;
00379 paramTypes = new RTTIType*[3];
00380 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00381 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00382 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00383 }
00384 void invoke(void* result, void* obj, void* params[]) {
00385 *(__RT*)result = (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2]);
00386 }
00387 };
00388
00389 template<class __RT, class __C, class __P1, class __P2, class __P3, class __P4>
00390 class RTTIFuncType4 : public RTTIMethodType{
00391 public:
00392 typedef __RT (__C::*fptr)(__P1, __P2, __P3, __P4);
00393 fptr f;
00394 RTTIFuncType4(fptr f) {
00395 this->f = f;
00396 methodClass = &__C::RTTIDescriptor;
00397 returnType = RTTITypeOfPtr((__RT*)0);
00398 nParams = 4;
00399 paramTypes = new RTTIType*[4];
00400 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00401 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00402 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00403 paramTypes[3] = RTTITypeOfPtr((__P4*)0);
00404 }
00405 void invoke(void* result, void* obj, void* params[]) {
00406 *(__RT*)result = (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2], *(__P4*)params[3]);
00407 }
00408 };
00409
00410 template<class __RT, class __C, class __P1, class __P2, class __P3, class __P4, class __P5>
00411 class RTTIFuncType5 : public RTTIMethodType{
00412 public:
00413 typedef __RT (__C::*fptr)(__P1, __P2, __P3, __P4, __P5);
00414 fptr f;
00415 RTTIFuncType5(fptr f) {
00416 this->f = f;
00417 methodClass = &__C::RTTIDescriptor;
00418 returnType = RTTITypeOfPtr((__RT*)0);
00419 nParams = 5;
00420 paramTypes = new RTTIType*[5];
00421 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00422 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00423 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00424 paramTypes[3] = RTTITypeOfPtr((__P4*)0);
00425 paramTypes[4] = RTTITypeOfPtr((__P5*)0);
00426 }
00427 void invoke(void* result, void* obj, void* params[]) {
00428 *(__RT*)result = (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2], *(__P4*)params[3], *(__P5*)params[4]);
00429 }
00430 };
00431
00432
00433 template<class __C>
00434 class RTTIProcType0 : public RTTIMethodType {
00435 public:
00436 typedef void (__C::*fptr)();
00437 fptr f;
00438 RTTIProcType0(fptr f) {
00439 this->f = f;
00440 methodClass = &__C::RTTIDescriptor;
00441 returnType = &voidType;
00442 nParams = 0;
00443 paramTypes = NULL;
00444 }
00445 void invoke(void*, void* obj, void* params[]) {
00446 (((__C*)obj)->*f)();
00447 }
00448 };
00449
00450 template<class __C, class __P1>
00451 class RTTIProcType1 : public RTTIMethodType{
00452 public:
00453 typedef void (__C::*fptr)(__P1);
00454 fptr f;
00455 RTTIProcType1(fptr f) {
00456 this->f = f;
00457 methodClass = &__C::RTTIDescriptor;
00458 returnType = &voidType;
00459 nParams = 1;
00460 paramTypes = new RTTIType*[1];
00461 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00462 }
00463 void invoke(void*, void* obj, void* params[]) {
00464 (((__C*)obj)->*f)(*(__P1*)params[0]);
00465 }
00466 };
00467
00468 template<class __C, class __P1, class __P2>
00469 class RTTIProcType2 : public RTTIMethodType{
00470 public:
00471 typedef void (__C::*fptr)(__P1, __P2);
00472 fptr f;
00473 RTTIProcType2(fptr f) {
00474 this->f = f;
00475 methodClass = &__C::RTTIDescriptor;
00476 returnType = &voidType;
00477 nParams = 2;
00478 paramTypes = new RTTIType*[2];
00479 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00480 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00481 }
00482 void invoke(void*, void* obj, void* params[]) {
00483 (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1]);
00484 }
00485 };
00486
00487 template<class __C, class __P1, class __P2, class __P3>
00488 class RTTIProcType3 : public RTTIMethodType{
00489 public:
00490 typedef void (__C::*fptr)(__P1, __P2, __P3);
00491 fptr f;
00492 RTTIProcType3(fptr f) {
00493 this->f = f;
00494 methodClass = &__C::RTTIDescriptor;
00495 returnType = &voidType;
00496 nParams = 3;
00497 paramTypes = new RTTIType*[3];
00498 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00499 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00500 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00501 }
00502 void invoke(void*, void* obj, void* params[]) {
00503 (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2]);
00504 }
00505 };
00506
00507 template<class __C, class __P1, class __P2, class __P3, class __P4>
00508 class RTTIProcType4 : public RTTIMethodType{
00509 public:
00510 typedef void (__C::*fptr)(__P1, __P2, __P3, __P4);
00511 fptr f;
00512 RTTIProcType4(fptr f) {
00513 this->f = f;
00514 methodClass = &__C::RTTIDescriptor;
00515 returnType = &voidType;
00516 nParams = 4;
00517 paramTypes = new RTTIType*[4];
00518 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00519 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00520 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00521 paramTypes[3] = RTTITypeOfPtr((__P4*)0);
00522 }
00523 void invoke(void*, void* obj, void* params[]) {
00524 (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2], *(__P4*)params[3]);
00525 }
00526 };
00527
00528 template<class __C, class __P1, class __P2, class __P3, class __P4, class __P5>
00529 class RTTIProcType5 : public RTTIMethodType {
00530 public:
00531 typedef void (__C::*fptr)(__P1, __P2, __P3, __P4, __P5);
00532 fptr f;
00533 RTTIProcType5(fptr f) {
00534 this->f = f;
00535 methodClass = &__C::RTTIDescriptor;
00536 returnType = &voidType;
00537 nParams = 5;
00538 paramTypes = new RTTIType*[5];
00539 paramTypes[0] = RTTITypeOfPtr((__P1*)0);
00540 paramTypes[1] = RTTITypeOfPtr((__P2*)0);
00541 paramTypes[2] = RTTITypeOfPtr((__P3*)0);
00542 paramTypes[3] = RTTITypeOfPtr((__P4*)0);
00543 paramTypes[4] = RTTITypeOfPtr((__P5*)0);
00544 }
00545 void invoke(void*, void* obj, void* params[]) {
00546 (((__C*)obj)->*f)(*(__P1*)params[0], *(__P2*)params[1], *(__P3*)params[2], *(__P4*)params[3], *(__P5*)params[4]);
00547 }
00548 };
00549
00550
00551 template<class __RT, class __C>
00552 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)()) {
00553 return new RTTIFuncType0<__RT, __C>(f);
00554 }
00555
00556 template<class __RT, class __C, class __P1>
00557 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)(__P1)) {
00558 return new RTTIFuncType1<__RT, __C, __P1>(f);
00559 }
00560
00561 template<class __RT, class __C, class __P1, class __P2>
00562 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)(__P1, __P2)) {
00563 return new RTTIFuncType2<__RT, __C, __P1, __P2>(f);
00564 }
00565
00566 template<class __RT, class __C, class __P1, class __P2, class __P3>
00567 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)(__P1, __P2, __P3)) {
00568 return new RTTIFuncType3<__RT, __C, __P1, __P2, __P3>(f);
00569 }
00570
00571 template<class __RT, class __C, class __P1, class __P2, class __P3, class __P4>
00572 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)(__P1, __P2, __P3, __P4)) {
00573 return new RTTIFuncType4<__RT, __C, __P1, __P2, __P3, __P4>(f);
00574 }
00575
00576 template<class __RT, class __C, class __P1, class __P2, class __P3, class __P4, class __P5>
00577 inline RTTIMethodType* RTTIFuncTypeOf(__RT (__C::*f)(__P1, __P2, __P3, __P4, __P5)) {
00578 return new RTTIFuncType5<__RT, __C, __P1, __P2, __P3, __P4, __P5>(f);
00579 }
00580
00581
00582 template<class __C>
00583 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)()) {
00584 return new RTTIProcType0<__C>(f);
00585 }
00586
00587 template<class __C, class __P1>
00588 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)(__P1)) {
00589 return new RTTIProcType1<__C, __P1>(f);
00590 }
00591
00592 template<class __C, class __P1, class __P2>
00593 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)(__P1, __P2)) {
00594 return new RTTIProcType2<__C, __P1, __P2>(f);
00595 }
00596
00597 template<class __C, class __P1, class __P2, class __P3>
00598 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)(__P1, __P2, __P3)) {
00599 return new RTTIProcType3<__C, __P1, __P2, __P3>(f);
00600 }
00601
00602 template<class __C, class __P1, class __P2, class __P3, class __P4>
00603 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)(__P1, __P2, __P3, __P4)) {
00604 return new RTTIProcType4<__C, __P1, __P2, __P3, __P4>(f);
00605 }
00606
00607 template<class __C, class __P1, class __P2, class __P3, class __P4, class __P5>
00608 inline RTTIMethodType* RTTIProcTypeOf(void (__C::*f)(__P1, __P2, __P3, __P4, __P5)) {
00609 return new RTTIProcType5<__C, __P1, __P2, __P3, __P4, __P5>(f);
00610 }
00611
00612 #endif