Ignore:
Timestamp:
Jun 21, 2013, 2:32:47 PM (11 years ago)
Author:
lemeur
Message:

ajout de l'include algorithm

File:
1 edited

Legend:

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

    r418 r419  
    6464}
    6565
    66 void dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog)
    67 {
    68     jobList_.push_back(new sectionToExecute(debut, debutIndex, fin, finIndex, prog));
     66sectionToExecute*  dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, nomDeLogiciel logiciel)
     67{
     68  abstractSoftware* prog;
     69  string inputFileName;
     70  if(logiciel == nomDeLogiciel::parmela) {
     71    inputFileName = "parmin";
     72    prog = new softwareParmela(inputFileName, &globParam_, this);
     73  } else if (logiciel  == nomDeLogiciel::transport) {
     74    inputFileName = "transport.input";
     75    prog =  new softwareTransport(inputFileName, &globParam_, this);
     76  } else if (logiciel == nomDeLogiciel::generator) {
     77    inputFileName = "generator.in";
     78    prog = new softwareGenerator(inputFileName, &globParam_, this);
     79  } else if (logiciel  == nomDeLogiciel::test) {
     80    prog = new softwareTest(inputFileName, &globParam_, this);
     81  } else {
     82    prog = NULL;
     83  }
     84
     85  //  abstractSoftware* prog = createSoftwareConnexion(logiciel);
     86  jobList_.push_back(new sectionToExecute(debut, debutIndex, fin, finIndex, prog));
     87  //  return prog;
     88  return jobList_.back();
    6989}
    7090
     
    81101
    82102void dataManager::clearSectionToExecute(int a) {
     103  cout << " dataManager::clearSectionToExecute efaacement section d'index : " << a << endl;
    83104  if (a<0) return;
    84105  if (a>= jobList_.size()) return;
     106
     107  // lors de la creation de la section on a fait un 'new' d'un softwareXXXX
     108  // on fait ici le 'delete'
     109
     110  const abstractSoftware* soft = jobList_.at(a)->getSoftware();
     111    if ( soft != NULL ) delete soft;
    85112  jobList_.erase (jobList_.begin()+a);
    86113}
     
    160187      }
    161188     
    162       delete softw;
    163189      if ( success ) {
    164190        currentBeam_ = &diagnosticBeam_.at(indexElementToIndexDiag_.back());
     
    328354    string inputFileName;
    329355    if(logi == nomDeLogiciel::parmela) {
     356      cout << " dataManager::createSoftwareConnexion : logiciel identifie : parmela " << endl;
    330357        inputFileName = "parmin";
    331358        return new softwareParmela(inputFileName, &globParam_, this);
    332359    } else if (logi == nomDeLogiciel::transport) {
     360      cout << " dataManager::createSoftwareConnexion : logiciel identifie : transport " << endl;
    333361        inputFileName = "transport.input";
    334362        return new softwareTransport(inputFileName, &globParam_, this);
    335363    } else if (logi == nomDeLogiciel::generator) {
     364      cout << " dataManager::createSoftwareConnexion : logiciel identifie : generator " << endl;
    336365        inputFileName = "generator.in";
    337366        return new softwareGenerator(inputFileName, &globParam_, this);
    338367    } else if (logi == nomDeLogiciel::test) {
     368      cout << " dataManager::createSoftwareConnexion : logiciel identifie : test " << endl;
    339369        return new softwareTest(inputFileName, &globParam_, this);
    340370    } else {
     371      cout << " dataManager::createSoftwareConnexion : logiciel identifie : null " << endl;
    341372        return NULL;
    342373    }
Note: See TracChangeset for help on using the changeset viewer.