5 using namespace PlaQui::Model;
7 PlantItem::PlantItem(const std::string &_name):IConector(0, 0)
11 fluid_color = RGB(255,255,255);
14 PlantItem::PlantItem(unsigned ins, unsigned outs):IConector(ins, outs)
19 PlantItem::~PlantItem()
23 void PlantItem::recieve_msg(int msg, IConector *who, void *data)
26 case MSG_QUERY_MAX_FLOW_OUT:
31 IConector::recieve_msg(msg, who, data);
35 void PlantItem::get_state_as_xml(std::stringstream &out)
37 out << "\t<float name=\"" << name << "\">" << std::endl;
38 out << "\t\t<actual_flow>" << actual_flow << "</actual_flow>" << std::endl;
39 out << "\t</float>" << std::endl;
40 out << "\t<color name=\"" << name << "\">" << std::endl;
41 out << "\t\t<r>" << fluid_color.r() << "</r>" << std::endl;
42 out << "\t\t<g>" << fluid_color.g() << "</g>" << std::endl;
43 out << "\t\t<b>" << fluid_color.b() << "</b>" << std::endl;
44 out << "\t</color>" << std::endl;
46 // Para que quede bonito