#ifndef ABSTRACTELEMENTDEFINITION_SEEN #define ABSTRACTELEMENTDEFINITION_SEEN #include #include #include #include "nomdElements.h" //#include "nomDeLogiciel.h" //#include "trivaluedBool.h" #include "abstractSoftware.h" /* #include "softwareGenerator.h" */ /* #include "softwareParmela.h" */ /* #include "softwareTest.h" */ /* #include "softwareTransport.h" */ using namespace std; class abstractElement { protected : int nbParam_; string* parametersString_; double phaseStepMax_; double defaultLength_; double defaultAperture_; string defaultSpecificName_; string specificName_; nomdElements elementName_; double lenghtElem_; // cm double aperture_; // cm double stepmaxcm_; // bool curvedTrajectory_; void setDefaultValues(); void setDefaults(); public : abstractElement(); abstractElement(string lab); virtual ~abstractElement(); void setParameters(double ll,double aper); void setLabel(string lab); string getLabel() const; nomdElements getNomdElement() const; double getLenghtOfElement() const; int getNbParams() const; virtual void setPhaseStep(double); virtual double getInitialKineticEnergy() const; virtual void setParametersString(string* param) = 0; virtual string* getParametersString() const = 0; virtual string FileOutputFlow() const = 0; virtual vector< pair > > parametersToSoftware () const =0; virtual void FileInput(ifstream& ifs) = 0; virtual string print() = 0; /** Return the abstractSofware associated with this element */ inline abstractSoftware* getAbstractSoftware() { return abstractSoftware_; } /** Set the software to this element @param abstractSoftware a pointer to the abstract software */ inline void setSoftware(abstractSoftware* prog) { abstractSoftware_ = prog; } private : abstractSoftware *abstractSoftware_; }; #endif