From: Ricardo Markiewicz Date: Mon, 1 Dec 2003 04:38:57 +0000 (+0000) Subject: Se agrega la consante INFINITO pendiente desde el primer commit :-) X-Git-Tag: svn_import~130 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/4f94fbe0a1d217c7410e5396aad365c85f1fc5af?ds=sidebyside Se agrega la consante INFINITO pendiente desde el primer commit :-) --- diff --git a/Client/src/principal.cpp b/Client/src/principal.cpp index 5066b52..7b441ee 100644 --- a/Client/src/principal.cpp +++ b/Client/src/principal.cpp @@ -16,6 +16,8 @@ #include #include +#define INFINITO 99999999 + Principal::Principal(BaseObjectType *co, const Glib::RefPtr &rg):Gtk::Window(co),refXml(rg) { Gtk::MenuItem *conect=0, *exit=0, *about=0, *mnu_prop=0, *mnu_disconnect=0; @@ -850,6 +852,7 @@ float Principal::get_float_from_xml(xmlNodePtr nodo) } nodo = nodo->next; } + if (tmp == INFINITO) tmp = 0; return tmp; } diff --git a/Model/include/plantitem.h b/Model/include/plantitem.h index a85f62d..25b7eb2 100644 --- a/Model/include/plantitem.h +++ b/Model/include/plantitem.h @@ -8,6 +8,8 @@ #include "rgb.h" #include +#define INFINITO 99999999 + namespace PlaQui { namespace Model { diff --git a/Model/src/conduct.cpp b/Model/src/conduct.cpp index 08098d4..a0e40fe 100644 --- a/Model/src/conduct.cpp +++ b/Model/src/conduct.cpp @@ -10,7 +10,7 @@ Conduct::Conduct(const std::string &_name):Transport(_name) // Inicio los parametros de conectores in_slots = 1; out_slots = 1; - actual_flow = 99999; + actual_flow = INFINITO; updated = false; } diff --git a/Model/src/drainage.cpp b/Model/src/drainage.cpp index 85fec86..d421662 100644 --- a/Model/src/drainage.cpp +++ b/Model/src/drainage.cpp @@ -9,7 +9,7 @@ Drainage::Drainage(const std::string &_name):Drain(_name),Control(_name) in_slots = 1; out_slots = 0; // FIXME hacer INFINITO! - capacity = 99999; + capacity = INFINITO; actual_flow = 0.0f; } @@ -41,7 +41,7 @@ void Drainage::recieve_msg(int msg, IConector *who, void *data) case MSG_QUERY_MAX_FLOW_OUT: // FIXME Hacer INFINITO !!! actual_flow = *((float *)data); - tmp = 999999; + tmp = INFINITO; who->recieve_msg(MSG_RESPONSE_MAX_FLOW, this, &tmp); updated = true; break; diff --git a/Model/src/plantitem.cpp b/Model/src/plantitem.cpp index 7569722..34360b0 100644 --- a/Model/src/plantitem.cpp +++ b/Model/src/plantitem.cpp @@ -67,5 +67,5 @@ void PlantItem::get_state_as_xml(std::stringstream &out) out << "\t" << std::endl; // Para que quede bonito - actual_flow = 99999; + actual_flow = INFINITO; } diff --git a/Model/src/splitter.cpp b/Model/src/splitter.cpp index 140bf7e..cd3ccad 100644 --- a/Model/src/splitter.cpp +++ b/Model/src/splitter.cpp @@ -72,7 +72,7 @@ void Splitter::update(int dir) // Si ya me actualice, no lo tengo que hacer de nuevo if (updated) return; // Seteo mi actualizar en true para evitar entrar de nuevo - actual_flow = 99999; + actual_flow = INFINITO; updated = true; switch (dir) { case IN: diff --git a/Model/src/union.cpp b/Model/src/union.cpp index a9397dd..4e1a2ac 100644 --- a/Model/src/union.cpp +++ b/Model/src/union.cpp @@ -11,7 +11,7 @@ Union::Union(const std::string &_name):Transport(_name) max_flow = 0.0f; in_on_zero = 0; in_ready = 0; - actual_flow = 999999; + actual_flow = INFINITO; updated = false; } @@ -144,8 +144,7 @@ void Union::update(int dir) if (updated) return; // Seteo mi actualizar en true para evitar entrar de nuevo - // FIXME : 99999 == INFINITO!! - actual_flow = 99999; + actual_flow = INFINITO; updated = true; switch (dir) { case IN: