Changeset 107 in PSPA for Interface_Web/trunk/pspaWT/include
- Timestamp:
- Nov 23, 2012, 3:45:44 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT/include
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/include/GWt_abstractElement.h
r83 r107 4 4 #include "GWt_pspaApplication.h" 5 5 #include "abstractElement.h" 6 7 6 8 7 #include <Wt/WContainerWidget> … … 17 16 using namespace std; 18 17 19 20 21 18 class GWt_abstractElement : public WContainerWidget 22 19 { … … 24 21 25 22 PspaApplication* pspa_; 26 23 abstractElement* element_; 27 24 28 25 WDialog* dialog_; 29 26 WPushButton* dropped_; 27 WContainerWidget* wc_; 30 28 31 29 GWt_abstractElement() {;} 30 void setLabel(abstractElement* elem,int n); 32 31 33 32 public : 34 33 35 GWt_abstractElement(PspaApplication* ps, abstractElement* elem, string image) 36 { 37 pspa_ = ps; 38 pspa_->updateSelections(); 39 element_ = elem; 40 dropped_ = new WPushButton(); 41 dropped_->clicked().connect(this, &GWt_abstractElement::openParametersForm); 42 43 dropped_->setIcon(image); 44 dropped_->setMaximumSize(50,50); 45 } 46 47 void openParametersForm() 48 { 49 dialog_->show(); 50 } 51 52 WPushButton* getButton() { return dropped_;} 53 // WDialog* getDialog() { return dialog_;} 54 34 GWt_abstractElement(PspaApplication* ps,abstractElement* elem,string image); 35 void openParametersForm(); 36 void clicked(); 37 void doubleClicked(); 38 WPushButton* getButton(); 39 WContainerWidget* getWidget(); 55 40 virtual void dialogDone() = 0; 56 41 }; 57 58 42 #endif -
Interface_Web/trunk/pspaWT/include/GWt_bend.h
r84 r107 15 15 class GWt_bend : public GWt_abstractElement 16 16 { 17 17 static int nObjets_; 18 18 WLineEdit* angleEdit_; // deg. 19 19 WLineEdit* radiusEdit_; // m … … 27 27 public : 28 28 29 GWt_bend(PspaApplication* ps,abstractElement* elem, string image); 30 31 ~GWt_bend() {;} 32 virtual void dialogDone(); 33 29 GWt_bend(PspaApplication* ps,abstractElement* elem, string image); 30 ~GWt_bend() {;} 31 virtual void dialogDone(); 34 32 }; 35 36 33 #endif -
Interface_Web/trunk/pspaWT/include/GWt_cell.h
r84 r107 1 1 #ifndef GWT_CELL_SEEN 2 2 #define GWT_CELL_SEEN 3 4 5 3 6 4 #include "GWt_pspaApplication.h" 7 5 #include "GWt_abstractElement.h" 8 6 #include "abstractElement.h" 9 10 //#include <Wt/WContainerWidget>11 7 12 8 #include <iostream> … … 19 15 class GWt_cell : public GWt_abstractElement 20 16 { 21 17 static int nObjets_; 22 18 WLineEdit* lenghtElemEdit_; // cm 23 19 WLineEdit* apertureEdit_; // cm … … 34 30 public : 35 31 36 GWt_cell(PspaApplication* ps,abstractElement* elem, string image); 37 32 GWt_cell(PspaApplication* ps,abstractElement* elem, string image); 38 33 ~GWt_cell() {;} 39 40 41 virtual void dialogDone(); 34 virtual void dialogDone(); 42 35 }; 43 44 36 #endif -
Interface_Web/trunk/pspaWT/include/GWt_drift.h
r83 r107 3 3 4 4 #include "GWt_pspaApplication.h" 5 #include "GWt_abstractElement.h" 5 6 #include "abstractElement.h" 6 7 //#include <Wt/WContainerWidget>8 #include "GWt_abstractElement.h"9 #include <Wt/WDialog>10 #include <Wt/WPushButton>11 7 12 8 #include <iostream> … … 17 13 using namespace std; 18 14 19 20 21 15 class GWt_drift : public GWt_abstractElement 22 16 { 23 24 /* PspaApplication* pspa_; */ 25 /* abstractElement* driftElement_; */ 26 /* WDialog* dialog_; */ 27 /* WPushButton* dropped_; */ 17 static int nObjets_; 28 18 WLineEdit* xlengthEdit_; 29 19 WLineEdit* apertureEdit_; … … 33 23 public: 34 24 35 36 GWt_drift(PspaApplication* ps, abstractElement* elem, string image); 37 25 GWt_drift(PspaApplication* ps,abstractElement* elem,string image); 38 26 ~GWt_drift() {;} 39 40 /* WPushButton* getButton(); */ 41 /* WDialog* getDialog(); */ 42 /* void openDriftParametersForm(); */ 43 virtual void dialogDone(); 44 45 27 virtual void dialogDone(); 46 28 }; 47 48 49 29 #endif -
Interface_Web/trunk/pspaWT/include/GWt_initialBeam.h
r83 r107 5 5 #include "GWt_abstractElement.h" 6 6 #include "abstractElement.h" 7 8 9 //#include <Wt/WContainerWidget>10 7 11 8 #include <iostream> … … 19 16 class GWt_initialBeam : public GWt_abstractElement 20 17 { 21 /* PspaApplication* pspa_; */ 22 /* abstractElement* initialBeam_; */ 23 /* WDialog* dialog_; */ 24 /* WPushButton* dropped_; */ 25 26 18 static int nObjets_; 27 19 WLineEdit* nmacropEdit_; 28 20 WLineEdit* sigma_tEdit_; // picoseconds … … 32 24 WLineEdit* nb_true_particlesEdit_; 33 25 26 GWt_initialBeam() {;} 34 27 35 GWt_initialBeam() {;} 28 public : 36 29 37 public : 38 39 GWt_initialBeam(PspaApplication* ps,abstractElement* elem, string image); 40 ~GWt_initialBeam() {;} 41 42 /* WPushButton* getButton(); */ 43 /* WDialog* getDialog(); */ 44 /* void openParametersForm(); */ 45 virtual void dialogDone(); 46 30 GWt_initialBeam(PspaApplication* ps,abstractElement* elem, string image); 31 ~GWt_initialBeam() {;} 32 virtual void dialogDone(); 47 33 }; 48 34 #endif -
Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h
r105 r107 2 2 #define PSPA_SEEN 3 3 4 4 //#include <string> 5 5 #include <list> 6 6 … … 16 16 17 17 using namespace Wt; 18 //using namespace std; 18 19 19 20 /* … … 23 24 { 24 25 25 typedef struct 26 { 26 typedef struct { 27 27 WLineEdit* debut; 28 28 WLineEdit* fin; … … 31 31 } GWt_sectionToExecute; 32 32 33 private : 34 35 dataManager* dtmanage_; 36 37 WTextArea* console_; 38 WWidget* globalParam_; 39 WWidget* beamLine_; 40 WContainerWidget* leDessin_; 41 WPushButton *exec_go_; 42 WText* probleme_; 33 43 44 WContainerWidget* contenuSections_; 45 list<GWt_sectionToExecute*> selectedSections_; 34 46 35 private : 36 WTextArea* console_; 37 dataManager* dtmanage_; 38 WWidget* globalParam_; 39 WWidget* beamLine_; 40 WContainerWidget* leDessin_; 47 WText* createTitle(const WString&); 48 WWidget* createPalette(); 49 WWidget* createBeamLine(); 50 WWidget* createGlobalParamWidget(); 51 WWidget* createExecuteWidget(); 52 53 void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString name); 54 void executer(); 55 void sauver(); 56 void restaurer(); 57 58 void addSectionToExecuteW(); 59 void deleteSectionToExecuteW(); 60 void checkSectionSelection(); 61 void disableSectionExecute(); 62 bool areDataCoherent(); 63 void faireDessin(); 64 void faireDessinParmela(); 65 void faireDessinTransport(); 41 66 42 WContainerWidget* contenuSections_;67 public : 43 68 44 WPushButton *exec_go_; 45 46 WText* probleme_; 47 48 list<GWt_sectionToExecute*> selectedSections_; 49 50 WText* createTitle(const WString&); 51 WWidget* createPalette(); 52 WWidget* createBeamLine(); 53 WWidget* createGlobalParamWidget(); 54 WWidget* createExecuteWidget(); 55 56 void createDragImage(const char *url, const char *smallurl, 57 const char *mimeType, 58 WContainerWidget *p, 59 WString name); 60 61 62 void executer(); 63 void sauver(); 64 void restaurer(); 65 66 void addSectionToExecuteW(); 67 void deleteSectionToExecuteW(); 68 69 void checkSectionSelection(); 70 71 bool areDataCoherent(); 72 73 void disableSectionExecute(); 74 75 void faireDessin(); 76 void faireDessinParmela(); 77 void faireDessinTransport(); 78 79 80 public: 81 PspaApplication(const WEnvironment& env); 82 inline dataManager* getDataManager() const 83 { 84 return dtmanage_; 69 PspaApplication(const WEnvironment& env); 70 71 inline dataManager* getDataManager() const { 72 return dtmanage_; 73 } 74 75 inline void addConsoleMessage(WString msg) { 76 console_->setText(console_->text()+msg+"\n"); 85 77 } 86 78 87 88 inline void addConsoleMessage(WString msg) { 89 console_->setText (console_->text()+msg+"\n"); 90 } 91 92 // void addElemToGlobals(); 93 void updateSelections(); 94 79 void updateSelections(); 80 string getSelection(); 95 81 }; 96 97 82 #endif -
Interface_Web/trunk/pspaWT/include/GWt_soleno.h
r83 r107 1 1 #ifndef GWTSOLENO_SEEN 2 2 #define GWTSOLENO_SEEN 3 4 3 5 4 #include "GWt_pspaApplication.h" 6 5 #include "GWt_abstractElement.h" 7 6 #include "abstractElement.h" 8 9 #include <Wt/WContainerWidget>10 7 11 8 #include <iostream> … … 16 13 using namespace std; 17 14 18 19 15 class GWt_soleno : public GWt_abstractElement 20 16 { 21 22 // PspaApplication* pspa_; 23 // abstractElement* solenoElement_; 24 // WDialog* dialog_; 25 // WPushButton* dropped_; 17 static int nObjets_; 26 18 WLineEdit* xlengthEdit_; 27 19 WLineEdit* apertureEdit_; … … 29 21 30 22 GWt_soleno() {;} 31 23 32 24 public : 33 25 34 GWt_soleno(PspaApplication* ps, abstractElement* elem, string image); 35 36 ~GWt_soleno() {;} 37 38 39 // WPushButton* getButton(); 40 // WDialog* getDialog(); 41 // void openParametersForm(); 42 virtual void dialogDone(); 43 26 GWt_soleno(PspaApplication* ps, abstractElement* elem, string image); 27 ~GWt_soleno() {;} 28 virtual void dialogDone(); 44 29 }; 45 46 30 #endif -
Interface_Web/trunk/pspaWT/include/abstractElement.h
r105 r107 2 2 #define ABSTRACTELEMENTDEFINITION_SEEN 3 3 4 #include <iostream> 5 #include <sstream> 4 #include <fstream> 6 5 #include <string> 7 6 8 #include "mathematicalTools.h"9 7 #include "nomdElements.h" 10 8 11 9 using namespace std; 12 10 13 14 11 class abstractElement 15 12 { 16 17 protected: 18 13 protected : 14 19 15 bool parmelaOk_; 20 16 bool transportOk_; 21 22 17 int nbParam_; 23 18 string* parametersString_; 24 25 26 27 19 // double phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep) 28 20 double phaseStepMax_; … … 30 22 double defaultLength_; 31 23 double defaultAperture_; 32 33 34 24 35 25 string label_; … … 41 31 // bool curvedTrajectory_; 42 32 43 void setDefaultValues() 44 { 45 label_ = ""; 46 nbParam_ = 2; 47 defaultLength_ = 0.0; 48 defaultAperture_ = 1.e+6; 49 phaseStepMax_ = 10.; 50 } 51 52 53 void setDefaults() 54 { 55 lenghtElem_ = defaultLength_; 56 aperture_ = defaultAperture_; 57 parmelaOk_ = false; 58 transportOk_ = false; 59 } 33 void setDefaultValues(); 34 void setDefaults(); 60 35 61 36 public : 62 37 38 abstractElement(); 39 abstractElement(string lab); 40 virtual ~abstractElement(); 63 41 64 abstractElement() 65 { 66 label_ = string(""); 67 setDefaultValues(); 68 setDefaults(); 69 stepmaxcm_ = 1000000; 70 // curvedTrajectory_ = false; 71 } 42 void setParameters(double ll,double aper); 43 void setLabel(string lab); 44 string getLabel() const; 45 nomdElement getName() const; 46 std::string getNameOfElement(); 47 std::string getNameString() const 48 double getLenghtOfElement() const; 49 int getNbParams() const; 50 bool is_parmela_element() const; 51 bool is_transport_element() const; 72 52 53 virtual void setPhaseStep(double); 54 virtual double getInitialKineticEnergy() const; 73 55 74 abstractElement(string lab) 75 { 76 label_ = lab; 77 setDefaultValues(); 78 setDefaults(); 79 stepmaxcm_ = 1000000; 80 // curvedTrajectory_ = false; 81 } 82 83 virtual ~abstractElement() {if (parametersString_ != NULL) delete [] parametersString_ ;} 84 85 virtual void setPhaseStep(double ) { cout << " setPhaseStep : ce n'est pas celui la qu'il faut ! " ; return;} 86 87 88 void setParameters(double ll, double aper) 89 { 90 lenghtElem_ = ll; 91 aperture_ = aper; 92 } 93 94 virtual void setParametersString(string* param) = 0; 95 96 string getLabel() const 97 { 98 return label_; 99 } 100 101 102 nomdElement getName() const 103 { 104 return elementName_; 105 } 106 107 // provisoire, pour suppleer une future classe nomdElement 108 // analogue a nomDeLogiciel 109 string getNameString() const 110 { 111 switch ( elementName_ ) 112 { 113 case initialBeam : 114 { 115 return string("INITIALBEAM"); 116 } 117 case drift : 118 { 119 return string("DRIFT"); 120 } 121 case cell : 122 { 123 return string("CELL"); 124 } 125 case soleno : 126 { 127 return string("SOLENO"); 128 } 129 case bend : 130 { 131 return string("BEND"); 132 } 133 default : 134 { 135 return string("UNKNOWN"); 136 } 137 } 138 } 139 140 double getLenghtOfElement() const { return lenghtElem_;} 141 142 int getNbParams() const {return nbParam_;}; 143 144 bool is_parmela_element() const {return parmelaOk_;}; 145 bool is_transport_element() const {return transportOk_;}; 146 147 virtual string* getParametersString() const = 0; 148 149 150 virtual string parmelaOutputFlow() const =0; 151 virtual string transportOutputFlow() const =0; 152 153 154 virtual double getInitialKineticEnergy() const {return 0.0;} 155 156 157 virtual string FileOutputFlow() const=0; 158 virtual void FileInput(ifstream& ifs) = 0; 159 56 virtual void setParametersString(string* param) = 0; 57 virtual string* getParametersString() const = 0; 58 virtual string parmelaOutputFlow() const = 0; 59 virtual string transportOutputFlow() const = 0; 60 virtual string FileOutputFlow() const = 0; 61 virtual void FileInput(ifstream& ifs) = 0; 160 62 }; 161 162 163 164 63 #endif -
Interface_Web/trunk/pspaWT/include/dataManager.h
r105 r107 1 1 #ifndef DATAMANAGER_SEEN 2 2 #define DATAMANAGER_SEEN 3 4 5 //#include<vector>6 7 3 8 4 #include "abstractElement.h" … … 14 10 #include "nomDeLogiciel.h" 15 11 16 17 //using namespace std;18 19 12 class dataManager 20 13 { 21 22 14 23 15 elementsCollection elementsGallery_; … … 30 22 void createInputFileTransport( unsigned int indexDeb, unsigned int indexFin); 31 23 void removeFile(string nameOfFile); 32 void clearSectionToExecute(); 33 24 void clearSectionToExecute(); 34 25 35 26 public: 36 27 37 38 28 dataManager() {;} 39 ~dataManager() 40 { 41 unsigned k; 42 for (k=0; k < jobList_.size();k++) 43 { 29 ~dataManager() { 30 unsigned k; 31 for (k=0; k < jobList_.size();k++) { 44 32 if ( jobList_[k] != NULL ) delete jobList_[k]; 45 33 } 46 }34 } 47 35 48 36 inline int beamLineSize() {return elementsGallery_.size();} … … 50 38 inline elementsCollection* getCollection() {return &elementsGallery_;} 51 39 inline particleBeam& getCurrentBeam() {return currentBeam_;} 52 53 void addSectionToExecute(int debut, int fin, nomDeLogiciel prog); 40 void addSectionToExecute(int debut, int fin, nomDeLogiciel prog); 54 41 55 42 abstractElement* addElement(nomdElement elemType); … … 62 49 void restoreAll(); 63 50 }; 64 65 51 #endif -
Interface_Web/trunk/pspaWT/include/elementCell.h
r82 r107 3 3 4 4 #include <string> 5 #include <fstream> 5 #include <iostream> 6 #include <sstream> 7 6 8 #include "abstractElement.h" 7 9 -
Interface_Web/trunk/pspaWT/include/elementInitialBeam.h
r82 r107 4 4 #include <string> 5 5 #include <iostream> 6 #include <sstream> 6 7 7 8 #include "abstractElement.h" 8 9 9 10 10 using namespace std; … … 43 43 44 44 virtual void setPhaseStep(double ph) { phaseStep_ = ph;} 45 46 45 46 47 47 virtual string* getParametersString() const; 48 48 49 49 virtual void setParametersString(string* param); 50 51 virtual inline double getInitialKineticEnergy() const {return E_cin_;}52 53 virtual string parmelaOutputFlow() const;54 55 virtual string transportOutputFlow() const50 51 virtual inline double getInitialKineticEnergy() const {return E_cin_;} 52 53 virtual string parmelaOutputFlow() const; 54 55 virtual string transportOutputFlow() const 56 56 { 57 57 ostringstream sortie; … … 59 59 return sortie.str(); 60 60 } 61 61 62 62 virtual string FileOutputFlow() const; 63 63 64 64 virtual void FileInput(ifstream& ifs); 65 65 -
Interface_Web/trunk/pspaWT/include/elementsCollection.h
r96 r107 5 5 #include <iostream> 6 6 #include <string> 7 #include <vector> 8 7 9 #include "abstractElement.h" 8 #include "elementDrift.h"9 #include "elementInitialBeam.h"10 #include "elementCell.h"11 #include "elementSoleno.h"12 #include "elementBend.h"13 10 #include "nomdElements.h" 14 15 16 //using namespace std;17 18 11 19 12 class elementsCollection 20 13 { 21 14 15 vector <abstractElement*> elements_; 22 16 23 vector < abstractElement*> elements_; 24 25 26 public: 27 17 public : 28 18 29 19 elementsCollection() {;} 20 ~elementsCollection(); 30 21 31 ~elementsCollection() 32 { 33 unsigned int k; 34 for (k=0; k < elements_.size(); k++) 35 { 36 if ( elements_[k] != NULL ) delete elements_[k]; 37 } 38 } 22 void raz(); 23 int size(); 24 abstractElement* addElement(nomdElement elemType); 25 abstractElement* getElementPointer(string label) const; 26 abstractElement* getElementPointer(unsigned int index) const; 39 27 40 inline void raz() 41 { 42 unsigned int k; 43 for (k=0; k < elements_.size(); k++) 44 { 45 if ( elements_[k] != NULL ) delete elements_[k]; 46 } 47 elements_.clear(); 48 } 49 50 inline int size() { return elements_.size(); } 51 52 53 abstractElement* addElement(nomdElement elemType) 54 { 55 switch ( elemType ) 56 { 57 case initialBeam : 58 { 59 elements_.push_back(new elementInitialBeam()); 60 break; 61 } 62 case drift : 63 { 64 elements_.push_back(new elementDrift()); 65 break; 66 } 67 case cell : 68 { 69 elements_.push_back(new elementCell()); 70 break; 71 } 72 case soleno : 73 { 74 elements_.push_back(new elementSoleno()); 75 break; 76 } 77 case bend : 78 { 79 elements_.push_back(new elementBend()); 80 break; 81 } 82 default : 83 { 84 cerr << " elementsCollection::addElement : ERROR unknown type of element : " << elemType << endl; 85 return NULL; 86 } 87 } 88 return elements_.back(); 89 } 90 91 92 93 inline abstractElement* getElementPointer(string label) const 94 { 95 unsigned int k; 96 for ( k=0; k < elements_.size() ; k++) 97 { 98 if ( elements_[k]->getLabel() == label ) return elements_[k]; 99 } 100 std::cerr << " elementsCollection::getElementPointer() : unknown element label: " << label << std::endl; 101 return NULL; 102 } 103 104 105 inline abstractElement* getElementPointer(unsigned int index) const 106 { 107 if ( index >= elements_.size() ) return NULL; 108 else return elements_[index]; 109 } 110 28 void eraseElement(string label); 111 29 112 30 }; 113 114 115 116 117 31 #endif -
Interface_Web/trunk/pspaWT/include/nomDeLogiciel.h
r59 r107 11 11 12 12 13 enum Logiciel13 enum Logiciel 14 14 { 15 15 parmela, transport, unknownSoftware … … 19 19 private: 20 20 21 Logiciel program_;22 std::string progString_;23 int value_;21 Logiciel program_; 22 std::string progString_; 23 int value_; 24 24 25 static Logiciel fromString( std::string s) 26 { 27 if (s == "parmela" ) return parmela; 28 else if ( s == "transport" ) return transport; 29 return unknownSoftware; 30 } 25 31 26 // static functions 27 28 29 30 static Logiciel fromString( std::string s) 31 { 32 if (s == "parmela" ) return parmela; 33 else if ( s == "transport" ) return transport; 34 return unknownSoftware; 35 } 36 37 static std::string toString( Logiciel lg) 38 { 39 switch (lg) 40 { 41 case parmela : { return "parmela"; } 42 case transport : { return "transport"; } 43 case unknownSoftware : { return "unknownSoftware"; } 44 } 45 return "unknownSoftware"; 46 } 47 48 static Logiciel fromValue( int v) 49 { 50 switch (v) 51 { 52 case 0 : { return parmela; } 53 case 1 : { return transport; } 54 } 55 return unknownSoftware; 56 } 57 58 static int toValue( Logiciel lg) 59 { 60 switch (lg) 61 { 62 case parmela : { return 0; } 63 case transport : { return 1; } 64 case unknownSoftware : { return 2; } 65 } 66 return -1; 67 } 68 69 public : 70 // constructors 71 32 static std::string toString( Logiciel lg) 33 { 34 switch (lg) 35 { 36 case parmela : { return "parmela"; } 37 case transport : { return "transport"; } 38 case unknownSoftware : { return "unknownSoftware"; } 39 } 40 return "unknownSoftware"; 41 } 42 43 static Logiciel fromValue( int v) 44 { 45 switch (v) 46 { 47 case 0 : { return parmela; } 48 case 1 : { return transport; } 49 } 50 return unknownSoftware; 51 } 52 53 static int toValue( Logiciel lg) 54 { 55 switch (lg) 56 { 57 case parmela : { return 0; } 58 case transport : { return 1; } 59 case unknownSoftware : { return 2; } 60 } 61 return -1; 62 } 63 64 public : 65 // constructors 66 72 67 nomDeLogiciel() : program_(transport) 73 {74 progString_ = toString(program_);75 value_ = toValue(program_);76 }77 78 79 nomDeLogiciel(const string& s)80 {81 program_ = fromString(s);82 progString_ = toString(program_);83 value_ = toValue(program_);84 }85 86 nomDeLogiciel(int val)87 {88 program_ = fromValue(val);89 progString_ = toString(program_);90 value_ = toValue(program_);91 }92 93 static int getNumberOfSoftwares() { return toValue(unknownSoftware);}94 95 inline std::string getString() const {return progString_;}96 97 // operators98 99 nomDeLogiciel& operator= (const nomDeLogiciel& nl)100 {101 program_ = nl.program_;102 progString_ = nl.progString_;103 value_ = nl.value_;104 return *this;105 }106 68 { 69 progString_ = toString(program_); 70 value_ = toValue(program_); 71 } 72 73 74 nomDeLogiciel(const string& s) 75 { 76 program_ = fromString(s); 77 progString_ = toString(program_); 78 value_ = toValue(program_); 79 } 80 81 nomDeLogiciel(int val) 82 { 83 program_ = fromValue(val); 84 progString_ = toString(program_); 85 value_ = toValue(program_); 86 } 87 88 static int getNumberOfSoftwares() { return toValue(unknownSoftware);} 89 90 inline std::string getString() const {return progString_;} 91 92 // operators 93 94 nomDeLogiciel& operator= (const nomDeLogiciel& nl) 95 { 96 program_ = nl.program_; 97 progString_ = nl.progString_; 98 value_ = nl.value_; 99 return *this; 100 } 101 107 102 bool operator== (const nomDeLogiciel& nl) 108 103 { 109 104 return ( program_ == nl.program_); 110 105 } 111 106 112 107 bool operator!= (const nomDeLogiciel& nl) 113 108 { 114 109 return ( program_ != nl.program_); 115 110 } 116 111 117 112 }; 118 113 -
Interface_Web/trunk/pspaWT/include/nomdElements.h
r82 r107 2 2 #define NOMDELEMENTS_SEEN 3 3 4 5 4 using namespace std; 6 5 7 typedef enum 8 { 9 initialBeam, drift, cell, bend, soleno 10 } nomdElement; 11 6 typedef enum { 7 initialBeam, drift, cell, bend, soleno 8 } nomdElement; 12 9 13 10 #endif
Note: See TracChangeset
for help on using the changeset viewer.