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

Last change on this file since 359 was 359, checked in by garnier, 11 years ago

Changement de la couleur des sections selectionnes + plein dautres choses

File size: 2.7 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 phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep)
26    double phaseStepMax_;
27   
28    double defaultLength_;
29    double defaultAperture_;
30    string defaultLabel_;
31   
32    string label_;
33    nomdElements elementName_;
34   
35    double lenghtElem_; // cm
36    double aperture_; // cm
37   
38    double stepmaxcm_;
39    //  bool curvedTrajectory_;
40   
41    void setDefaultValues();
42    void setDefaults();
43   
44    public :
45   
46    abstractElement();
47    abstractElement(string lab);
48    virtual ~abstractElement();
49   
50    void setParameters(double ll,double aper);
51    void setLabel(string lab);
52    string getLabel() const;
53    //  typedElement getName() const;
54    nomdElements getNomdElement() const;
55   
56    /* string getElementImage() const; */
57    /* string getElementName() const; */
58   
59    double getLenghtOfElement() const;
60    int getNbParams() const;
61
62    trivaluedBool is_accepted_by_software(nomDeLogiciel soft);
63   
64    virtual void setPhaseStep(double);
65    virtual double getInitialKineticEnergy() const;
66   
67    virtual void setParametersString(string* param) = 0;
68    virtual string* getParametersString() const = 0;
69    virtual string parmelaOutputFlow() const = 0;
70    virtual string transportOutputFlow() const = 0;
71    virtual string generatorOutputFlow() const;
72    virtual string FileOutputFlow() const = 0;
73    virtual void FileInput(ifstream& ifs) = 0;
74    virtual string print() = 0;
75
76    /** Return the abstractSofware associated with this element
77     */
78    inline abstractSoftware* getAbstractSoftware() {
79        return abstractSoftware_;
80    }
81   
82   
83    void registerAcceptableSoftware(nomDeLogiciel abs,trivaluedBool b);
84    /**
85     Set the software to this element
86     @param abstractName the name of the abstract software
87     @return trivaluedBool if this software is/not allowed/ignore on this component
88     */
89    trivaluedBool setSoftware(nomDeLogiciel abstractName);
90   
91    private :
92    abstractSoftware *abstractSoftware_;
93
94    /**
95     Acceptable software list for this element
96     */
97    std::vector <nomDeLogiciel> acceptableSoftware_;
98
99    /**
100     Ignore software list for this element
101     */
102    std::vector <nomDeLogiciel> ignoreSoftware_;
103};
104#endif
Note: See TracBrowser for help on using the repository browser.