Ignore:
Timestamp:
Dec 16, 2013, 5:16:54 PM (11 years ago)
Author:
garnier
Message:

grosse modification pour intégrer les sections

File:
1 edited

Legend:

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

    r419 r455  
    22
    33
    4 sectionToExecute::sectionToExecute(abstractElement* f, abstractElement* l , abstractSoftware* s) {
    5     firstElement = f;
    6     lastElement =l;
    7     software = s;
     4sectionToExecute::sectionToExecute(abstractElement* a) {
     5  elements_.push_back(a);
    86}
    97
    108
    11 sectionToExecute::sectionToExecute(abstractElement* f, int fI, abstractElement* l , int lI, abstractSoftware* s) {
    12     firstElement = f;
    13     lastElement =l;
    14 
    15     firstElementNumberInBeamLine = fI;
    16     lastElementNumberInBeamLine =lI;
    17 
    18     software = s;
     9sectionToExecute::sectionToExecute(abstractElement* f, abstractSoftware* s) {
     10  elements_.push_back(f);
     11    software_ = s;
    1912}
    2013
     14
     15bool sectionToExecute::insertAfter(abstractElement* previousElement,abstractElement* currentElement) {
     16
     17  std::vector<abstractElement*>::iterator it;
     18  for (it = elements_.begin(); it < elements_.end(); it++) {
     19    if (*it == previousElement ) {
     20      elements_.insert (it+1,currentElement);
     21      return true;
     22    }
     23  }
     24  return false;
     25}
     26
     27/*
     28bool sectionToExecute::setSoftware(nomDeLogiciel logiciel) {
     29 
     30  if (sectionToExecuteNumber >= sectionToExecute_.size()) {
     31    return false;
     32  }
     33 
     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;
     59}
     60*/
Note: See TracChangeset for help on using the changeset viewer.