X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/5885f9816965f487fd852a9ea46bbc580c48d317..be1908f8097dbbc871bfd7c55432de43d25647b7:/Model/src/iconector.cpp diff --git a/Model/src/iconector.cpp b/Model/src/iconector.cpp index eb9a647..7cbdd56 100644 --- a/Model/src/iconector.cpp +++ b/Model/src/iconector.cpp @@ -17,7 +17,7 @@ IConector::~IConector() out_list.clear(); } -void IConector::send_msg(int where, int msg) +void IConector::send_msg(int where, int msg, void *data) { // Recorro toda la lista y envĂ­o el mensage a cada // elemento conectado en "where" @@ -25,11 +25,11 @@ void IConector::send_msg(int where, int msg) switch (where) { case IN: for(it=in_list.begin(); it!=in_list.end(); it++) - (*it)->recieve_msg(msg, this, NULL); + (*it)->recieve_msg(msg, this, data); break; case OUT: for(it=out_list.begin(); it!=out_list.end(); it++) - (*it)->recieve_msg(msg, this, NULL); + (*it)->recieve_msg(msg, this, data); } } @@ -54,6 +54,7 @@ bool IConector::connect(IConector *obj, int place) } else { return false; // no se pudo conectar! } + break; case OUT: if (out_list.size() <= out_slots) { out_list.push_back(obj);