git-svn-id: svn://db.shs.com.ru/pip@805 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-06-22 21:42:24 +00:00
parent 1f527d8e14
commit 3e36e6af8f

View File

@@ -416,11 +416,11 @@
#define EVENT_VHANDLER EVENT_VHANDLER0 #define EVENT_VHANDLER EVENT_VHANDLER0
#define EVENT0(name) EVENT_HANDLER0(void, name) {PIObject::raiseEvent(this, PIStringAscii(#name));} #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, PIStringAscii(#name), n0);} #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, PIStringAscii(#name), n0, n1);} #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, PIStringAscii(#name), n0, n1, n2);} #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, PIStringAscii(#name), n0, n1, n2, n3);} #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 EVENT EVENT0
#define RAISE_EVENT0(src, event) (src)->event(); #define RAISE_EVENT0(src, event) (src)->event();
@@ -613,10 +613,10 @@ public:
static void piDisconnect(PIObject * src); static void piDisconnect(PIObject * src);
// / Raise events // / 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) { for (int j = 0; j < sender->connections.size_s(); ++j) {
__Connection & i(sender->connections[j]); __Connection & i(sender->connections[j]);
if (i.event != event) continue; if (strcmp(i.event.dataAscii(), event) != 0) continue;
if (i.performer) { if (i.performer) {
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender)); i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender));
} else { } else {
@@ -630,10 +630,10 @@ public:
} }
template <typename T0> template <typename T0>
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) { for (int j = 0; j < sender->connections.size_s(); ++j) {
__Connection & i(sender->connections[j]); __Connection & i(sender->connections[j]);
if (i.event != event) continue; if (strcmp(i.event.dataAscii(), event) != 0) continue;
if (i.performer) { if (i.performer) {
PIVector<PIVariant> vl; PIVector<PIVariant> vl;
if (i.args_count > 0) vl << PIVariant::fromValue(v0); if (i.args_count > 0) vl << PIVariant::fromValue(v0);
@@ -649,10 +649,10 @@ public:
} }
} }
template <typename T0, typename T1> template <typename T0, typename T1>
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) { for (int j = 0; j < sender->connections.size_s(); ++j) {
__Connection & i(sender->connections[j]); __Connection & i(sender->connections[j]);
if (i.event != event) continue; if (strcmp(i.event.dataAscii(), event) != 0) continue;
if (i.performer) { if (i.performer) {
PIVector<PIVariant> vl; PIVector<PIVariant> vl;
if (i.args_count > 0) vl << PIVariant::fromValue(v0); if (i.args_count > 0) vl << PIVariant::fromValue(v0);
@@ -672,10 +672,10 @@ public:
} }
} }
template <typename T0, typename T1, typename T2> template <typename T0, typename T1, typename T2>
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) { for (int j = 0; j < sender->connections.size_s(); ++j) {
__Connection & i(sender->connections[j]); __Connection & i(sender->connections[j]);
if (i.event != event) continue; if (strcmp(i.event.dataAscii(), event) != 0) continue;
if (i.performer) { if (i.performer) {
PIVector<PIVariant> vl; PIVector<PIVariant> vl;
if (i.args_count > 0) vl << PIVariant::fromValue(v0); if (i.args_count > 0) vl << PIVariant::fromValue(v0);
@@ -697,10 +697,10 @@ public:
} }
} }
template <typename T0, typename T1, typename T2, typename T3> template <typename T0, typename T1, typename T2, typename T3>
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) { for (int j = 0; j < sender->connections.size_s(); ++j) {
__Connection & i(sender->connections[j]); __Connection & i(sender->connections[j]);
if (i.event != event) continue; if (strcmp(i.event.dataAscii(), event) != 0) continue;
if (i.performer) { if (i.performer) {
PIVector<PIVariant> vl; PIVector<PIVariant> vl;
if (i.args_count > 0) vl << PIVariant::fromValue(v0); if (i.args_count > 0) vl << PIVariant::fromValue(v0);