Changeset 50 in PSPA for Interface_Web/trunk/pspaWT/include


Ignore:
Timestamp:
Nov 3, 2012, 12:15:30 PM (12 years ago)
Author:
lemeur
Message:

implementation d'une persistence

Location:
Interface_Web/trunk/pspaWT/include
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/include/GWt_LigneFaisceau.h

    r48 r50  
    44#include "dataManager.h"
    55#include "GWt_pspaApplication.h"
     6#include "abstractElement.h"
    67
    78#include <Wt/WApplication>
     
    2223{
    2324
     25  //  WVBoxLayout* tempVBox_;
    2426  WHBoxLayout* beamLayout_;
    2527  //  dataManager* dtmanage_;
     
    2830public:
    2931  GWt_LigneFaisceau(PspaApplication*);
    30 
     32  void restoreElementCollection();
    3133private:
    3234  void dropEvent(WDropEvent evt);
  • Interface_Web/trunk/pspaWT/include/GWt_globalParameters.h

    r41 r50  
    3232    GWt_globalParameters(PspaApplication* ps);
    3333
     34    void updateGlobals();
     35
     36
     37    void renew();
    3438
    3539  void lancerCalcul();
  • Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h

    r41 r50  
    3535    return dtmanage_;
    3636  }
    37 
     37  void sauver();
     38  void restaurer();
    3839 private :
    3940  WTextArea* console_;
    4041  dataManager* dtmanage_;
     42  WWidget* globalParam_;
     43  WWidget* beamLine_;
    4144};
    4245
  • Interface_Web/trunk/pspaWT/include/abstractElement.h

    r48 r50  
    55#include <sstream>
    66#include <string>
    7 
    87
    98#include "mathematicalTools.h"
     
    108107 virtual string parmelaOutputFlow() const =0;
    109108
     109
    110110 virtual double getInitialKineticEnergy() const {return 0.0;}
     111
     112
     113 virtual string FileOutputFlow() const=0;
     114 virtual void FileInput(ifstream& ifs) = 0;
    111115
    112116};
  • Interface_Web/trunk/pspaWT/include/dataManager.h

    r48 r50  
    55#include "elementsCollection.h"
    66#include "globalParameters.h"
    7 //#include "driftDefinition.h"
     7#include "nomdElements.h"
    88//using namespace std;
    99
     
    2626  inline int beamLineSize() {return elementsGallery_.size();}
    2727  inline globalParameters* getGlobalParameters()  {return &globParam_;}
     28  inline elementsCollection* getCollection() {return &elementsGallery_;}
     29  abstractElement* addElement(nomdElement elemType);
    2830  abstractElement* addCell();
    2931  abstractElement* addDrift();
    3032  abstractElement* addInitialBeam();
    3133  void executeAll();
     34  void saveAll();
     35  void restoreAll();
     36
    3237};
    3338
  • Interface_Web/trunk/pspaWT/include/elementBend.h

    r45 r50  
    5151  }
    5252
     53virtual  string FileOutputFlow() const
     54  {
     55    ostringstream sortie;
     56    cout << " BEND sortie fichier non programmee " << endl;
     57    return sortie.str();
     58  }
    5359
     60
     61 virtual void FileInput(ifstream& ifs)
     62 {
     63    cout << " BEND lecture fichier non programmee " << endl;
     64 }
    5465};
    5566
  • Interface_Web/trunk/pspaWT/include/elementCell.h

    r48 r50  
    33
    44#include <string>
     5#include <fstream>
    56#include "abstractElement.h"
    67
     
    5051  virtual  string parmelaOutputFlow() const;
    5152
     53  virtual string FileOutputFlow() const;
     54
     55  virtual void FileInput(ifstream& ifs);
    5256
    5357};
  • Interface_Web/trunk/pspaWT/include/elementDrift.h

    r45 r50  
    44
    55#include "abstractElement.h"
    6 
    76
    87using namespace std;
     
    2726  virtual  string parmelaOutputFlow() const;
    2827
     28  virtual string FileOutputFlow() const;
     29
     30  virtual void FileInput(ifstream& ifs);
     31
    2932};
    3033
  • Interface_Web/trunk/pspaWT/include/elementInitialBeam.h

    r45 r50  
    66
    77#include "abstractElement.h"
     8
    89
    910using namespace std;
     
    5253 virtual string parmelaOutputFlow() const;
    5354
     55 virtual string FileOutputFlow() const;
     56
     57 virtual void FileInput(ifstream& ifs);
     58
     59
    5460};
    5561
  • Interface_Web/trunk/pspaWT/include/elementSoleno.h

    r45 r50  
    5151  }
    5252
     53
     54virtual  string FileOutputFlow() const
     55  {
     56    ostringstream sortie;
     57    cout << " SOLENO sortie fichier non progerammee " << endl;
     58    return sortie.str();
     59  }
     60
     61virtual void FileInput(ifstream& ifs)
     62{
     63    cout << " SOLENO lecture fichier non programmee " << endl;
     64}
     65
    5366};
    5467#endif
  • Interface_Web/trunk/pspaWT/include/elementsCollection.h

    r48 r50  
    3434      }
    3535  }
     36
     37 inline void raz()
     38 {
     39   unsigned int k;
     40   for (k=0; k < elements_.size(); k++)
     41     {
     42        if ( elements_[k] != NULL ) delete elements_[k];       
     43     }
     44   elements_.clear();
     45 }
    3646
    3747 inline int size() { return elements_.size(); }
  • Interface_Web/trunk/pspaWT/include/globalParameters.h

    r42 r50  
    44#include <iostream>
    55#include <string>
     6#include <fstream>
    67
    78
    89using namespace std;
    910
    10 class globalParameters
     11class globalParameters 
    1112
    1213{
     
    5152}
    5253
     54 inline void raz() { setDefaults();}
     55
    5356 inline double getFrequency() const {return frequency_;}
    5457 inline double getIntegrationStep() const {return integrationStep_;}
     
    6265 void setParametersString(string* param);
    6366
     67 string FileOutputFlow() const;
     68
     69 void FileInput(ifstream& ifs);
     70
     71
    6472};
    6573
  • Interface_Web/trunk/pspaWT/include/nomdElements.h

    r38 r50  
    22#define NOMDELEMENTS_SEEN
    33
     4#include <string>
     5
     6using namespace std;
    47
    58typedef enum
Note: See TracChangeset for help on using the changeset viewer.