Ignore:
Timestamp:
Sep 30, 2013, 5:03:21 PM (11 years ago)
Author:
touze
Message:

sauvgarde de la configuration sur fichier format AML

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h

    r418 r424  
    1515/* #include "softwareTransport.h" */
    1616
     17#include "UAP/UAPNode.hpp"
     18
    1719using namespace std;
    1820
    1921class abstractElement
    2022{
    21     protected :
     23
     24 protected :
     25 
     26  int nbParam_;
     27  string* parametersString_;
     28  double phaseStepMax_;
    2229   
    23     int nbParam_;
    24     string* parametersString_;
    25     double phaseStepMax_;
     30  double defaultLength_;
     31  double defaultAperture_;
     32  string defaultSpecificName_;
     33 
     34  string specificName_;
     35  nomdElements elementName_;
     36 
     37  double lenghtElem_; // cm
     38  double aperture_; // cm
     39 
     40  double stepmaxcm_;
     41  //  bool curvedTrajectory_;
     42 
     43  void setDefaultValues();
     44  void setDefaults();
     45 
     46 public :
     47 
     48  abstractElement();
     49  abstractElement(string lab);
     50  virtual ~abstractElement();
     51 
     52  void setParameters(double ll,double aper);
     53  void setLabel(string lab);
     54  string getLabel() const;
     55  nomdElements getNomdElement() const;
     56 
     57  double getLenghtOfElement() const;
     58  int getNbParams() const;
     59 
     60  virtual void setPhaseStep(double);
     61  virtual double getInitialKineticEnergy() const;
    2662   
    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;
     63  virtual void setParametersString(string* param) = 0;
     64  virtual string* getParametersString() const = 0;
     65  virtual string FileOutputFlow() const = 0;
     66  virtual vector< pair<string, vector<string> > > parametersToSoftware () const =0;
     67  virtual void FileInput(ifstream& ifs) = 0;
     68  virtual string print() = 0;
     69 
     70  virtual void InputRep(UAPNode* root) = 0;
    5771
    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;
     72  /* Return the abstractSofware associated with this element
     73   */
     74  inline abstractSoftware* getAbstractSoftware() {
     75    return abstractSoftware_;
     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) {
     82    abstractSoftware_ = prog;
     83  }
     84 
     85 private :
    6886
    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    
     87  abstractSoftware *abstractSoftware_;
     88 
    8989};
    9090#endif
Note: See TracChangeset for help on using the changeset viewer.