Changeset 419 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
- Timestamp:
- Jun 21, 2013, 2:32:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
r418 r419 64 64 } 65 65 66 void dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog) 67 { 68 jobList_.push_back(new sectionToExecute(debut, debutIndex, fin, finIndex, prog)); 66 sectionToExecute* dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, nomDeLogiciel logiciel) 67 { 68 abstractSoftware* prog; 69 string inputFileName; 70 if(logiciel == nomDeLogiciel::parmela) { 71 inputFileName = "parmin"; 72 prog = new softwareParmela(inputFileName, &globParam_, this); 73 } else if (logiciel == nomDeLogiciel::transport) { 74 inputFileName = "transport.input"; 75 prog = new softwareTransport(inputFileName, &globParam_, this); 76 } else if (logiciel == nomDeLogiciel::generator) { 77 inputFileName = "generator.in"; 78 prog = new softwareGenerator(inputFileName, &globParam_, this); 79 } else if (logiciel == nomDeLogiciel::test) { 80 prog = new softwareTest(inputFileName, &globParam_, this); 81 } else { 82 prog = NULL; 83 } 84 85 // abstractSoftware* prog = createSoftwareConnexion(logiciel); 86 jobList_.push_back(new sectionToExecute(debut, debutIndex, fin, finIndex, prog)); 87 // return prog; 88 return jobList_.back(); 69 89 } 70 90 … … 81 101 82 102 void dataManager::clearSectionToExecute(int a) { 103 cout << " dataManager::clearSectionToExecute efaacement section d'index : " << a << endl; 83 104 if (a<0) return; 84 105 if (a>= jobList_.size()) return; 106 107 // lors de la creation de la section on a fait un 'new' d'un softwareXXXX 108 // on fait ici le 'delete' 109 110 const abstractSoftware* soft = jobList_.at(a)->getSoftware(); 111 if ( soft != NULL ) delete soft; 85 112 jobList_.erase (jobList_.begin()+a); 86 113 } … … 160 187 } 161 188 162 delete softw;163 189 if ( success ) { 164 190 currentBeam_ = &diagnosticBeam_.at(indexElementToIndexDiag_.back()); … … 328 354 string inputFileName; 329 355 if(logi == nomDeLogiciel::parmela) { 356 cout << " dataManager::createSoftwareConnexion : logiciel identifie : parmela " << endl; 330 357 inputFileName = "parmin"; 331 358 return new softwareParmela(inputFileName, &globParam_, this); 332 359 } else if (logi == nomDeLogiciel::transport) { 360 cout << " dataManager::createSoftwareConnexion : logiciel identifie : transport " << endl; 333 361 inputFileName = "transport.input"; 334 362 return new softwareTransport(inputFileName, &globParam_, this); 335 363 } else if (logi == nomDeLogiciel::generator) { 364 cout << " dataManager::createSoftwareConnexion : logiciel identifie : generator " << endl; 336 365 inputFileName = "generator.in"; 337 366 return new softwareGenerator(inputFileName, &globParam_, this); 338 367 } else if (logi == nomDeLogiciel::test) { 368 cout << " dataManager::createSoftwareConnexion : logiciel identifie : test " << endl; 339 369 return new softwareTest(inputFileName, &globParam_, this); 340 370 } else { 371 cout << " dataManager::createSoftwareConnexion : logiciel identifie : null " << endl; 341 372 return NULL; 342 373 }
Note: See TracChangeset
for help on using the changeset viewer.