#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 phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep) double phaseStepMax_; double defaultLength_; double defaultAperture_; string defaultLabel_; string label_; 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; // typedElement getName() const; nomdElements getNomdElement() const; /* string getElementImage() const; */ /* string getElementName() const; */ double getLenghtOfElement() const; int getNbParams() const; trivaluedBool is_accepted_by_software(nomDeLogiciel soft); virtual void setPhaseStep(double); virtual double getInitialKineticEnergy() const; virtual void setParametersString(string* param) = 0; virtual string* getParametersString() const = 0; virtual string parmelaOutputFlow() const = 0; virtual string transportOutputFlow() const = 0; virtual string generatorOutputFlow() const; virtual string FileOutputFlow() const = 0; virtual void FileInput(ifstream& ifs) = 0; virtual string print() = 0; /** Return the abstractSofware associated with this element */ inline abstractSoftware* getAbstractSoftware() { return abstractSoftware_; } void registerAcceptableSoftware(nomDeLogiciel abs,trivaluedBool b); /** Set the software to this element @param abstractName the name of the abstract software @return trivaluedBool if this software is/not allowed/ignore on this component */ trivaluedBool setSoftware(nomDeLogiciel abstractName); private : abstractSoftware *abstractSoftware_; /** Acceptable software list for this element */ std::vector acceptableSoftware_; /** Ignore software list for this element */ std::vector ignoreSoftware_; }; #endif