[41] | 1 | #ifndef ABSTRACTELEMENTDEFINITION_SEEN |
---|
| 2 | #define ABSTRACTELEMENTDEFINITION_SEEN |
---|
| 3 | |
---|
[131] | 4 | #include <cstdlib> |
---|
[107] | 5 | #include <fstream> |
---|
[41] | 6 | #include <string> |
---|
| 7 | |
---|
| 8 | #include "nomdElements.h" |
---|
[418] | 9 | //#include "nomDeLogiciel.h" |
---|
| 10 | //#include "trivaluedBool.h" |
---|
[359] | 11 | #include "abstractSoftware.h" |
---|
[418] | 12 | /* #include "softwareGenerator.h" */ |
---|
| 13 | /* #include "softwareParmela.h" */ |
---|
| 14 | /* #include "softwareTest.h" */ |
---|
| 15 | /* #include "softwareTransport.h" */ |
---|
[41] | 16 | |
---|
| 17 | using namespace std; |
---|
| 18 | |
---|
| 19 | class abstractElement |
---|
| 20 | { |
---|
[287] | 21 | protected : |
---|
| 22 | |
---|
| 23 | int nbParam_; |
---|
| 24 | string* parametersString_; |
---|
| 25 | double phaseStepMax_; |
---|
| 26 | |
---|
| 27 | double defaultLength_; |
---|
| 28 | double defaultAperture_; |
---|
[418] | 29 | string defaultSpecificName_; |
---|
[287] | 30 | |
---|
[418] | 31 | string specificName_; |
---|
[287] | 32 | nomdElements elementName_; |
---|
| 33 | |
---|
| 34 | double lenghtElem_; // cm |
---|
| 35 | double aperture_; // cm |
---|
| 36 | |
---|
| 37 | double stepmaxcm_; |
---|
| 38 | // bool curvedTrajectory_; |
---|
| 39 | |
---|
| 40 | void setDefaultValues(); |
---|
| 41 | void setDefaults(); |
---|
| 42 | |
---|
| 43 | public : |
---|
| 44 | |
---|
| 45 | abstractElement(); |
---|
| 46 | abstractElement(string lab); |
---|
| 47 | virtual ~abstractElement(); |
---|
| 48 | |
---|
| 49 | void setParameters(double ll,double aper); |
---|
| 50 | void setLabel(string lab); |
---|
| 51 | string getLabel() const; |
---|
| 52 | nomdElements getNomdElement() const; |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | double getLenghtOfElement() const; |
---|
| 56 | int getNbParams() const; |
---|
[359] | 57 | |
---|
| 58 | |
---|
[287] | 59 | virtual void setPhaseStep(double); |
---|
| 60 | virtual double getInitialKineticEnergy() const; |
---|
| 61 | |
---|
| 62 | virtual void setParametersString(string* param) = 0; |
---|
| 63 | virtual string* getParametersString() const = 0; |
---|
| 64 | virtual string FileOutputFlow() const = 0; |
---|
[418] | 65 | virtual vector< pair<string, vector<string> > > parametersToSoftware () const =0; |
---|
[287] | 66 | virtual void FileInput(ifstream& ifs) = 0; |
---|
| 67 | virtual string print() = 0; |
---|
[359] | 68 | |
---|
| 69 | /** Return the abstractSofware associated with this element |
---|
| 70 | */ |
---|
| 71 | inline abstractSoftware* getAbstractSoftware() { |
---|
| 72 | return abstractSoftware_; |
---|
| 73 | } |
---|
[418] | 74 | |
---|
| 75 | |
---|
[359] | 76 | |
---|
| 77 | /** |
---|
| 78 | Set the software to this element |
---|
[418] | 79 | @param abstractSoftware a pointer to the abstract software |
---|
[359] | 80 | */ |
---|
[418] | 81 | inline void setSoftware(abstractSoftware* prog) { abstractSoftware_ = prog; } |
---|
| 82 | |
---|
[359] | 83 | |
---|
[418] | 84 | |
---|
[359] | 85 | private : |
---|
| 86 | |
---|
[418] | 87 | abstractSoftware *abstractSoftware_; |
---|
| 88 | |
---|
[41] | 89 | }; |
---|
| 90 | #endif |
---|