Ignore:
Timestamp:
Dec 11, 2013, 9:33:35 AM (11 years ago)
Author:
lemeur
Message:

ajout traitement utilisateur

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc

    r424 r442  
    1313  nbParam_ = elementName_.getElementNbParameters();
    1414  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);
    2115}
    2216
     
    3024  specificName_ = defaultSpecificName_;
    3125
    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  // }
    3933}
    4034
     
    4438  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
    4539  parametersString_[++compteur] = specificName_;
    46   parametersString_[++compteur] = snapshotFile_;
     40  parametersString_[++compteur] = programFile_;
     41  parametersString_[++compteur] = inputBeamFile_;
     42  parametersString_[++compteur] = outputBeamFile_;
    4743 
    4844  if ( compteur != nbParam_ ) {
     
    6460  int nbparam = atoi(param[++compteur].c_str());
    6561  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";
    6763    return;
    6864  }
    6965 
    7066  specificName_ = param[++compteur];
     67  programFile_  = param[++compteur];
     68  inputBeamFile_  = param[++compteur];
     69  outputBeamFile_  = param[++compteur];
    7170}
    7271
     
    8887  sortie << elementName_.getGenericLabel() << endl;
    8988  sortie  << specificName_ << endl;
    90   sortie << snapshotFile_ << endl;
     89  sortie << programFile_ << endl;
     90  sortie << inputBeamFile_ << endl;
     91  sortie << outputBeamFile_ << endl;
    9192  return sortie.str();
    9293}
     
    9798  sortie.back().second.push_back(elementName_.getGenericLabel());
    9899  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_);
    101104  return sortie;
    102105}
     
    105108{
    106109  ifs >> specificName_;
    107   ifs >> snapshotFile_;
     110  ifs >> programFile_;
     111  ifs >> inputBeamFile_;
     112  ifs >> outputBeamFile_;;
    108113}
    109114
     
    112117  string txt = ""; 
    113118  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_;
    116125  return txt;
    117126}
     
    121130  UAPNode* node= root->addChild("snapshot");
    122131  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_);
    123137}
Note: See TracChangeset for help on using the changeset viewer.