Changeset 469 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/sectionToExecute.cc
- Timestamp:
- Dec 19, 2013, 3:53:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/sectionToExecute.cc
r455 r469 1 1 #include "sectionToExecute.h" 2 3 4 sectionToExecute::sectionToExecute(abstractElement* a) { 5 elements_.push_back(a); 6 } 2 #include "softwareUnknown.h" 3 #include "softwareParmela.h" 4 #include "softwareTransport.h" 5 #include "softwareGenerator.h" 6 #include "softwareGenerator.h" 7 #include "softwareUsersprogram.h" 8 #include "softwareTest.h" 9 #include "softwareMadx.h" //xx 7 10 8 11 9 12 sectionToExecute::sectionToExecute(abstractElement* f, abstractSoftware* s) { 10 13 elements_.push_back(f); 14 if (s == NULL) { 15 software_ = new softwareUnknown(); 16 } else { 11 17 software_ = s; 18 } 12 19 } 13 20 … … 25 32 } 26 33 27 /* 28 bool sectionToExecute::setSoftware(nomDeLogiciel logiciel) { 29 30 if (sectionToExecuteNumber >= sectionToExecute_.size()) { 31 return false; 34 35 void sectionToExecute::setSoftware(std::string logiciel) { 36 37 abstractSoftware* prog; 38 string inputFileName; 39 if(logiciel == "parmela") { 40 inputFileName = "parmin"; 41 prog = new softwareParmela(inputFileName, this); 42 } else if (logiciel == "transport") { 43 inputFileName = "transport.input"; 44 prog = new softwareTransport(inputFileName, this); 45 } else if (logiciel == "generator") { 46 inputFileName = "generator.in"; 47 prog = new softwareGenerator(inputFileName, this); 48 } else if (logiciel == "madx") { 49 inputFileName = "madx.input"; 50 prog = new softwareMadx(inputFileName,this); 51 } else if (logiciel == "usersprogram") { 52 inputFileName = "dummy"; 53 prog = new softwareUsersprogram(inputFileName, this); 54 } else if (logiciel == "test") { 55 prog = new softwareTest(inputFileName, this); 56 } else { 57 prog = new softwareUnknown(); 32 58 } 33 59 34 abstractSoftware* prog; 35 string inputFileName; 36 if(logiciel == nomDeLogiciel::parmela) { 37 inputFileName = "parmin"; 38 prog = new softwareParmela(inputFileName, this); 39 } else if (logiciel == nomDeLogiciel::transport) { 40 inputFileName = "transport.input"; 41 prog = new softwareTransport(inputFileName, this); 42 } else if (logiciel == nomDeLogiciel::generator) { 43 inputFileName = "generator.in"; 44 prog = new softwareGenerator(inputFileName, this); 45 } else if (logiciel == nomDeLogiciel::madx) { 46 inputFileName = "madx.input"; 47 prog = new softwareMadx(inputFileName,this); 48 } else if (logiciel == nomDeLogiciel::usersprogram) { 49 inputFileName = "dummy"; 50 prog = new softwareUsersprogram(inputFileName, this); 51 } else if (logiciel == nomDeLogiciel::test) { 52 prog = new softwareTest(inputFileName, this); 53 } else { 54 prog = new softwareUnknown(); // xx 55 } 56 57 sectionToExecute_[sectionToExecuteNumber]->setSoftware(prog); 58 return true; 60 setSoftware(prog); 59 61 } 60 */ 62
Note: See TracChangeset
for help on using the changeset viewer.