Ignore:
Timestamp:
Jun 21, 2013, 10:16:56 AM (11 years ago)
Author:
lemeur
Message:

definition des compatibilites des elements dans les software

File:
1 edited

Legend:

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

    r387 r418  
    1313  nbParam_ = elementName_.getElementNbParameters();
    1414  parametersString_ = new string[nbParam_+1];
    15     registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
    16     registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
    17     registerAcceptableSoftware(nomDeLogiciel::test, TBoolOk);
     15    // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
     16    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
     17    // registerAcceptableSoftware(nomDeLogiciel::test, TBoolOk);
    1818
    1919}
     
    2121  void elementDrift::setDefaultValues()
    2222  {
    23     defaultLabel_ = "drift";
     23    defaultSpecificName_ = "drift";
    2424  }
    2525  void elementDrift::setDefaults()
    2626  {
    27     label_ = defaultLabel_;
     27    specificName_ = defaultSpecificName_;
    2828  }
    2929
     
    3333   int compteur = -1;
    3434   parametersString_[++compteur] = mixedTools::intToString(nbParam_);
    35   parametersString_[++compteur] = label_;
     35  parametersString_[++compteur] = specificName_;
    3636   parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
    3737   parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
     
    5757       return;
    5858     }
    59   label_ = param[++compteur];
     59  specificName_ = param[++compteur];
    6060   lenghtElem_ = atof(param[++compteur].c_str());
    6161   aperture_  = atof(param[++compteur].c_str());
    6262 }
    6363
    64 string elementDrift::parmelaOutputFlow() const
    65 {
    66   ostringstream sortie;
    67   sortie << "DRIFT /l=" << lenghtElem_ << "  /aper=" << aperture_ << "  /iout=1" << endl;
    68   return sortie.str();
    69 }
     64// string elementDrift::parmelaOutputFlow() const
     65// {
     66//   ostringstream sortie;
     67//   sortie << "DRIFT /l=" << lenghtElem_ << "  /aper=" << aperture_ << "  /iout=1" << endl;
     68//   return sortie.str();
     69// }
    7070
    7171
    72 string elementDrift::transportOutputFlow() const
    73   {
    74     ostringstream sortie;
    75     // longueur en m
    76     sortie << label_ << ":" << "  DRIFT, L=" << 0.01*lenghtElem_ << ";" << endl;
    77     return sortie.str();
    78   }
     72// string elementDrift::transportOutputFlow() const
     73//   {
     74//     ostringstream sortie;
     75//     // longueur en m
     76//     sortie << specificName_ << ":" << "  DRIFT, L=" << 0.01*lenghtElem_ << ";" << endl;
     77//     return sortie.str();
     78//   }
    7979
    8080
     
    8383  ostringstream sortie;
    8484  //  sortie << elementName_.getElementType()  << endl;
    85   sortie << elementName_.getElementLabel() << endl;
    86   sortie  << label_ << endl;
     85  sortie << elementName_.getGenericLabel() << endl;
     86  sortie  << specificName_ << endl;
    8787  sortie << lenghtElem_ << "  " << aperture_ <<endl;
    8888  return sortie.str();
    8989}
    9090
     91vector< pair<string, vector<string> > > elementDrift::parametersToSoftware () const {
     92  vector< pair<string, vector<string> > >  sortie;
     93  sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
     94  sortie.back().second.push_back(elementName_.getGenericLabel());
     95  sortie.back().second.push_back(specificName_);
     96  sortie.push_back( pair<string, vector<string> >("lenghtAperture",  vector<string>() ) );
     97  sortie.back().second.push_back(mixedTools::doubleToString(lenghtElem_));
     98  sortie.back().second.push_back(mixedTools::doubleToString(aperture_));
     99  return sortie;
     100}
     101
     102
     103
    91104void elementDrift::FileInput(ifstream& ifs)
    92105{
    93   ifs >> label_;
     106  ifs >> specificName_;
    94107  ifs >> lenghtElem_ >>  aperture_;
    95108}
     
    99112    string txt = "";
    100113
    101     txt += label_;
     114    txt += specificName_;
    102115    txt += "\nlength (cm) : ";
    103116    txt += mixedTools::doubleToString(lenghtElem_);
Note: See TracChangeset for help on using the changeset viewer.