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/elementFit.cc

    r359 r418  
    1111    // transportOk_ = true;
    1212    // parmelaIgnored_ = true;
    13     registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
    14     registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
     13    // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
     14    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
    1515}
    1616
    1717void elementFit::setDefaultValues()
    1818{
    19     defaultLabel_ = "fit";
     19    defaultSpecificName_ = "fit";
    2020    variableNameDef_ = "";
    2121    variableValueDef_ = 0.0;
     
    2525void elementFit::setDefaults()
    2626{
    27     label_ = defaultLabel_;
     27    specificName_ = defaultSpecificName_;
    2828    variableName_ = variableNameDef_;
    2929    variableValue_ = variableValueDef_;
     
    3737    int compteur = -1;
    3838    parametersString_[++compteur] = mixedTools::intToString(nbParam_);
    39     parametersString_[++compteur] = label_;
     39    parametersString_[++compteur] = specificName_;
    4040    parametersString_[++compteur] = variableName_;
    4141    parametersString_[++compteur] = mixedTools::doubleToString(variableValue_ );
     
    6363    }
    6464   
    65     label_ = param[++compteur];
     65    specificName_ = param[++compteur];
    6666    variableName_ = param[++compteur];
    6767    variableValue_ = atof(param[++compteur].c_str());
     
    7070
    7171
    72 string elementFit::parmelaOutputFlow() const
    73 {
    74     ostringstream sortie;
    75     return sortie.str();
    76 }
     72// string elementFit::parmelaOutputFlow() const
     73// {
     74//     ostringstream sortie;
     75//     return sortie.str();
     76// }
    7777
    78 string elementFit::transportOutputFlow() const
    79 {
    80     ostringstream sortie;
    81     sortie << label_ << ":" << "  FIT," << variableName_ << " = " << variableValue_ << ", TOLER = " << tolerance_ << " ;" << endl;
    82     if ( variableName_ == "R11" || variableName_ == "R22" || variableName_ == "R12" || variableName_ == "R21" ) {
    83         sortie << " PRINT, TRANS;" << endl;
    84     }
    85     return sortie.str();
    86 }
     78// string elementFit::transportOutputFlow() const
     79// {
     80//     ostringstream sortie;
     81//     sortie << specificName_ << ":" << "  FIT," << variableName_ << " = " << variableValue_ << ", TOLER = " << tolerance_ << " ;" << endl;
     82//     if ( variableName_ == "R11" || variableName_ == "R22" || variableName_ == "R12" || variableName_ == "R21" ) {
     83//         sortie << " PRINT, TRANS;" << endl;
     84//     }
     85//     return sortie.str();
     86// }
    8787
    8888string elementFit::FileOutputFlow() const
     
    9090    ostringstream sortie;
    9191    //    sortie << elementName_.getElementType() << endl;
    92     sortie << elementName_.getElementLabel() << endl;
    93     sortie  << label_ << endl;
     92    sortie << elementName_.getGenericLabel() << endl;
     93    sortie  << specificName_ << endl;
    9494    sortie  <<    variableName_ << " " << variableValue_ << " " << tolerance_ << endl;
    9595    return sortie.str();
    9696}
    9797
     98vector< pair<string, vector<string> > > elementFit::parametersToSoftware () const {
     99  vector< pair<string, vector<string> > >  sortie;
     100  sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
     101  sortie.back().second.push_back(elementName_.getGenericLabel());
     102  sortie.back().second.push_back(specificName_);
     103  sortie.push_back( pair<string, vector<string> >("variable",  vector<string>() ) );
     104  sortie.back().second.push_back(variableName_);
     105  sortie.back().second.push_back(mixedTools::doubleToString(variableValue_));
     106  sortie.back().second.push_back(mixedTools::doubleToString(tolerance_));
     107  return sortie;
     108}
     109
     110
    98111void elementFit::FileInput(ifstream& ifs)
    99112{
    100     ifs >> label_;
     113    ifs >> specificName_;
    101114    ifs  >>  variableName_ >>  variableValue_   >> tolerance_;
    102115}
     
    106119    string txt = "";
    107120 
    108     txt += label_;
     121    txt += specificName_;
    109122    return txt;
    110123}
Note: See TracChangeset for help on using the changeset viewer.