Changeset 442 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc
- Timestamp:
- Dec 11, 2013, 9:33:35 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc
r424 r442 13 13 nbParam_ = elementName_.getElementNbParameters(); 14 14 parametersString_ = new string[nbParam_+1]; 15 // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolIgnore);16 // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);17 // registerAcceptableSoftware(nomDeLogiciel::generator, TBoolIgnore);18 // registerAcceptableSoftware(nomDeLogiciel::useraction,19 // TBoolOk);20 // registerAcceptableSoftware(nomDeLogiciel::test, TBoolIgnore);21 15 } 22 16 … … 30 24 specificName_ = defaultSpecificName_; 31 25 32 if(incr_ < 10) {33 snapshotFile_= string("cliche")+string(".00")+mixedTools::intToString(incr_);34 } else if(incr_ >= 10 && incr_ < 100) {35 snapshotFile_= string("cliche")+string(".0")+mixedTools::intToString(incr_);36 } else {37 snapshotFile_= string("cliche")+string(".")+mixedTools::intToString(incr_);38 }26 // if(incr_ < 10) { 27 // snapshotFile_= string("cliche")+string(".00")+mixedTools::intToString(incr_); 28 // } else if(incr_ >= 10 && incr_ < 100) { 29 // snapshotFile_= string("cliche")+string(".0")+mixedTools::intToString(incr_); 30 // } else { 31 // snapshotFile_= string("cliche")+string(".")+mixedTools::intToString(incr_); 32 // } 39 33 } 40 34 … … 44 38 parametersString_[++compteur] = mixedTools::intToString(nbParam_); 45 39 parametersString_[++compteur] = specificName_; 46 parametersString_[++compteur] = snapshotFile_; 40 parametersString_[++compteur] = programFile_; 41 parametersString_[++compteur] = inputBeamFile_; 42 parametersString_[++compteur] = outputBeamFile_; 47 43 48 44 if ( compteur != nbParam_ ) { … … 64 60 int nbparam = atoi(param[++compteur].c_str()); 65 61 if ( nbparam != nbParam_ ) { 66 cerr << " elementSnaphot:: setParametersString parameters do not match for a DRIFT";62 cerr << " elementSnaphot:: setParametersString parameters do not match for a SNAPSHOT"; 67 63 return; 68 64 } 69 65 70 66 specificName_ = param[++compteur]; 67 programFile_ = param[++compteur]; 68 inputBeamFile_ = param[++compteur]; 69 outputBeamFile_ = param[++compteur]; 71 70 } 72 71 … … 88 87 sortie << elementName_.getGenericLabel() << endl; 89 88 sortie << specificName_ << endl; 90 sortie << snapshotFile_ << endl; 89 sortie << programFile_ << endl; 90 sortie << inputBeamFile_ << endl; 91 sortie << outputBeamFile_ << endl; 91 92 return sortie.str(); 92 93 } … … 97 98 sortie.back().second.push_back(elementName_.getGenericLabel()); 98 99 sortie.back().second.push_back(specificName_); 99 sortie.push_back( pair<string, vector<string> >("snapshotFile", vector<string>() ) ); 100 sortie.back().second.push_back(snapshotFile_); 100 sortie.push_back( pair<string, vector<string> >("nameOfFiles", vector<string>() ) ); 101 sortie.back().second.push_back(programFile_); 102 sortie.back().second.push_back(inputBeamFile_); 103 sortie.back().second.push_back(outputBeamFile_); 101 104 return sortie; 102 105 } … … 105 108 { 106 109 ifs >> specificName_; 107 ifs >> snapshotFile_; 110 ifs >> programFile_; 111 ifs >> inputBeamFile_; 112 ifs >> outputBeamFile_;; 108 113 } 109 114 … … 112 117 string txt = ""; 113 118 txt += specificName_; 114 txt += "\nname of file for snapshot : "; 115 txt += snapshotFile_; 119 txt += "\nname of file for user's program : "; 120 txt += programFile_; 121 txt += "\nname of input beam file for user's program : "; 122 txt += inputBeamFile_; 123 txt += "\nname of output beam file for user's program : "; 124 txt += outputBeamFile_; 116 125 return txt; 117 126 } … … 121 130 UAPNode* node= root->addChild("snapshot"); 122 131 node->addAttribute("name",specificName_); 132 133 UAPNode* fichiers = node->addChild("names_of_files"); 134 fichiers->addAttribute("program",programFile_); 135 fichiers->addAttribute("inputf",inputBeamFile_); 136 fichiers->addAttribute("outputf",outputBeamFile_); 123 137 }
Note: See TracChangeset
for help on using the changeset viewer.