[295] | 1 | #ifndef ABSTRACTSOFTWARE_SEEN |
---|
| 2 | #define ABSTRACTSOFTWARE_SEEN |
---|
| 3 | |
---|
| 4 | #include "globalParameters.h" |
---|
[431] | 5 | #include "sectorParameters.h" |
---|
[295] | 6 | #include "particleBeam.h" |
---|
[386] | 7 | #include "nomDeLogiciel.h" |
---|
[418] | 8 | #include "nomdElements.h" |
---|
| 9 | #include "trivaluedBool.h" |
---|
| 10 | |
---|
[295] | 11 | #include <iostream> |
---|
| 12 | #include <string> |
---|
| 13 | |
---|
| 14 | using namespace std; |
---|
| 15 | |
---|
[305] | 16 | class dataManager; |
---|
[455] | 17 | class sectionToExecute; |
---|
[493] | 18 | class computingBlock; |
---|
[295] | 19 | class abstractSoftware |
---|
| 20 | { |
---|
| 21 | |
---|
| 22 | protected : |
---|
[431] | 23 | |
---|
[305] | 24 | dataManager* dataManager_; |
---|
[316] | 25 | string inputFileName_; |
---|
[485] | 26 | nomDeLogiciel* nameOfSoftware_; |
---|
[418] | 27 | |
---|
[431] | 28 | /** |
---|
[418] | 29 | Accepted elements list for this software |
---|
[431] | 30 | */ |
---|
[485] | 31 | // std::vector <nomdElements::typedElement> acceptedElements_; |
---|
[418] | 32 | |
---|
[431] | 33 | /** |
---|
[418] | 34 | Ignore software list for this element |
---|
[431] | 35 | */ |
---|
[485] | 36 | // std::vector <nomdElements::typedElement> ignoredElements_; |
---|
[431] | 37 | |
---|
[295] | 38 | abstractSoftware(); |
---|
| 39 | |
---|
| 40 | bool launchJob(string commandLine, string& resul); |
---|
[418] | 41 | |
---|
[485] | 42 | // void registerElement(nomdElements::typedElement nomdel,trivaluedBool b); |
---|
[418] | 43 | |
---|
[493] | 44 | /* sectionToExecute* getSectionToExecute() { */ |
---|
| 45 | /* return sectionToExecute_; */ |
---|
| 46 | /* } */ |
---|
| 47 | |
---|
| 48 | computingBlock* getComputingBlock() { |
---|
| 49 | return compBlock_;; |
---|
[455] | 50 | } |
---|
[295] | 51 | |
---|
[455] | 52 | public : |
---|
| 53 | |
---|
[493] | 54 | // abstractSoftware(string, sectionToExecute*, dataManager* ); |
---|
| 55 | abstractSoftware(string, computingBlock*, dataManager* ); |
---|
| 56 | |
---|
[485] | 57 | ~abstractSoftware() { |
---|
| 58 | delete nameOfSoftware_; |
---|
| 59 | } |
---|
[295] | 60 | |
---|
[418] | 61 | inline const nomDeLogiciel* getNomDeLogiciel() const { |
---|
[485] | 62 | return nameOfSoftware_; |
---|
[431] | 63 | } |
---|
[386] | 64 | |
---|
[485] | 65 | // trivaluedBool doAcceptElement(nomdElements::typedElement typdel); |
---|
[418] | 66 | |
---|
[455] | 67 | virtual bool createInputFile(particleBeam* beamBefore, string workingDir) = 0; |
---|
[431] | 68 | virtual bool execute(string workingDir) = 0; |
---|
| 69 | virtual bool buildBeamAfterElements(string workingDir) = 0; |
---|
[295] | 70 | |
---|
[431] | 71 | /** Color of the background of this sofware |
---|
| 72 | Should be a valid Css name as FFEEDD |
---|
| 73 | */ |
---|
| 74 | virtual string getColor() = 0; |
---|
| 75 | |
---|
| 76 | /** Name of this software |
---|
| 77 | */ |
---|
| 78 | inline string getName() const { |
---|
[485] | 79 | return nameOfSoftware_->getString(); |
---|
[431] | 80 | } |
---|
[455] | 81 | private : |
---|
[493] | 82 | // sectionToExecute* sectionToExecute_; |
---|
| 83 | computingBlock* compBlock_; |
---|
[295] | 84 | }; |
---|
| 85 | #endif |
---|