Ignore:
Timestamp:
Feb 5, 2014, 11:45:11 AM (10 years ago)
Author:
touze
Message:

ajout de quadrupole et sextupole

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElementFactory.cc

    r437 r487  
    1818  isFitElementEnable(false),
    1919  isSnapshotElementEnable(false),
    20   isMPoleElementEnable(false)
     20  isMPoleElementEnable(false),
     21  isQPoleElementEnable(false),
     22  isSPoleElementEnable(false)
    2123{}
    2224
     
    3234  isSnapshotElementEnable = false;
    3335  isMPoleElementEnable = false;
     36  isQPoleElementEnable = false;
     37  isSPoleElementEnable = false;
    3438}
    3539
     
    106110}
    107111
     112GWt_elementQpole* GWt_abstractElementFactory::createQPoleElement()
     113{
     114  if (isQPoleElementEnable) {
     115    return new GWt_elementQpole();
     116  }
     117  return NULL;
     118}
     119
     120GWt_elementSpole* GWt_abstractElementFactory::createSPoleElement()
     121{
     122  if (isSPoleElementEnable) {
     123    return new GWt_elementSpole();
     124  }
     125  return NULL;
     126}
     127
    108128vector <GWt_abstractElement*> GWt_abstractElementFactory::getAllElements()
    109129{
     
    136156    elems.push_back(new GWt_elementMpole());
    137157  }
     158  if (isQPoleElementEnable) {
     159    elems.push_back(new GWt_elementQpole());
     160  }
     161  if (isSPoleElementEnable) {
     162    elems.push_back(new GWt_elementSpole());
     163  }
    138164
    139165  return elems;
Note: See TracChangeset for help on using the changeset viewer.