|
|
|
|
@@ -257,112 +257,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define EH_INIT0(ret, name) \
|
|
|
|
|
class __##name##0_Initializer__ { \
|
|
|
|
|
public: \
|
|
|
|
|
__##name##0_Initializer__() { \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = fp; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
} \
|
|
|
|
|
}; \
|
|
|
|
|
__##name##0_Initializer__ __##name##0_init__; \
|
|
|
|
|
STATIC_INITIALIZER_BEGIN \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = fp; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
STATIC_INITIALIZER_END
|
|
|
|
|
|
|
|
|
|
#define EH_INIT1(ret, name, a0, n0) \
|
|
|
|
|
class __##name##1##n0##_Initializer__ { \
|
|
|
|
|
public: \
|
|
|
|
|
__##name##1##n0##_Initializer__() { \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0); \
|
|
|
|
|
f.names << PIStringAscii(#n0); \
|
|
|
|
|
} \
|
|
|
|
|
}; \
|
|
|
|
|
__##name##1##n0##_Initializer__ __##name##1##n0##_init__; \
|
|
|
|
|
STATIC_INITIALIZER_BEGIN \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0); \
|
|
|
|
|
f.names << PIStringAscii(#n0); \
|
|
|
|
|
STATIC_INITIALIZER_END
|
|
|
|
|
|
|
|
|
|
#define EH_INIT2(ret, name, a0, n0, a1, n1) \
|
|
|
|
|
class __##name##2##n0##n1##_Initializer__ { \
|
|
|
|
|
public: \
|
|
|
|
|
__##name##2##n0##n1##_Initializer__() { \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1); \
|
|
|
|
|
} \
|
|
|
|
|
}; \
|
|
|
|
|
__##name##2##n0##n1##_Initializer__ __##name##2##n0##n1##_init__; \
|
|
|
|
|
STATIC_INITIALIZER_BEGIN \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1); \
|
|
|
|
|
STATIC_INITIALIZER_END
|
|
|
|
|
|
|
|
|
|
#define EH_INIT3(ret, name, a0, n0, a1, n1, a2, n2) \
|
|
|
|
|
class __##name##3##n0##n1##n2##_Initializer__ { \
|
|
|
|
|
public: \
|
|
|
|
|
__##name##3##n0##n1##n2##_Initializer__() { \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1, a2))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1) << PIObject::simplifyType(#a2); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1) << PIStringAscii(#n2); \
|
|
|
|
|
} \
|
|
|
|
|
}; \
|
|
|
|
|
__##name##3##n0##n1##n2##_Initializer__ __##name##3##n0##n1##n2##_init__; \
|
|
|
|
|
STATIC_INITIALIZER_BEGIN \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1, a2))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1) << PIObject::simplifyType(#a2); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1) << PIStringAscii(#n2); \
|
|
|
|
|
STATIC_INITIALIZER_END
|
|
|
|
|
|
|
|
|
|
#define EH_INIT4(ret, name, a0, n0, a1, n1, a2, n2, a3, n3) \
|
|
|
|
|
class __##name##4##n0##n1##n2##n3##_Initializer__ { \
|
|
|
|
|
public: \
|
|
|
|
|
__##name##4##n0##n1##n2##n3##_Initializer__() { \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1, a2, a3))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1) << PIObject::simplifyType(#a2) << PIObject::simplifyType(#a3); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1) << PIStringAscii(#n2) << PIStringAscii(#n3); \
|
|
|
|
|
} \
|
|
|
|
|
}; \
|
|
|
|
|
__##name##4##n0##n1##n2##n3##_Initializer__ __##name##4##n0##n1##n2##n3##_init__; \
|
|
|
|
|
STATIC_INITIALIZER_BEGIN \
|
|
|
|
|
PIMutexLocker ml(__meta_mutex()); \
|
|
|
|
|
__MetaData & eh(__meta_data()[__classNameIDS()]); \
|
|
|
|
|
void * fp = (void*)(ret(*)(void*, a0, a1, a2, a3))__stat_eh_##name##__; \
|
|
|
|
|
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
|
|
|
|
if (eh.eh_set[fp]) return; \
|
|
|
|
|
eh.eh_set << fp; \
|
|
|
|
|
__MetaFunc & f(eh.eh_func[fp]); \
|
|
|
|
|
f.scope = __classNameS(); \
|
|
|
|
|
f.func_name = PIStringAscii(#name); \
|
|
|
|
|
f.addr = fp; \
|
|
|
|
|
f.addrV = fpV; \
|
|
|
|
|
f.type_ret = PIStringAscii(#ret); \
|
|
|
|
|
f.types << PIObject::simplifyType(#a0) << PIObject::simplifyType(#a1) << PIObject::simplifyType(#a2) << PIObject::simplifyType(#a3); \
|
|
|
|
|
f.names << PIStringAscii(#n0) << PIStringAscii(#n1) << PIStringAscii(#n2) << PIStringAscii(#n3); \
|
|
|
|
|
STATIC_INITIALIZER_END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define EVENT_HANDLER0(ret, name) \
|
|
|
|
|
|