1 | #ifndef ABSTRACTELEMENTDEFINITION_SEEN |
---|
2 | #define ABSTRACTELEMENTDEFINITION_SEEN |
---|
3 | |
---|
4 | #include <cstdlib> |
---|
5 | #include <fstream> |
---|
6 | #include <string> |
---|
7 | |
---|
8 | #include "nomdElements.h" |
---|
9 | #include "nomDeLogiciel.h" |
---|
10 | #include "trivaluedBool.h" |
---|
11 | |
---|
12 | using namespace std; |
---|
13 | |
---|
14 | class abstractElement |
---|
15 | { |
---|
16 | protected : |
---|
17 | |
---|
18 | /* bool parmelaOk_; */ |
---|
19 | /* bool parmelaIgnored_; */ |
---|
20 | /* bool transportOk_; */ |
---|
21 | int nbParam_; |
---|
22 | string* parametersString_; |
---|
23 | // double phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep) |
---|
24 | double phaseStepMax_; |
---|
25 | |
---|
26 | double defaultLength_; |
---|
27 | double defaultAperture_; |
---|
28 | |
---|
29 | string label_; |
---|
30 | nomdElements elementName_; |
---|
31 | |
---|
32 | double lenghtElem_; // cm |
---|
33 | double aperture_; // cm |
---|
34 | |
---|
35 | double stepmaxcm_; |
---|
36 | // bool curvedTrajectory_; |
---|
37 | |
---|
38 | void setDefaultValues(); |
---|
39 | void setDefaults(); |
---|
40 | |
---|
41 | public : |
---|
42 | |
---|
43 | abstractElement(); |
---|
44 | abstractElement(string lab); |
---|
45 | virtual ~abstractElement(); |
---|
46 | |
---|
47 | void setParameters(double ll,double aper); |
---|
48 | void setLabel(string lab); |
---|
49 | string getLabel() const; |
---|
50 | // typedElement getName() const; |
---|
51 | nomdElements getNomdElement() const; |
---|
52 | |
---|
53 | /* string getElementImage() const; */ |
---|
54 | /* string getElementName() const; */ |
---|
55 | |
---|
56 | double getLenghtOfElement() const; |
---|
57 | int getNbParams() const; |
---|
58 | /* bool is_parmela_ignored() const; */ |
---|
59 | /* bool is_parmela_element() const; */ |
---|
60 | /* bool is_transport_element() const; */ |
---|
61 | virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const; |
---|
62 | virtual void setPhaseStep(double); |
---|
63 | virtual double getInitialKineticEnergy() const; |
---|
64 | |
---|
65 | virtual void setParametersString(string* param) = 0; |
---|
66 | virtual string* getParametersString() const = 0; |
---|
67 | virtual string parmelaOutputFlow() const = 0; |
---|
68 | virtual string transportOutputFlow() const = 0; |
---|
69 | virtual string FileOutputFlow() const = 0; |
---|
70 | virtual void FileInput(ifstream& ifs) = 0; |
---|
71 | }; |
---|
72 | #endif |
---|