source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h @ 431

Last change on this file since 431 was 431, checked in by touze, 11 years ago

systeme periodique (mailles) + multipoles + madx

File size: 1.8 KB
Line 
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 "abstractSoftware.h"
10
11#include "UAP/UAPNode.hpp"
12using namespace std;
13
14class abstractElement
15{
16
17 protected :
18 
19  int nbParam_;
20  string* parametersString_;
21 
22  string defaultSpecificName_;
23  string specificName_;
24  nomdElements elementName_;
25   
26  double defaultLength_;
27  double defaultAperture_;
28  double phaseStepMax_;
29 
30  double lenghtElem_; // cm
31  double aperture_; // cm
32  double stepmaxcm_;
33 
34  void setDefaultValues();
35  void setDefaults();
36 
37 public :
38 
39  abstractElement();
40  abstractElement(string lab);
41  virtual ~abstractElement();
42 
43  void setParameters(double ll,double aper);
44 
45  nomdElements getNomdElement() const;
46  int getNbParams() const;
47
48  void setLabel(string lab);
49  string getLabel() const;
50
51  double getLenghtOfElement() const;
52 
53  virtual void setPhaseStep(double);
54  virtual double getInitialKineticEnergy() const;
55   
56  virtual void setParametersString(string* param) = 0;
57  virtual string* getParametersString() const = 0;
58  virtual string FileOutputFlow() const = 0;
59  virtual vector< pair<string, vector<string> > > parametersToSoftware () const =0;
60  virtual void FileInput(ifstream& ifs) = 0;
61  virtual string print() = 0;
62  virtual void InputRep(UAPNode* root) = 0;
63
64  /* Return the abstractSofware associated with this element
65   */
66  inline abstractSoftware* getAbstractSoftware() {
67    return abstractSoftware_;
68  }
69 
70  /* Set the software to this element
71     @param abstractSoftware a pointer to the abstract software
72  */
73  inline void setSoftware(abstractSoftware* prog) { 
74    abstractSoftware_ = prog; 
75  }
76 
77 private :
78
79  abstractSoftware *abstractSoftware_;
80 
81};
82#endif
Note: See TracBrowser for help on using the repository browser.