Last change
on this file since 496 was
469,
checked in by garnier, 11 years ago
|
Désormais il est de nouveau possible d'ajouter des sections et dy affecter des softwares (ne marche pour le moment quavec la 1ere sectionToExecute. Autres améliorations et renommages
|
File size:
1.4 KB
|
Rev | Line | |
---|
[106] | 1 | |
---|
| 2 | #include <iostream> |
---|
[360] | 3 | #include <algorithm> // std::find |
---|
| 4 | |
---|
[106] | 5 | #include "abstractElement.h" |
---|
| 6 | |
---|
[469] | 7 | abstractElement::abstractElement() |
---|
[106] | 8 | { |
---|
| 9 | setDefaultValues(); |
---|
| 10 | setDefaults(); |
---|
| 11 | stepmaxcm_ = 1000000; |
---|
| 12 | } |
---|
| 13 | |
---|
[469] | 14 | abstractElement::abstractElement(string lab) |
---|
[106] | 15 | { |
---|
[418] | 16 | specificName_ = lab; |
---|
[106] | 17 | setDefaultValues(); |
---|
| 18 | setDefaults(); |
---|
| 19 | stepmaxcm_ = 1000000; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | abstractElement::~abstractElement() |
---|
| 23 | { |
---|
| 24 | if (parametersString_ != NULL) delete [] parametersString_ ; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | void abstractElement::setDefaultValues() |
---|
| 28 | { |
---|
[418] | 29 | defaultSpecificName_ = string("XXXXXX"); |
---|
[106] | 30 | defaultLength_ = 0.0; |
---|
| 31 | defaultAperture_ = 1.e+6; |
---|
| 32 | phaseStepMax_ = 10.; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | void abstractElement::setDefaults() |
---|
| 36 | { |
---|
[418] | 37 | specificName_ = defaultSpecificName_; |
---|
[114] | 38 | nbParam_ = 2; |
---|
[106] | 39 | lenghtElem_ = defaultLength_; |
---|
| 40 | aperture_ = defaultAperture_; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | void abstractElement::setPhaseStep(double) { |
---|
| 44 | cout << " setPhaseStep : ce n'est pas celui la qu'il faut ! " ; |
---|
| 45 | return; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | void abstractElement::setParameters(double ll, double aper) |
---|
| 49 | { |
---|
| 50 | lenghtElem_ = ll; |
---|
| 51 | aperture_ = aper; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | void abstractElement::setLabel(string lab) |
---|
| 55 | { |
---|
[418] | 56 | specificName_= lab; |
---|
[106] | 57 | } |
---|
| 58 | |
---|
[431] | 59 | string abstractElement::getLabel() const { |
---|
[418] | 60 | return specificName_; |
---|
[106] | 61 | } |
---|
| 62 | |
---|
[431] | 63 | nomdElements abstractElement::getNomdElement() const { |
---|
[106] | 64 | return elementName_; |
---|
| 65 | } |
---|
| 66 | |
---|
| 67 | double abstractElement::getLenghtOfElement() const { |
---|
| 68 | return lenghtElem_; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | int abstractElement::getNbParams() const { |
---|
| 72 | return nbParam_; |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | double abstractElement::getInitialKineticEnergy() const { |
---|
| 76 | return 0.0; |
---|
| 77 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.