int main() { ecto::plasm::ptr p(new ecto::plasm()); //load up our plasm { std::ifstream in("printy.plasm"); p->load(in); } //lets make some graphviz { std::ofstream graphviz("printy.plasm.dot"); p->viz(graphviz); } //iterate over all cells in the plasm. std::cout << "** cell listing" << std::endl; std::vector<ecto::cell::ptr> cells = p->cells(); for (size_t i = 0; i < cells.size(); i++) { std::cout << cells[i]->name() << std::endl; } //use a scheduler... ecto::scheduler sched(p); return sched.execute(); }
void escribir(){ if(orden == 1){ if(oblint(disk.sise)==0 || oblichar(disk.name)==0 || oblichar(disk.path)==0){ printf("PARAMETRO CHAR OBLIGATORIO VACIO \n"); return; } // printf("/n este es el unit ahora /n %s",disk.unit); if(oblichar(disk.unit)==0){ //disk.unit = "m"; // printf("UNIT ES OPCIONAL SE PROPORCIONARA EL VALOR M \n"); strcpy(disk.unit,"m"); texto.valuni = 1000000; }else{ texto.valuni = evaluarunidad(disk.unit); if((texto.valuni)==0){ return; } } printf(texto.tex); //printf("HOLA JAI %d \n",texto.valuni); // disk.path = sincomas; buscpath(); strcpy(rdisk.path,sincomas); // scad(disk.path); carpeta(sincomas); strcpy(disk.path,sincomas); sincomas = ""; scad(disk.name); strcpy(disk.name,sincomas); sincomas = ""; crearchivo(disk.path,disk.name,disk.sise,texto.valuni); }else if(orden == 2){ buscpath(); strcpy(rdisk.path,sincomas); if(oblichar(rdisk.path)==0){ printf("PARAMETRO CHAR OBLIGATORIO VACIO \n"); return; } strcpy(rdisk.path,sincomas); compdisco(rdisk.path); }else if(orden == 3){ if(oblichar(fmdisk.path)==0 || oblint(fmdisk.size)==0 || oblichar(fmdisk.name)==0){ printf("PARAMETRO CHAR OBLIGATORIO VACIO \n"); return; } if(oblichar(fmdisk.unit)==0){ //disk.unit = "m"; //printf("UNIT ES OPCIONAL SE PROPORCIONARA EL VALOR k \n"); strcpy(fmdisk.unit,"k"); texto.valuni = 1000; }else{ texto.valuni = evaluarunidad(fmdisk.unit); if((texto.valuni)==0){ return; } } if(oblichar(fmdisk.type)==0){ strcpy(fmdisk.type,"p"); //printf("TYPE DEFAULT P %s \n",fmdisk.type); }else{ if(evaluartype(fmdisk.type)==0){ return;} } if(oblichar(fmdisk.fit)==0){ strcpy(fmdisk.fit,"wf"); // printf("FIT DEFAULT WF %s \n",fmdisk.fit); }else{ if(evaluarfit(fmdisk.fit)==0){ return; } } if(oblichar(fmdisk.dele)==0){ }else{ if(evaluardele(fmdisk.dele)==0){ return; } } particiones(); }else if(orden == 4){ printf("%s %s",name,path); if(oblichar(name)==0 || oblichar(path)==0){ Pop(&pil); printf("\n PARA MONTAR PARTICION DEBES INGRESAR LOS PARAMENTROS OBLIGATORIOS \n"); return; } buscpath(); strcpy(path,sincomas); scad(name); strcpy(name,sincomas); montpart(); }else if(orden == 6){ if(oblichar(exec)==0){ printf("\n ERROR, PARAMETROS OBLIGATORIOS VACIOS \n"); return; } buscpath(); strcpy(exec,sincomas); leerscript(exec); } if(orden == 7){ char l = 97; printf("caracter %c %s\n",l,id); /*char ide[1]; ide[0] = id[3]; int n; n = atoi(ide); */ if(oblichar(namer)==0 || oblichar(pathr)==0 || oblichar(id)==0){ printf("\n ERROR, PARAMETROS OBLIGATORIOS VACIOS \n"); return; } char ide[1]; ide[0] = id[3]; int n; n = atoi(ide); printf("%s %d",id,n); printf("llegue aqui"); if(busPart(&pil, n)==1){ return; } buscpath(); strcpy(pathr,sincomas); carpeta(pathr); graphviz(pathr); // return v; } orden = 0; }