X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/0aacdcf95cf6d4f33a2201160d472ab84148d52b..2d7fff39ec5ab67f13b5250a60082c4bc62c1739:/Model/src/exclusa.cpp?ds=sidebyside diff --git a/Model/src/exclusa.cpp b/Model/src/exclusa.cpp index 34b2fab..6e76c66 100644 --- a/Model/src/exclusa.cpp +++ b/Model/src/exclusa.cpp @@ -31,6 +31,11 @@ void Exclusa::update(int dir) void Exclusa::simulate() { + std::list::iterator i = in_list.begin(); + if (i != in_list.end()) { + PlantItem *o = (PlantItem *)(*i); + set_color( o->get_color() ); + } std::cout << name << ": " << ((is_open)?"Abierta":"Cerrada") << std::endl; } @@ -50,3 +55,14 @@ void Exclusa::recieve_msg(int msg, IConector *who, void *data) } } +void Exclusa::get_state_as_xml(std::stringstream &out) +{ + // Datos comunes + // hack to avoid output problems :-) + actual_flow = temp; + PlantItem::get_state_as_xml(out); + out << "\t" << std::endl; + out << "\t\t" << ((is_open)?"true":"false") << "" << std::endl; + out << "\t" << std::endl; +} +