git-svn-id: svn://db.shs.com.ru/pip@493 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -234,7 +234,7 @@
|
||||
void * fpV = fp; \
|
||||
if (eh.eh_set[fp]) return; \
|
||||
eh.eh_set << fp; \
|
||||
__EHFunc & f(eh.eh_func[fp]); \
|
||||
__MetaFunc & f(eh.eh_func[fp]); \
|
||||
f.scope = __classNameS(); \
|
||||
f.func_name = PIStringAscii(#name); \
|
||||
f.addr = fp; \
|
||||
@@ -254,7 +254,7 @@
|
||||
void * fpV = (void*)(ret(*)(void*, const PIVariant &))__stat_eh_v_##name##__; \
|
||||
if (eh.eh_set[fp]) return; \
|
||||
eh.eh_set << fp; \
|
||||
__EHFunc & f(eh.eh_func[fp]); \
|
||||
__MetaFunc & f(eh.eh_func[fp]); \
|
||||
f.scope = __classNameS(); \
|
||||
f.func_name = PIStringAscii(#name); \
|
||||
f.addr = fp; \
|
||||
@@ -276,7 +276,7 @@
|
||||
void * fpV = (void*)(ret(*)(void*, const PIVariant &, const PIVariant &))__stat_eh_v_##name##__; \
|
||||
if (eh.eh_set[fp]) return; \
|
||||
eh.eh_set << fp; \
|
||||
__EHFunc & f(eh.eh_func[fp]); \
|
||||
__MetaFunc & f(eh.eh_func[fp]); \
|
||||
f.scope = __classNameS(); \
|
||||
f.func_name = PIStringAscii(#name); \
|
||||
f.addr = fp; \
|
||||
@@ -298,7 +298,7 @@
|
||||
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; \
|
||||
__EHFunc & f(eh.eh_func[fp]); \
|
||||
__MetaFunc & f(eh.eh_func[fp]); \
|
||||
f.scope = __classNameS(); \
|
||||
f.func_name = PIStringAscii(#name); \
|
||||
f.addr = fp; \
|
||||
@@ -320,7 +320,7 @@
|
||||
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; \
|
||||
__EHFunc & f(eh.eh_func[fp]); \
|
||||
__MetaFunc & f(eh.eh_func[fp]); \
|
||||
f.scope = __classNameS(); \
|
||||
f.func_name = PIStringAscii(#name); \
|
||||
f.addr = fp; \
|
||||
@@ -522,7 +522,35 @@ public:
|
||||
|
||||
void setThreadSafe(bool yes) {thread_safe_ = yes;}
|
||||
bool isThreadSafe() const {return thread_safe_;}
|
||||
|
||||
|
||||
bool execute(const PIString & method, const PIVector<PIVariant> & vl);
|
||||
bool execute(const PIString & method) {return execute(method, PIVector<PIVariant>());}
|
||||
bool execute(const PIString & method, const PIVariant & v0) {return execute(method, PIVector<PIVariant>() << v0);}
|
||||
bool execute(const PIString & method, const PIVariant & v0, const PIVariant & v1) {return execute(method, PIVector<PIVariant>() << v0 << v1);}
|
||||
bool execute(const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2) {return execute(method, PIVector<PIVariant>() << v0 << v1 << v2);}
|
||||
bool execute(const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2, const PIVariant & v3) {return execute(method, PIVector<PIVariant>() << v0 << v1 << v2 << v3);}
|
||||
|
||||
bool executeQueued(PIObject * performer, const PIString & method, const PIVector<PIVariant> & vl);
|
||||
bool executeQueued(PIObject * performer, const PIString & method) {return executeQueued(performer, method, PIVector<PIVariant>());}
|
||||
bool executeQueued(PIObject * performer, const PIString & method, const PIVariant & v0) {return executeQueued(performer, method, PIVector<PIVariant>() << v0);}
|
||||
bool executeQueued(PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1) {return executeQueued(performer, method, PIVector<PIVariant>() << v0 << v1);}
|
||||
bool executeQueued(PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2) {return executeQueued(performer, method, PIVector<PIVariant>() << v0 << v1 << v2);}
|
||||
bool executeQueued(PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2, const PIVariant & v3) {return executeQueued(performer, method, PIVector<PIVariant>() << v0 << v1 << v2 << v3);}
|
||||
|
||||
static bool execute(PIObject * o, const PIString & method, const PIVector<PIVariant> & vl) {return o->execute(method, vl);}
|
||||
static bool execute(PIObject * o, const PIString & method) {return execute(o, method, PIVector<PIVariant>());}
|
||||
static bool execute(PIObject * o, const PIString & method, const PIVariant & v0) {return execute(o, method, PIVector<PIVariant>() << v0);}
|
||||
static bool execute(PIObject * o, const PIString & method, const PIVariant & v0, const PIVariant & v1) {return execute(o, method, PIVector<PIVariant>() << v0 << v1);}
|
||||
static bool execute(PIObject * o, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2) {return execute(o, method, PIVector<PIVariant>() << v0 << v1 << v2);}
|
||||
static bool execute(PIObject * o, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2, const PIVariant & v3) {return execute(o, method, PIVector<PIVariant>() << v0 << v1 << v2 << v3);}
|
||||
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method, const PIVector<PIVariant> & vl) {return o->executeQueued(performer, method, vl);}
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method) {return executeQueued(o, performer, method, PIVector<PIVariant>());}
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method, const PIVariant & v0) {return executeQueued(o, performer, method, PIVector<PIVariant>() << v0);}
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1) {return executeQueued(o, performer, method, PIVector<PIVariant>() << v0 << v1);}
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2) {return executeQueued(o, performer, method, PIVector<PIVariant>() << v0 << v1 << v2);}
|
||||
static bool executeQueued(PIObject * o, PIObject * performer, const PIString & method, const PIVariant & v0, const PIVariant & v1, const PIVariant & v2, const PIVariant & v3) {return executeQueued(o, performer, method, PIVector<PIVariant>() << v0 << v1 << v2 << v3);}
|
||||
|
||||
void dump(const PIString & line_prefix = PIString()) const;
|
||||
|
||||
|
||||
@@ -760,7 +788,6 @@ public:
|
||||
if (!isTypeOf<T>()) return (T*)0;
|
||||
return (T*)this;
|
||||
}
|
||||
bool execute(const PIString & method);
|
||||
|
||||
static bool isPIObject(const PIObject * o);
|
||||
static bool isPIObject(const void * o) {return isPIObject((PIObject*)o);}
|
||||
@@ -768,12 +795,10 @@ public:
|
||||
static bool isTypeOf(const PIObject * o) {return o->isTypeOf<T>();}
|
||||
template<typename T>
|
||||
static bool isTypeOf(const void * o) {return isTypeOf<T>((PIObject*)o);}
|
||||
static bool execute(PIObject * o, const PIString & method) {return o->execute(method);}
|
||||
static bool execute(void * o, const PIString & method) {return ((PIObject*)o)->execute(method);}
|
||||
static PIString simplifyType(const char * a);
|
||||
|
||||
struct __EHFunc {
|
||||
__EHFunc(): addr(0), addrV(0) {;}
|
||||
struct __MetaFunc {
|
||||
__MetaFunc(): addr(0), addrV(0) {;}
|
||||
bool isNull() const {return addr == 0;}
|
||||
PIString arguments() const;
|
||||
PIString fullFormat() const;
|
||||
@@ -790,9 +815,9 @@ public:
|
||||
void addScope(const PIString & s) {if (!scope_list.contains(s)) scope_list << s;}
|
||||
PIStringList scope_list;
|
||||
PISet<const void * > eh_set;
|
||||
PIMap<const void * , __EHFunc> eh_func;
|
||||
PIMap<const void * , __MetaFunc> eh_func;
|
||||
};
|
||||
typedef PIPair<const void * , __EHFunc> __EHPair;
|
||||
typedef PIPair<const void * , __MetaFunc> __EHPair;
|
||||
|
||||
static PIMutex & __meta_mutex();
|
||||
static PIMap<PIString, __MetaData> & __meta_data(); // [classname]=__MetaData
|
||||
@@ -855,12 +880,14 @@ private:
|
||||
};
|
||||
typedef PIPair<PIString, PIVariant> Property;
|
||||
|
||||
PIVector<__EHFunc> findEH(const PIString & name) const;
|
||||
__EHFunc methodEH(const void * addr) const;
|
||||
bool findSuitableMethodV(const PIString & method, int args, int & ret_args, __MetaFunc & ret);
|
||||
PIVector<__MetaFunc> findEH(const PIString & name) const;
|
||||
__MetaFunc methodEH(const void * addr) const;
|
||||
void updateConnectors();
|
||||
void postQueuedEvent(const QueuedEvent & e);
|
||||
|
||||
static PIVector<PIObject * > & objects();
|
||||
static callAddrV(void * slot, void * obj, int args, const PIVector<PIVariant> & vl);
|
||||
|
||||
PIVector<Connection> connections;
|
||||
PIMap<PIString, PIVariant> properties_;
|
||||
|
||||
Reference in New Issue
Block a user