Changeset 419 in PSPA
- Timestamp:
- Jun 21, 2013, 2:32:47 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
r418 r419 31 31 particleBeam* getDiagnosticBeam(string elementLabel); 32 32 33 void addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog);33 sectionToExecute* addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, nomDeLogiciel logiciel); 34 34 35 35 abstractElement* addElement(nomdElements::typedElement elemType); … … 65 65 bool restoreElements(string inputFileName); 66 66 67 abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);68 67 69 68 /** return the jobList size 70 69 */ 71 inline int getJobListSize() {70 inline int getJobListSize() const { 72 71 return jobList_.size(); 73 72 } … … 86 85 return NULL if the index does not exist 87 86 */ 88 inline sectionToExecute* getJobListAt(int a) { 89 if (a < 0) return NULL; 90 if (a >= getJobListSize()) return NULL; 91 return jobList_[a]; 92 } 87 88 /* inline sectionToExecute* getJobListAt(int a) { */ 89 /* if (a < 0) return NULL; */ 90 /* if (a >= getJobListSize()) return NULL; */ 91 /* return jobList_[a]; */ 92 /* } */ 93 94 95 96 /* inline const abstractSoftware* getSoftwareOfSection( int index) const { */ 97 /* if (index < 0) return NULL; */ 98 /* if (index >= getJobListSize()) return NULL; */ 99 /* return jobList_[index]->getSoftware(); */ 100 /* } */ 93 101 94 102 /** Clear a specific jobList */ … … 111 119 void removeFile(string nameOfFile); 112 120 void clearSectionToExecute(); 113 121 abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi); 122 114 123 }; 115 124 #endif -
Interface_Web/trunk/pspaWT/sources/controler/include/sectionToExecute.h
r413 r419 25 25 26 26 /** Deprecated : To be removed ! */ 27 inline int getElementNumberInSection() {27 inline int getElementNumberInSection() const { 28 28 return firstElementNumberInBeamLine; 29 29 } 30 30 31 31 /** Deprecated : To be removed ! */ 32 inline int getLastElementNumberInSection() {32 inline int getLastElementNumberInSection() const { 33 33 return lastElementNumberInBeamLine; 34 34 } 35 inline abstractSoftware* getSoftware() {35 inline abstractSoftware* getSoftware() const { 36 36 return software; 37 37 } -
Interface_Web/trunk/pspaWT/sources/controler/src/abstractSoftware.cc
r418 r419 1 1 #include "abstractSoftware.h" 2 2 #include "dataManager.h" 3 3 #include <algorithm> 4 4 abstractSoftware::abstractSoftware() 5 5 { -
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 } -
Interface_Web/trunk/pspaWT/sources/controler/src/sectionToExecute.cc
r401 r419 18 18 software = s; 19 19 } 20 -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r418 r419 104 104 105 105 106 abstractSoftware* soft = NULL; 107 dtmanage_->addSectionToExecute(premierElement,premierIndex, dernierElement, dernierIndex, soft); 106 // abstractSoftware* soft = NULL; 107 // dtmanage_->addSectionToExecute(premierElement,premierIndex, dernierElement, dernierIndex, soft); 108 dtmanage_->addSectionToExecute(premierElement,premierIndex, dernierElement, dernierIndex, nomDeLogiciel()); 108 109 109 110 std::string premierElementLabel = ""; … … 340 341 341 342 nomDeLogiciel prog = nomDeLogiciel ( sections_[a]->getSoftwareCurrentText().toUTF8()); 342 abstractSoftware* softToExec = dtmanage_->createSoftwareConnexion(prog);343 dtmanage_->addSectionToExecute(pspa_->getBeamLine()->getAbstractElement(debut),343 // abstractSoftware* softToExec = dtmanage_->createSoftwareConnexion(prog); 344 sectionToExecute* sectToExec = dtmanage_->addSectionToExecute(pspa_->getBeamLine()->getAbstractElement(debut), 344 345 debut, 345 346 pspa_->getBeamLine()->getAbstractElement(fin), 346 347 fin, 347 softToExec); 348 348 prog); 349 350 abstractSoftware* softToExec = sectToExec->getSoftware(); 349 351 diagnosticErrors = ""; 350 352 diagnosticWarnings = "";
Note: See TracChangeset
for help on using the changeset viewer.