2 /* Test pedorro a ver que pasa con lo que esta programado!! */
3 /* Compilar : g++ -Wall -o test -I../include *.cpp */
12 using namespace PlaQui::Model;
14 int main(int argc, char *argv[])
21 Drainage *dren1, *dren2;
24 bomba1 = new Pump("bomba");
25 bomba1->set_max_flow(30);
26 salida1 = new Conduct("salida_1");
27 salida1->set_max_flow(2);
28 salida2 = new Conduct("salida_2");
29 salida2->set_max_flow(5);
31 split = new Splitter("splitter");
32 split->set_max_flow(8);
33 entrada = new Conduct("entrada");
34 entrada->set_max_flow(10);
36 dren1 = new Drainage("drenaje1");
37 dren2 = new Drainage("drenaje2");
39 bomba1->connect(entrada, IConector::OUT);
40 entrada->connect(bomba1, IConector::IN);
41 entrada->connect(split, IConector::OUT);
42 split->connect(entrada, IConector::IN);
43 split->connect(salida1, IConector::OUT);
44 split->connect(salida2, IConector::OUT);
45 salida1->connect(split, IConector::IN);
46 salida2->connect(split, IConector::IN);
47 salida1->connect(dren1, IConector::OUT);
48 salida2->connect(dren2, IConector::OUT);