[289] | 1 | // |
---|
| 2 | // GWt_abstractElementFactory.h |
---|
| 3 | // PSPA |
---|
| 4 | // |
---|
| 5 | // Created by Garnier Laurent on 28/01/13. |
---|
| 6 | // Copyright (c) 2013 Garnier Laurent. All rights reserved. |
---|
| 7 | // |
---|
| 8 | |
---|
| 9 | #ifndef PSPA_GWt_abstractElementFactory_h |
---|
| 10 | #define PSPA_GWt_abstractElementFactory_h |
---|
| 11 | |
---|
| 12 | #include "GWt_rfgun.h" |
---|
| 13 | #include "GWt_drift.h" |
---|
| 14 | #include "GWt_cell.h" |
---|
| 15 | #include "GWt_bend.h" |
---|
| 16 | #include "GWt_soleno.h" |
---|
| 17 | #include "GWt_beam.h" |
---|
| 18 | #include "GWt_fit.h" |
---|
[343] | 19 | #include "GWt_snapshot.h" |
---|
[289] | 20 | |
---|
| 21 | using namespace Wt; |
---|
| 22 | using namespace std; |
---|
| 23 | |
---|
[343] | 24 | class GWt_abstractElementFactory |
---|
| 25 | { |
---|
[289] | 26 | |
---|
[343] | 27 | public : |
---|
| 28 | |
---|
| 29 | GWt_abstractElementFactory(); |
---|
| 30 | ~GWt_abstractElementFactory(); |
---|
| 31 | |
---|
| 32 | /* Enable the rfgun element creation |
---|
| 33 | */ |
---|
| 34 | inline void setRFGunEnable(bool a) { isRFGunElementEnable = a;}; |
---|
| 35 | |
---|
| 36 | /* Enable the drift element creation |
---|
| 37 | */ |
---|
| 38 | inline void setDriftEnable(bool a) { isDriftElementEnable = a;}; |
---|
| 39 | |
---|
| 40 | /* Enable the cell element creation |
---|
| 41 | */ |
---|
| 42 | inline void setCellEnable(bool a) { isCellElementEnable = a;}; |
---|
| 43 | |
---|
| 44 | /* Enable the bend element creation |
---|
| 45 | */ |
---|
| 46 | inline void setBendEnable(bool a) { isBendElementEnable = a;}; |
---|
| 47 | |
---|
| 48 | /* Enable the soleno element creation |
---|
| 49 | */ |
---|
| 50 | inline void setSolenoEnable(bool a) { isSolenoElementEnable = a;}; |
---|
| 51 | |
---|
| 52 | /* Enable the beam element creation |
---|
| 53 | */ |
---|
| 54 | inline void setBeamEnable(bool a) { isBeamElementEnable = a;}; |
---|
| 55 | |
---|
| 56 | /* Enable the fit element creation |
---|
| 57 | */ |
---|
| 58 | inline void setFitEnable(bool a) { isFitElementEnable = a;}; |
---|
| 59 | |
---|
| 60 | /* Enable the snapshot element creation |
---|
| 61 | */ |
---|
| 62 | inline void setSnapshotEnable(bool a) { isSnapshotElementEnable = a;}; |
---|
| 63 | |
---|
| 64 | GWt_drift* createDriftElement(); |
---|
| 65 | GWt_rfgun* createRFGunElement(); |
---|
| 66 | GWt_cell* createCellElement(); |
---|
| 67 | GWt_bend* createBendElement(); |
---|
| 68 | GWt_soleno* createSolenoElement(); |
---|
| 69 | GWt_beam* createBeamElement(); |
---|
| 70 | GWt_fit* createFitElement(); |
---|
| 71 | GWt_snapshot* createSnapshotElement(); |
---|
| 72 | vector <GWt_abstractElement*> getAllElements(); |
---|
| 73 | |
---|
| 74 | private : |
---|
[289] | 75 | |
---|
[343] | 76 | bool isDriftElementEnable; |
---|
| 77 | bool isRFGunElementEnable; |
---|
| 78 | bool isCellElementEnable; |
---|
| 79 | bool isBendElementEnable; |
---|
| 80 | bool isSolenoElementEnable; |
---|
| 81 | bool isBeamElementEnable; |
---|
| 82 | bool isFitElementEnable; |
---|
| 83 | bool isSnapshotElementEnable; |
---|
[289] | 84 | }; |
---|
| 85 | #endif |
---|