Last change
on this file since 304 was
304,
checked in by lemeur, 11 years ago
|
introduction du logiciel 'generator' (debut)
|
File size:
1.6 KB
|
Line | |
---|
1 | |
---|
2 | #include <iostream> |
---|
3 | #include "abstractElement.h" |
---|
4 | |
---|
5 | abstractElement::abstractElement() |
---|
6 | { |
---|
7 | setDefaultValues(); |
---|
8 | setDefaults(); |
---|
9 | stepmaxcm_ = 1000000; |
---|
10 | } |
---|
11 | |
---|
12 | abstractElement::abstractElement(string lab) |
---|
13 | { |
---|
14 | label_ = lab; |
---|
15 | setDefaultValues(); |
---|
16 | setDefaults(); |
---|
17 | stepmaxcm_ = 1000000; |
---|
18 | } |
---|
19 | |
---|
20 | abstractElement::~abstractElement() |
---|
21 | { |
---|
22 | if (parametersString_ != NULL) delete [] parametersString_ ; |
---|
23 | } |
---|
24 | |
---|
25 | void abstractElement::setDefaultValues() |
---|
26 | { |
---|
27 | defaultLabel_ = string("XXXXXX"); |
---|
28 | defaultLength_ = 0.0; |
---|
29 | defaultAperture_ = 1.e+6; |
---|
30 | phaseStepMax_ = 10.; |
---|
31 | } |
---|
32 | |
---|
33 | void abstractElement::setDefaults() |
---|
34 | { |
---|
35 | label_ = defaultLabel_; |
---|
36 | nbParam_ = 2; |
---|
37 | lenghtElem_ = defaultLength_; |
---|
38 | aperture_ = defaultAperture_; |
---|
39 | } |
---|
40 | |
---|
41 | void abstractElement::setPhaseStep(double) { |
---|
42 | cout << " setPhaseStep : ce n'est pas celui la qu'il faut ! " ; |
---|
43 | return; |
---|
44 | } |
---|
45 | |
---|
46 | void abstractElement::setParameters(double ll, double aper) |
---|
47 | { |
---|
48 | lenghtElem_ = ll; |
---|
49 | aperture_ = aper; |
---|
50 | } |
---|
51 | |
---|
52 | void abstractElement::setLabel(string lab) |
---|
53 | { |
---|
54 | label_= lab; |
---|
55 | } |
---|
56 | |
---|
57 | string abstractElement::getLabel() const |
---|
58 | { |
---|
59 | return label_; |
---|
60 | } |
---|
61 | |
---|
62 | |
---|
63 | nomdElements abstractElement::getNomdElement() const |
---|
64 | { |
---|
65 | return elementName_; |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | double abstractElement::getLenghtOfElement() const { |
---|
71 | return lenghtElem_; |
---|
72 | } |
---|
73 | |
---|
74 | int abstractElement::getNbParams() const { |
---|
75 | return nbParam_; |
---|
76 | } |
---|
77 | |
---|
78 | trivaluedBool abstractElement::is_accepted_by_software(nomDeLogiciel soft) const { |
---|
79 | cout << " abstractElement : generic method is_accepted_by_software() " << endl; |
---|
80 | return error; |
---|
81 | } |
---|
82 | |
---|
83 | |
---|
84 | double abstractElement::getInitialKineticEnergy() const { |
---|
85 | return 0.0; |
---|
86 | } |
---|
87 | |
---|
88 | |
---|
89 | string abstractElement::generatorOutputFlow() const { |
---|
90 | return ""; |
---|
91 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.