source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h @ 479

Last change on this file since 479 was 479, checked in by garnier, 10 years ago

Modification en vue du passage de Parmela. Restauration du fichier Phyl ok

File size: 1.7 KB
Line 
1#ifndef ABSTRACTSOFTWARE_SEEN
2#define ABSTRACTSOFTWARE_SEEN
3
4#include "globalParameters.h"
5#include "sectorParameters.h"
6#include "particleBeam.h"
7#include "nomDeLogiciel.h"
8#include "nomdElements.h"
9#include "trivaluedBool.h"
10
11#include <iostream>
12#include <string>
13
14using namespace std;
15
16class dataManager;
17class sectionToExecute;
18
19class abstractSoftware
20{
21
22 protected :
23 
24  dataManager* dataManager_;
25  string inputFileName_;
26  nomDeLogiciel nameOfSoftware_;
27
28  /**
29     Accepted elements list for this software
30  */
31  std::vector <nomdElements::typedElement> acceptedElements_;
32
33  /**
34     Ignore software list for this element
35  */
36  std::vector <nomdElements::typedElement> ignoredElements_;
37 
38  abstractSoftware();
39
40  bool launchJob(string commandLine, string& resul);
41  bool ComputationLimitsOk_deprecated() const;
42
43  void registerElement(nomdElements::typedElement nomdel,trivaluedBool b);
44
45  sectionToExecute* getSectionToExecute() {
46    return sectionToExecute_;
47  }
48
49  public :
50
51  abstractSoftware(string, sectionToExecute*, dataManager* );
52  ~abstractSoftware() {;}
53
54  inline const nomDeLogiciel* getNomDeLogiciel() const {
55    return &nameOfSoftware_;
56  }
57
58  trivaluedBool doAcceptElement(nomdElements::typedElement typdel);
59
60  virtual bool createInputFile(particleBeam* beamBefore, string workingDir) = 0;
61  virtual bool execute(string workingDir) = 0;
62  virtual bool buildBeamAfterElements(string workingDir) = 0;
63
64  /** Color of the background of this sofware
65      Should be a valid Css name as FFEEDD
66  */
67  virtual string getColor() = 0;
68 
69  /** Name of this software
70   */
71  inline string getName() const {
72    return nameOfSoftware_.getString();
73  }
74  private :
75  sectionToExecute* sectionToExecute_;
76 
77};
78#endif
Note: See TracBrowser for help on using the repository browser.