Changeset 50 in PSPA
- Timestamp:
- Nov 3, 2012, 12:15:30 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/include/GWt_LigneFaisceau.h
r48 r50 4 4 #include "dataManager.h" 5 5 #include "GWt_pspaApplication.h" 6 #include "abstractElement.h" 6 7 7 8 #include <Wt/WApplication> … … 22 23 { 23 24 25 // WVBoxLayout* tempVBox_; 24 26 WHBoxLayout* beamLayout_; 25 27 // dataManager* dtmanage_; … … 28 30 public: 29 31 GWt_LigneFaisceau(PspaApplication*); 30 32 void restoreElementCollection(); 31 33 private: 32 34 void dropEvent(WDropEvent evt); -
Interface_Web/trunk/pspaWT/include/GWt_globalParameters.h
r41 r50 32 32 GWt_globalParameters(PspaApplication* ps); 33 33 34 void updateGlobals(); 35 36 37 void renew(); 34 38 35 39 void lancerCalcul(); -
Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h
r41 r50 35 35 return dtmanage_; 36 36 } 37 37 void sauver(); 38 void restaurer(); 38 39 private : 39 40 WTextArea* console_; 40 41 dataManager* dtmanage_; 42 WWidget* globalParam_; 43 WWidget* beamLine_; 41 44 }; 42 45 -
Interface_Web/trunk/pspaWT/include/abstractElement.h
r48 r50 5 5 #include <sstream> 6 6 #include <string> 7 8 7 9 8 #include "mathematicalTools.h" … … 108 107 virtual string parmelaOutputFlow() const =0; 109 108 109 110 110 virtual double getInitialKineticEnergy() const {return 0.0;} 111 112 113 virtual string FileOutputFlow() const=0; 114 virtual void FileInput(ifstream& ifs) = 0; 111 115 112 116 }; -
Interface_Web/trunk/pspaWT/include/dataManager.h
r48 r50 5 5 #include "elementsCollection.h" 6 6 #include "globalParameters.h" 7 //#include "driftDefinition.h"7 #include "nomdElements.h" 8 8 //using namespace std; 9 9 … … 26 26 inline int beamLineSize() {return elementsGallery_.size();} 27 27 inline globalParameters* getGlobalParameters() {return &globParam_;} 28 inline elementsCollection* getCollection() {return &elementsGallery_;} 29 abstractElement* addElement(nomdElement elemType); 28 30 abstractElement* addCell(); 29 31 abstractElement* addDrift(); 30 32 abstractElement* addInitialBeam(); 31 33 void executeAll(); 34 void saveAll(); 35 void restoreAll(); 36 32 37 }; 33 38 -
Interface_Web/trunk/pspaWT/include/elementBend.h
r45 r50 51 51 } 52 52 53 virtual string FileOutputFlow() const 54 { 55 ostringstream sortie; 56 cout << " BEND sortie fichier non programmee " << endl; 57 return sortie.str(); 58 } 53 59 60 61 virtual void FileInput(ifstream& ifs) 62 { 63 cout << " BEND lecture fichier non programmee " << endl; 64 } 54 65 }; 55 66 -
Interface_Web/trunk/pspaWT/include/elementCell.h
r48 r50 3 3 4 4 #include <string> 5 #include <fstream> 5 6 #include "abstractElement.h" 6 7 … … 50 51 virtual string parmelaOutputFlow() const; 51 52 53 virtual string FileOutputFlow() const; 54 55 virtual void FileInput(ifstream& ifs); 52 56 53 57 }; -
Interface_Web/trunk/pspaWT/include/elementDrift.h
r45 r50 4 4 5 5 #include "abstractElement.h" 6 7 6 8 7 using namespace std; … … 27 26 virtual string parmelaOutputFlow() const; 28 27 28 virtual string FileOutputFlow() const; 29 30 virtual void FileInput(ifstream& ifs); 31 29 32 }; 30 33 -
Interface_Web/trunk/pspaWT/include/elementInitialBeam.h
r45 r50 6 6 7 7 #include "abstractElement.h" 8 8 9 9 10 using namespace std; … … 52 53 virtual string parmelaOutputFlow() const; 53 54 55 virtual string FileOutputFlow() const; 56 57 virtual void FileInput(ifstream& ifs); 58 59 54 60 }; 55 61 -
Interface_Web/trunk/pspaWT/include/elementSoleno.h
r45 r50 51 51 } 52 52 53 54 virtual string FileOutputFlow() const 55 { 56 ostringstream sortie; 57 cout << " SOLENO sortie fichier non progerammee " << endl; 58 return sortie.str(); 59 } 60 61 virtual void FileInput(ifstream& ifs) 62 { 63 cout << " SOLENO lecture fichier non programmee " << endl; 64 } 65 53 66 }; 54 67 #endif -
Interface_Web/trunk/pspaWT/include/elementsCollection.h
r48 r50 34 34 } 35 35 } 36 37 inline void raz() 38 { 39 unsigned int k; 40 for (k=0; k < elements_.size(); k++) 41 { 42 if ( elements_[k] != NULL ) delete elements_[k]; 43 } 44 elements_.clear(); 45 } 36 46 37 47 inline int size() { return elements_.size(); } -
Interface_Web/trunk/pspaWT/include/globalParameters.h
r42 r50 4 4 #include <iostream> 5 5 #include <string> 6 #include <fstream> 6 7 7 8 8 9 using namespace std; 9 10 10 class globalParameters 11 class globalParameters 11 12 12 13 { … … 51 52 } 52 53 54 inline void raz() { setDefaults();} 55 53 56 inline double getFrequency() const {return frequency_;} 54 57 inline double getIntegrationStep() const {return integrationStep_;} … … 62 65 void setParametersString(string* param); 63 66 67 string FileOutputFlow() const; 68 69 void FileInput(ifstream& ifs); 70 71 64 72 }; 65 73 -
Interface_Web/trunk/pspaWT/include/nomdElements.h
r38 r50 2 2 #define NOMDELEMENTS_SEEN 3 3 4 #include <string> 5 6 using namespace std; 4 7 5 8 typedef enum -
Interface_Web/trunk/pspaWT/src/GWt_LigneFaisceau.cc
r48 r50 98 98 } 99 99 100 WVBoxLayout* tempVBox = new WVBoxLayout();100 // WVBoxLayout* tempVBox = new WVBoxLayout(); 101 101 102 if (!dropped) {103 dropped = new WPushButton();104 dropped->setIcon(evt.mimeType());105 dropped->setMaximumSize(50,50);106 }102 // if (!dropped) { 103 // dropped = new WPushButton(); 104 // dropped->setIcon(evt.mimeType()); 105 // dropped->setMaximumSize(50,50); 106 // } 107 107 108 WComboBox *selectionBox = new WComboBox();109 selectionBox->addItem("Parmela");110 selectionBox->addItem("Transport");111 selectionBox->addItem("Autre");108 // WComboBox *selectionBox = new WComboBox(); 109 // selectionBox->addItem("Parmela"); 110 // selectionBox->addItem("Transport"); 111 // selectionBox->addItem("Autre"); 112 112 113 selectionBox->setCurrentIndex(1); // Parmela114 // selectionBox->activated().connect(this, &MyWidget::comboChanged);113 // selectionBox->setCurrentIndex(1); // Parmela 114 // // selectionBox->activated().connect(this, &MyWidget::comboChanged); 115 115 116 tempVBox->addWidget(dropped);117 tempVBox->addWidget(selectionBox);116 // tempVBox->addWidget(dropped); 117 // tempVBox->addWidget(selectionBox); 118 118 119 WContainerWidget* tempWidget = new WContainerWidget(); 120 tempWidget->setLayout(tempVBox); 121 beamLayout_->addWidget(tempWidget); 119 // WContainerWidget* tempWidget = new WContainerWidget(); 120 // tempWidget->setLayout(tempVBox); 121 // beamLayout_->addWidget(tempWidget); 122 beamLayout_->addWidget(dropped); 123 } 124 125 126 void GWt_LigneFaisceau::restoreElementCollection() 127 { 128 int nbElem = pspa_->getDataManager()->beamLineSize(); 129 cout << " nb elem a restaurer " << nbElem << endl; 130 unsigned int k; 131 beamLayout_->clear(); 132 for ( k=0; k < nbElem; k++) 133 { 134 abstractElement* ptr = pspa_->getDataManager()->getCollection()->getElementPointer(k); 135 nomdElement nom = ptr->getName(); 136 cout << " GWt_LigneFaisceau:: je restaure element type " << nom << endl; 137 WPushButton* dropped = NULL; 138 switch (nom) 139 { 140 case initialBeam : 141 { 142 GWt_initialBeam* gwInitialBeam = new GWt_initialBeam(pspa_,ptr, string("icons/beam.jpg")); 143 dropped = gwInitialBeam->getButton(); 144 beamLayout_->addWidget(dropped); 145 break; 146 } 147 case drift : 148 { 149 GWt_drift* gdrift = new GWt_drift(pspa_,ptr, string("icons/drift.jpg")); 150 dropped = gdrift->getButton(); 151 beamLayout_->addWidget(dropped); 152 break; 153 } 154 case cell : 155 { 156 GWt_cell* gwCell = new GWt_cell(pspa_,ptr, string("icons/cell.jpg")); 157 dropped = gwCell->getButton(); 158 beamLayout_->addWidget(dropped); 159 break; 160 } 161 default : 162 { 163 cerr << " GWt_LigneFaisceau element type " << nom << " inconnu " << endl; 164 break; 165 } 166 } 167 168 } 122 169 123 170 } -
Interface_Web/trunk/pspaWT/src/GWt_globalParameters.cc
r38 r50 19 19 panel->setTitle(" global parameters "); 20 20 21 string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString(); 22 if ( param == NULL ) 23 { 24 pspa_->addConsoleMessage(" GWt_globalParameters : empty parameter set"); 25 } 26 int nbparam = atoi(param[0].c_str()); 27 if ( nbparam != 4 ) 28 { 29 pspa_->addConsoleMessage(" element seems not to be a DRIFT"); 30 } 21 // string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString(); 22 // if ( param == NULL ) 23 // { 24 // pspa_->addConsoleMessage(" GWt_globalParameters : empty parameter set"); 25 // } 26 // int nbparam = atoi(param[0].c_str()); 27 // if ( nbparam != 4 ) 28 // { 29 // pspa_->addConsoleMessage(" GWt_globalParameters : wrong number of parameters"); 30 // } 31 // WText* freqText = new WText("frequency (MHz) : "); 32 // frequencyEdit_ = new WLineEdit(param[1].c_str()); 33 34 // WText *stepText = new WText("step in phase (deg.) : "); 35 // stepEdit_ = new WLineEdit(param[2].c_str()); 36 37 // WText *nstepMaxText = new WText("max step number : "); 38 // nstepMAxEdit_ = new WLineEdit(param[3].c_str()); 39 40 // WText *nscText = new WText("periodicity of s.c. computation : "); 41 // nscEdit_ = new WLineEdit(param[4].c_str()); 42 43 31 44 WText* freqText = new WText("frequency (MHz) : "); 32 frequencyEdit_ = new WLineEdit( param[1].c_str());45 frequencyEdit_ = new WLineEdit(); 33 46 34 47 WText *stepText = new WText("step in phase (deg.) : "); 35 stepEdit_ = new WLineEdit( param[2].c_str());48 stepEdit_ = new WLineEdit(); 36 49 37 50 WText *nstepMaxText = new WText("max step number : "); 38 nstepMAxEdit_ = new WLineEdit( param[3].c_str());51 nstepMAxEdit_ = new WLineEdit(); 39 52 40 53 WText *nscText = new WText("periodicity of s.c. computation : "); 41 nscEdit_ = new WLineEdit(param[4].c_str()); 54 nscEdit_ = new WLineEdit(); 55 42 56 43 57 … … 71 85 72 86 setLayout(globLayout); 73 87 renew(); 74 88 } 75 89 90 void GWt_globalParameters::renew() 91 { 92 string* param = pspa_->getDataManager()->getGlobalParameters()->getParametersString(); 93 if ( param == NULL ) 94 { 95 pspa_->addConsoleMessage(" GWt_globalParameters : empty parameter set"); 96 } 97 int nbparam = atoi(param[0].c_str()); 98 if ( nbparam != 4 ) 99 { 100 pspa_->addConsoleMessage(" GWt_globalParameters : wrong number of parameters"); 101 } 102 frequencyEdit_->setText(param[1].c_str()); 103 stepEdit_->setText(param[2].c_str()); 104 nstepMAxEdit_->setText(param[3].c_str()); 105 nscEdit_->setText(param[4].c_str()); 106 } 76 107 77 void GWt_globalParameters:: lancerCalcul()108 void GWt_globalParameters::updateGlobals() 78 109 { 79 pspa_->addConsoleMessage("on va peut etre y arriver");80 110 string envoi[5]; 81 111 envoi[0] = string("4"); … … 85 115 envoi[4] = nscEdit_->text().toUTF8(); 86 116 pspa_->getDataManager()->getGlobalParameters()->setParametersString(envoi); 117 } 118 119 void GWt_globalParameters::lancerCalcul() 120 { 121 pspa_->addConsoleMessage("on va peut etre y arriver"); 122 updateGlobals(); 87 123 pspa_->getDataManager()->executeAll(); 88 89 124 90 125 } -
Interface_Web/trunk/pspaWT/src/GWt_initialBeam.cc
r48 r50 13 13 initialBeam_ = elem; 14 14 dropped_ = new WPushButton(); 15 15 cout << " GWt_initialBeam:: nom de l'image" << image << endl; 16 16 dropped_->clicked().connect(this, &GWt_initialBeam::openParametersForm); 17 17 -
Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
r48 r50 1 /*2 * Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.3 *4 * See the LICENSE file for terms of use.5 */6 1 #include <stdio.h> 7 2 #include <string.h> … … 15 10 #include <Wt/WTextArea> 16 11 #include <Wt/WBreak> 12 #include <Wt/WPushButton> 17 13 18 14 #include "GWt_pspaApplication.h" … … 75 71 WWidget* PspaApplication::createGlobalParamWidget() 76 72 { 77 WContainerWidget* globalParam=new GWt_globalParameters(this);73 WContainerWidget* globalParam =new GWt_globalParameters(this); 78 74 globalParam->setMaximumSize(600,300); 79 75 globalParam->setMinimumSize(600,300); … … 102 98 WGridLayout *iconAndBeamLineLayout = new WGridLayout(); 103 99 104 // iconAndBeamLineContainer->setLayout(iconAndBeamLineLayout);105 106 // vBoxLayout->addWidget(iconAndBeamLineContainer,0,0);107 108 109 // beamLayout_->addWidget(bidon);110 111 100 112 101 console_ = new WTextArea(); … … 114 103 115 104 116 calculLayout->addWidget(createBeamLine() , 0, 0); 117 calculLayout->addWidget(createGlobalParamWidget(),1,0); 105 WGridLayout* toolbarLayout = new WGridLayout(); 106 107 WPushButton* boutonSauve = new WPushButton(" sauvegarder"); 108 WPushButton* boutonRestaure = new WPushButton(" restaurer"); 109 toolbarLayout->addWidget(boutonSauve , 0, 0); 110 toolbarLayout->addWidget(boutonRestaure , 0, 1); 111 112 boutonSauve->clicked().connect(this, &PspaApplication::sauver); 113 boutonRestaure->clicked().connect(this, &PspaApplication::restaurer); 114 115 beamLine_ = createBeamLine(); 116 calculLayout->addWidget(beamLine_ , 0, 0); 117 globalParam_ = createGlobalParamWidget(); 118 calculLayout->addWidget(globalParam_,1,0); 119 calculLayout->addLayout(toolbarLayout ,2,0); 118 120 iconAndBeamLineLayout->addWidget(createPalette() , 0, 0); 119 121 iconAndBeamLineLayout->addLayout(calculLayout ,0,1); … … 122 124 iconAndBeamLineLayout->setColumnStretch(1,1); 123 125 124 vBoxLayout->addLayout(iconAndBeamLineLayout, 0,0);125 vBoxLayout->addWidget(console_, 1,0);126 vBoxLayout->addLayout(iconAndBeamLineLayout,1,0); 127 vBoxLayout->addWidget(console_,2,0); 126 128 127 128 129 130 // iconAndBeamLineLayout->addWidget(createPalette() , 0, 0);131 // iconAndBeamLineLayout->addWidget(createBeamLine() , 0, 1);132 133 134 135 // vBoxLayout->addLayout(iconAndBeamLineLayout,0,0);136 // vBoxLayout->addWidget(bidon,1,0);137 // vBoxLayout->addWidget(console_,2,0);138 129 139 130 vBoxLayout->setRowResizable(0); … … 145 136 new WText("<i>This examples requires that javascript support is enabled.</i>",root()); 146 137 } 147 148 // root()->addWidget(new WText("Votre nom, s'il vous plait ? ")); // show some text149 // nameEdit_ = new WLineEdit(root()); // allow text input150 // nameEdit_->setFocus(); // give focus151 152 // WPushButton *button153 // = new WPushButton("Go", root()); // create a button154 // button->setMargin(5, Left); // add 5 pixels margin155 156 // // root()->addWidget(new WBreak()); // insert a line break157 158 // // greeting_ = new WText(root()); // empty text159 160 // /*161 // * Connect signals with slots162 // *163 // * - simple Wt-way164 // */165 // button->clicked().connect(this, &PspaApplication::gopspa);166 167 /*168 * - using an arbitrary function object (binding values with boost::bind())169 */170 // nameEdit_->enterPressed().connect171 // (boost::bind(&HelloApplication::greet, this));172 138 173 139 } … … 189 155 } 190 156 157 void PspaApplication::sauver() 158 { 159 cout << " on sauve " << endl; 160 GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_); 161 bibi->updateGlobals(); 162 dtmanage_->saveAll(); 191 163 164 } 192 165 193 // WApplication *createApplication(const WEnvironment& env) 194 // { 195 // /* 196 // * You could read information from the environment to decide whether 197 // * the user has permission to start a new application 198 // */ 199 // return new PspaApplication(env); 200 // } 166 void PspaApplication::restaurer() 167 { 168 cout << " on restaure " << endl; 201 169 202 // int main(int argc, char **argv) 203 // { 204 // /* 205 // * Your main method may set up some shared resources, but should then 206 // * start the server application (FastCGI or httpd) that starts listening 207 // * for requests, and handles all of the application life cycles. 208 // * 209 // * The last argument to WRun specifies the function that will instantiate 210 // * new application objects. That function is executed when a new user surfs 211 // * to the Wt application, and after the library has negotiated browser 212 // * support. The function should return a newly instantiated application 213 // * object. 214 // */ 215 // return WRun(argc, argv, &createApplication); 216 // } 170 dtmanage_->restoreAll(); 171 172 GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_); 173 bibi->renew(); 174 175 GWt_LigneFaisceau* bobo = static_cast<GWt_LigneFaisceau*>(beamLine_); 176 177 bobo->restoreElementCollection(); 178 // dtmanage_-> 179 180 } 181 -
Interface_Web/trunk/pspaWT/src/dataManager.cc
r48 r50 1 1 #include "dataManager.h" 2 #include "nomdElements.h"3 2 4 3 … … 6 5 //using namespace std; 7 6 8 7 abstractElement* dataManager::addElement(nomdElement elemType) 8 { 9 switch ( elemType ) 10 { 11 case initialBeam : 12 { 13 return elementsGallery_.createNewInitialBeam(); 14 } 15 case drift : 16 { 17 return elementsGallery_.createNewDrift(); 18 } 19 case cell : 20 { 21 return elementsGallery_.createNewCell(); 22 } 23 default : 24 { 25 cerr << " dataManager::addElement : ERROR nknown type of element : " << elemType << endl; 26 return NULL; 27 } 28 } 29 } 9 30 10 31 abstractElement* dataManager::addDrift() … … 80 101 executeParmela( 0, elementsGallery_.size()-1); 81 102 } 103 104 105 106 void dataManager::saveAll() 107 { 108 ofstream outfile; 109 string name = string("/tmp/pspa.save"); 110 outfile.open(name.c_str(), ios::out); 111 if (!outfile) 112 { 113 cerr << " error opening output file for persistency " << name << endl; 114 } 115 outfile << globParam_.FileOutputFlow(); 116 int k; 117 abstractElement* elPtr; 118 for ( k=0 ; k < elementsGallery_.size() ; k++) 119 { 120 elPtr = elementsGallery_.getElementPointer(k); 121 outfile << elPtr->FileOutputFlow(); 122 } 123 outfile.close(); 124 } 125 126 void dataManager::restoreAll() 127 { 128 ifstream infile; 129 string name = string("/tmp/pspa.save"); 130 infile.open(name.c_str(), ios::in); 131 if (!infile) 132 { 133 cerr << " error opening input stream " << name << endl; 134 } 135 int ielem; 136 137 string globalTitle; 138 if ( infile >> globalTitle ) 139 { 140 if ( globalTitle == string("globals") ) 141 { 142 cout << " restauration des globaux " << endl; 143 globParam_.raz(); 144 globParam_.FileInput(infile); 145 } 146 else 147 { 148 cerr << " dataManager::restoreAll ERROR : global parameters seems to be missing" << endl; 149 } 150 } 151 else 152 { 153 cerr << " dataManager::restoreAll ERROR : reading data save file" << endl; 154 } 155 elementsGallery_.raz(); 156 nomdElement elem; 157 while (infile >> ielem) 158 { 159 elem = (nomdElement)ielem; 160 cout << " restauration element de type " << elem << endl; 161 abstractElement* nouveau = addElement(elem); 162 nouveau->FileInput(infile); 163 } 164 165 166 infile.close(); 167 } -
Interface_Web/trunk/pspaWT/src/elementCell.cc
r45 r50 94 94 return sortie.str(); 95 95 } 96 97 98 string elementCell::FileOutputFlow() const 99 { 100 ostringstream sortie; 101 sortie << elementName_ << endl; 102 sortie << lenghtElem_ << " " << aperture_ << endl; 103 sortie << initialPhase_ << " " << acceleratingField_ << endl; 104 sortie << phaseStepMax_ << endl; 105 sortie << acceleratingShapeFile_ << endl; 106 sortie << focusingMagFile_ << endl; 107 sortie << offsetMag_ << " " << scaleFactor_ << endl; 108 return sortie.str(); 109 } 110 111 void elementCell::FileInput(ifstream& ifs) 112 { 113 ifs >> lenghtElem_ >> aperture_; 114 ifs >> initialPhase_ >> acceleratingField_; 115 ifs >> phaseStepMax_; 116 ifs >> acceleratingShapeFile_; 117 ifs >> focusingMagFile_; 118 ifs >> offsetMag_ >> scaleFactor_; 119 } -
Interface_Web/trunk/pspaWT/src/elementDrift.cc
r45 r50 47 47 return sortie.str(); 48 48 } 49 50 string elementDrift::FileOutputFlow() const 51 { 52 ostringstream sortie; 53 sortie << elementName_ << endl; 54 sortie << lenghtElem_ << " " << aperture_ <<endl; 55 return sortie.str(); 56 } 57 58 void elementDrift::FileInput(ifstream& ifs) 59 { 60 ifs >> lenghtElem_ >> aperture_; 61 } -
Interface_Web/trunk/pspaWT/src/elementInitialBeam.cc
r45 r50 90 90 return sortie.str(); 91 91 } 92 93 string elementInitialBeam::FileOutputFlow() const 94 { 95 ostringstream sortie; 96 // on prend les troncatures tmax et rmax à 3 sigmas 97 sortie << elementName_ << endl; 98 sortie << nmacrop_ << " " << sigma_t_ << " " << sigma_r_ << endl; 99 sortie << E_cin_ << " " << sigma_E_ << endl; 100 sortie << phaseStep_ << " " << nb_true_particles_ << endl; 101 return sortie.str(); 102 } 103 104 void elementInitialBeam::FileInput(ifstream& ifs) 105 { 106 ifs >> nmacrop_ >> sigma_t_ >> sigma_r_; 107 ifs >> E_cin_ >> sigma_E_; 108 ifs >> phaseStep_ >> nb_true_particles_; 109 } -
Interface_Web/trunk/pspaWT/src/globalParameters.cc
r45 r50 41 41 nsc_ = atoi(param[4].c_str()); 42 42 } 43 44 string globalParameters::FileOutputFlow() const 45 { 46 ostringstream sortie; 47 sortie << " globals " << endl; 48 sortie << frequency_ << " " << integrationStep_ << " " << nstepsMax_ << " " << nsc_ << endl; 49 return sortie.str(); 50 51 } 52 53 54 void globalParameters::FileInput(ifstream& ifs) 55 { 56 ifs >> frequency_ >> integrationStep_ >> nstepsMax_ >> nsc_; 57 }
Note: See TracChangeset
for help on using the changeset viewer.