From 3e36e6af8f7afc7ebd9e199072c90a6c3a1bfd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Sat, 22 Jun 2019 21:42:24 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@805 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/core/piobject.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src_main/core/piobject.h b/src_main/core/piobject.h index 3e59c880..810b11fa 100755 --- a/src_main/core/piobject.h +++ b/src_main/core/piobject.h @@ -416,11 +416,11 @@ #define EVENT_VHANDLER EVENT_VHANDLER0 -#define EVENT0(name) EVENT_HANDLER0(void, name) {PIObject::raiseEvent(this, PIStringAscii(#name));} -#define EVENT1(name, a0, n0) EVENT_HANDLER1(void, name, a0, n0) {PIObject::raiseEvent(this, PIStringAscii(#name), n0);} -#define EVENT2(name, a0, n0, a1, n1) EVENT_HANDLER2(void, name, a0, n0, a1, n1) {PIObject::raiseEvent(this, PIStringAscii(#name), n0, n1);} -#define EVENT3(name, a0, n0, a1, n1, a2, n2) EVENT_HANDLER3(void, name, a0, n0, a1, n1, a2, n2) {PIObject::raiseEvent(this, PIStringAscii(#name), n0, n1, n2);} -#define EVENT4(name, a0, n0, a1, n1, a2, n2, a3, n3) EVENT_HANDLER4(void, name, a0, n0, a1, n1, a2, n2, a3, n3) {PIObject::raiseEvent(this, PIStringAscii(#name), n0, n1, n2, n3);} +#define EVENT0(name) EVENT_HANDLER0(void, name) {PIObject::raiseEvent(this, #name);} +#define EVENT1(name, a0, n0) EVENT_HANDLER1(void, name, a0, n0) {PIObject::raiseEvent(this, #name, n0);} +#define EVENT2(name, a0, n0, a1, n1) EVENT_HANDLER2(void, name, a0, n0, a1, n1) {PIObject::raiseEvent(this, #name, n0, n1);} +#define EVENT3(name, a0, n0, a1, n1, a2, n2) EVENT_HANDLER3(void, name, a0, n0, a1, n1, a2, n2) {PIObject::raiseEvent(this, #name, n0, n1, n2);} +#define EVENT4(name, a0, n0, a1, n1, a2, n2, a3, n3) EVENT_HANDLER4(void, name, a0, n0, a1, n1, a2, n2, a3, n3) {PIObject::raiseEvent(this, #name, n0, n1, n2, n3);} #define EVENT EVENT0 #define RAISE_EVENT0(src, event) (src)->event(); @@ -613,10 +613,10 @@ public: static void piDisconnect(PIObject * src); // / Raise events - static void raiseEvent(PIObject * sender, const PIString & event) { + static void raiseEvent(PIObject * sender, const char * event) { for (int j = 0; j < sender->connections.size_s(); ++j) { __Connection & i(sender->connections[j]); - if (i.event != event) continue; + if (strcmp(i.event.dataAscii(), event) != 0) continue; if (i.performer) { i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender)); } else { @@ -630,10 +630,10 @@ public: } template - static void raiseEvent(PIObject * sender, const PIString & event, const T0 & v0 = T0()) { + static void raiseEvent(PIObject * sender, const char * event, const T0 & v0 = T0()) { for (int j = 0; j < sender->connections.size_s(); ++j) { __Connection & i(sender->connections[j]); - if (i.event != event) continue; + if (strcmp(i.event.dataAscii(), event) != 0) continue; if (i.performer) { PIVector vl; if (i.args_count > 0) vl << PIVariant::fromValue(v0); @@ -649,10 +649,10 @@ public: } } template - static void raiseEvent(PIObject * sender, const PIString & event, const T0 & v0 = T0(), const T1 & v1 = T1()) { + static void raiseEvent(PIObject * sender, const char * event, const T0 & v0 = T0(), const T1 & v1 = T1()) { for (int j = 0; j < sender->connections.size_s(); ++j) { __Connection & i(sender->connections[j]); - if (i.event != event) continue; + if (strcmp(i.event.dataAscii(), event) != 0) continue; if (i.performer) { PIVector vl; if (i.args_count > 0) vl << PIVariant::fromValue(v0); @@ -672,10 +672,10 @@ public: } } template - static void raiseEvent(PIObject * sender, const PIString & event, const T0 & v0 = T0(), const T1 & v1 = T1(), const T2 & v2 = T2()) { + static void raiseEvent(PIObject * sender, const char * event, const T0 & v0 = T0(), const T1 & v1 = T1(), const T2 & v2 = T2()) { for (int j = 0; j < sender->connections.size_s(); ++j) { __Connection & i(sender->connections[j]); - if (i.event != event) continue; + if (strcmp(i.event.dataAscii(), event) != 0) continue; if (i.performer) { PIVector vl; if (i.args_count > 0) vl << PIVariant::fromValue(v0); @@ -697,10 +697,10 @@ public: } } template - static void raiseEvent(PIObject * sender, const PIString & event, const T0 & v0 = T0(), const T1 & v1 = T1(), const T2 & v2 = T2(), const T3 & v3 = T3()) { + static void raiseEvent(PIObject * sender, const char * event, const T0 & v0 = T0(), const T1 & v1 = T1(), const T2 & v2 = T2(), const T3 & v3 = T3()) { for (int j = 0; j < sender->connections.size_s(); ++j) { __Connection & i(sender->connections[j]); - if (i.event != event) continue; + if (strcmp(i.event.dataAscii(), event) != 0) continue; if (i.performer) { PIVector vl; if (i.args_count > 0) vl << PIVariant::fromValue(v0);