void Funcion :: guardar(std::ostream &arch ) const{ char y = ENCABEZADO_ARCHIVO; arch<<'('<>sal; while(sal[sal.length()-1 ]!= '|'){ // agarra el nombre con espacios hasta q el ultimo caracter es el pipe string aux; is>>aux; sal += " "; sal += aux; }*/ agarrarNombre(is,sal); //borra el pipe is.get(); is.get(); //agarran espacio pipe agarrarNombre(is, obra); s = sal; o = obra; is.get(); f.cargar(is); is.get(); h.cargar(is); is.get(); is>>dur; is.get(); // espacio char x; is.get(); string nombre = ""; Lista elenco; x = is.get(); //puede ser una letra o un corchete cerrado while(x != ']'){ while(x != ',' && x != ']'){ nombre += x; x=is.get(); } elenco.agregarAtras(nombre); nombre = ""; if(x != ']') x = is.get(); } ele = elenco; is.get(); //agarra espacio x= is.get(); Lista contrat; string nombcont = ""; int cachet; Lista cachs; x=is.get(); while(x != ']'){ if(x == ',') x=is.get(); else{ while(x != ','){ nombcont += x; x=is.get(); } contrat.agregarAtras(nombcont); nombcont = ""; is>>cachet; cachs.agregarAtras(cachet); x = is.get(); } } cont = contrat; cach = cachs; is.get(); // espacio; x =is.get(); int prec; Lista precios; while(x != ']'){ is>>prec; x=is.get(); precios.agregarAtras(prec); } is.get(); pre = precios; } void Funcion :: agarrarNombre(std :: istream & is, std :: string & sal){ is>>sal; while(sal[sal.length()-1 ]!= '|'){ // agarra el nombre con espacios hasta q el ultimo caracter es el pipe string aux; is>>aux; sal += " "; sal += aux; } sal.erase((sal.length()-1), 1); }