void Exclusa::simulate()
{
+ std::list<IConector *>::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;
}
}
}
+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<exclusa name=\"" << name << "\">" << std::endl;
+ out << "\t\t<active>" << ((is_open)?"true":"false") << "</active>" << std::endl;
+ out << "\t</exclusa>" << std::endl;
+}
+