#ifndef ABSTRACTSOFTWARE_SEEN #define ABSTRACTSOFTWARE_SEEN #include "globalParameters.h" #include "sectorParameters.h" #include "particleBeam.h" #include "nomDeLogiciel.h" #include "nomdElements.h" #include "trivaluedBool.h" #include #include using namespace std; class dataManager; class abstractSoftware { protected : unsigned numeroDeb_, numeroFin_; globalParameters* globParamPtr_; sectorParameters* sectParamPtr_; //xx dataManager* dataManager_; string inputFileName_; nomDeLogiciel nameOfSoftware_; /** Accepted elements list for this software */ std::vector acceptedElements_; /** Ignore software list for this element */ std::vector ignoredElements_; abstractSoftware(); bool launchJob(string commandLine, string& resul); bool initComputationLimits(unsigned int numeroDeb,unsigned int numeroFin); bool ComputationLimitsOk() const; void registerElement(nomdElements::typedElement nomdel,trivaluedBool b); public : abstractSoftware(string,globalParameters*,dataManager*); abstractSoftware(string,sectorParameters*,dataManager*); ~abstractSoftware() {;} inline const nomDeLogiciel* getNomDeLogiciel() const { return &nameOfSoftware_; } trivaluedBool doAcceptElement(nomdElements::typedElement typdel); virtual bool createInputFile(particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir) = 0; virtual bool execute(string workingDir) = 0; virtual bool buildBeamAfterElements(string workingDir) = 0; /** Color of the background of this sofware Should be a valid Css name as FFEEDD */ virtual string getColor() = 0; /** Name of this software */ inline string getName() const { return nameOfSoftware_.getString(); } }; #endif