Fecha LinkLinkIt::itPunLinks::ultFecha(){ int res = 0; if (!Siguiente()->dameAccesos().EsVacia()) { res = Siguiente()->dameAccesos().Ultimo().dameDia(); } while(HaySiguiente()) { if(!Siguiente()->dameAccesos().EsVacia() && res < Siguiente()->dameAccesos().Ultimo().dameDia()){ res = Siguiente()->dameAccesos().Ultimo().dameDia(); } Avanzar(); } return res; }
/* BanderasObjeto(): Actualiza las banderas relacionadas con la informaci¢n del objeto actualmente referido */ void BanderasObjeto(void) { int o = CodigoObjeto(bandera[34], bandera[35]); OBJETO *obj = DarObjeto(o); int tipoObj; int valor, nombre, adjetivo; if (obj == NULL) { valor = Siguiente(ENCIMA_LLEVADO, 0); DarNombreObjeto(DarObjeto(valor), &nombre, &adjetivo); while (valor != -1 && nombre != bandera[34]) { valor = Siguiente(ENCIMA_LLEVADO, 1); DarNombreObjeto(DarObjeto(valor), &nombre, &adjetivo); } if (valor == -1) { valor = Siguiente(bandera[38], 0); DarNombreObjeto(DarObjeto(valor), &nombre, &adjetivo); while (valor != -1 && nombre != bandera[34]) { valor = Siguiente(bandera[38], 1); DarNombreObjeto(DarObjeto(valor), &nombre, &adjetivo); } if (valor != -1) obj = DarObjeto(valor); } else obj = DarObjeto(valor); } tipoObj = DarTipoObjeto(obj); bandera[54] = DarActualObjeto(obj); /* Localidad actual */ bandera[55] = DarPesoObjeto(obj); /* Peso del objeto */ bandera[56] = tipoObj == T_CONTENEDOR; bandera[57] = tipoObj == T_ROPA; bandera[58] = DarCodigoObjeto(obj); }
int LinkLinkIt::itPunLinks::cantAccesosDesde(Fecha f){ Lista<Acceso> lA = Siguiente()->dameAccesos(); ItAcceso itAcc = ItAcceso(lA); int res = 0; while(itAcc.HaySiguiente()) { if(itAcc.Siguiente().dameDia() <= f && itAcc.Siguiente().dameDia() >= f -2) { res = res + itAcc.Siguiente().dameCantA(); } itAcc.Avanzar(); } return res; }
Categoria LinkLinkIt::itPunLinks::SiguienteCat() const{ return Siguiente()->dameCatDLink().dameCat(); }