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

Last change on this file since 418 was 418, checked in by lemeur, 11 years ago

definition des compatibilites des elements dans les software

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