X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/b75b5632c75f245e59a00775ffbe0affdedf8b6c..fb8d2fb83534b0ca76f81e6d107e38d002642a46:/Model/src/iconector.cpp?ds=sidebyside diff --git a/Model/src/iconector.cpp b/Model/src/iconector.cpp index 3307305..68d4024 100644 --- a/Model/src/iconector.cpp +++ b/Model/src/iconector.cpp @@ -1,7 +1,7 @@ #include "iconector.h" - +#include using namespace PlaQui::Model; IConector::IConector(unsigned in, unsigned out) @@ -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,12 @@ 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); + for(it=out_list.begin(); it!=out_list.end(); it++) { + (*it)->recieve_msg(msg, this, data); + } } }