Ignore:
Timestamp:
Dec 19, 2013, 3:53:53 PM (11 years ago)
Author:
garnier
Message:

Désormais il est de nouveau possible d'ajouter des sections et dy affecter des softwares (ne marche pour le moment quavec la 1ere sectionToExecute. Autres améliorations et renommages

File:
1 edited

Legend:

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

    r455 r469  
    11#include "sectionToExecute.h"
    2 
    3 
    4 sectionToExecute::sectionToExecute(abstractElement* a) {
    5   elements_.push_back(a);
    6 }
     2#include "softwareUnknown.h"
     3#include "softwareParmela.h"
     4#include "softwareTransport.h"
     5#include "softwareGenerator.h"
     6#include "softwareGenerator.h"
     7#include "softwareUsersprogram.h"
     8#include "softwareTest.h"
     9#include "softwareMadx.h" //xx
    710
    811
    912sectionToExecute::sectionToExecute(abstractElement* f, abstractSoftware* s) {
    1013  elements_.push_back(f);
     14  if (s == NULL) {
     15    software_ = new softwareUnknown();
     16  } else {
    1117    software_ = s;
     18  }
    1219}
    1320
     
    2532}
    2633
    27 /*
    28 bool sectionToExecute::setSoftware(nomDeLogiciel logiciel) {
    29  
    30   if (sectionToExecuteNumber >= sectionToExecute_.size()) {
    31     return false;
     34
     35void sectionToExecute::setSoftware(std::string logiciel) {
     36 
     37  abstractSoftware* prog;
     38  string inputFileName;
     39  if(logiciel == "parmela") {
     40    inputFileName = "parmin";
     41    prog = new softwareParmela(inputFileName, this);
     42  } else if (logiciel  == "transport") {
     43    inputFileName = "transport.input";
     44    prog =  new softwareTransport(inputFileName, this);
     45  } else if (logiciel == "generator") {
     46    inputFileName = "generator.in";
     47    prog = new softwareGenerator(inputFileName, this);
     48  } else if (logiciel  == "madx") {
     49    inputFileName = "madx.input";
     50    prog = new softwareMadx(inputFileName,this);
     51  } else if (logiciel  == "usersprogram") {
     52    inputFileName = "dummy";
     53    prog = new softwareUsersprogram(inputFileName, this);
     54  } else if (logiciel  == "test") {
     55    prog = new softwareTest(inputFileName, this);
     56  } else {
     57    prog = new softwareUnknown();
    3258  }
    3359 
    34   abstractSoftware* prog;
    35   string inputFileName;
    36   if(logiciel == nomDeLogiciel::parmela) {
    37     inputFileName = "parmin";
    38     prog = new softwareParmela(inputFileName, this);
    39   } else if (logiciel  == nomDeLogiciel::transport) {
    40     inputFileName = "transport.input";
    41     prog =  new softwareTransport(inputFileName, this);
    42   } else if (logiciel == nomDeLogiciel::generator) {
    43     inputFileName = "generator.in";
    44     prog = new softwareGenerator(inputFileName, this);
    45   } else if (logiciel  == nomDeLogiciel::madx) {
    46     inputFileName = "madx.input";
    47     prog = new softwareMadx(inputFileName,this);
    48   } else if (logiciel  == nomDeLogiciel::usersprogram) {
    49     inputFileName = "dummy";
    50     prog = new softwareUsersprogram(inputFileName, this);
    51   } else if (logiciel  == nomDeLogiciel::test) {
    52     prog = new softwareTest(inputFileName, this);
    53   } else {
    54     prog = new softwareUnknown(); // xx
    55   }
    56  
    57   sectionToExecute_[sectionToExecuteNumber]->setSoftware(prog);
    58   return true;
     60  setSoftware(prog);
    5961}
    60 */
     62
Note: See TracChangeset for help on using the changeset viewer.