Nemo  2.3.46
binarydatasaver.h
Go to the documentation of this file.
1 
29 #ifndef BINARYDATASAVER_H
30 #define BINARYDATASAVER_H
31 
32 #include <string>
33 #include <map>
34 #include "lifecycleevent.h"
35 #include "filehandler.h"
36 #include "binarystoragebuffer.h"
37 
45 
46 private:
47 
49 
52  unsigned int _generation;
53 
54  std::map<unsigned int, unsigned int> _offset_table;
55 
56  void printHeader();
57  void printData();
58  void storeData();
59  void finish();
60 
61 public:
62 
63  BinaryDataSaver ();
65 
66  static pid_t PID;
67 
68  //implements LifeCycleEvent:
69  virtual bool setParameters ();
70  virtual void execute ();
71  virtual BinaryDataSaver* clone ( ) {return new BinaryDataSaver();}
72  //implements FileHandler:
73  virtual void FHwrite ();
74  virtual void FHread (string& filename) {}
75  //implements SimComponent
76  virtual void loadFileServices ( FileServices* loader ) {loader->attach(this);}
77  virtual void loadStatServices ( StatServices* loader ) {}
78  virtual age_t removeAgeClass ( ) {return 0;}
79  virtual age_t addAgeClass ( ) {return 0;}
80  virtual age_t requiredAgeClass () {return 0;}
81 };
82 
83 #endif
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
Interface to handle file input/output for any SimComponent.
Definition: filehandler.h:53
std::string _comp_ext
Definition: binarydatasaver.h:50
void printHeader()
Definition: binarydatasaver.cc:199
virtual void attach(Handler *FH)
Attaches the FileHandler to the current list (_writers) of the FileServices.
Definition: fileservices.cc:57
~BinaryDataSaver()
Definition: binarydatasaver.h:64
bool _isPeriodic
Definition: binarydatasaver.h:51
virtual age_t addAgeClass()
Definition: binarydatasaver.h:79
virtual age_t removeAgeClass()
Definition: binarydatasaver.h:78
void finish()
Definition: binarydatasaver.cc:303
unsigned int age_t
Age class flags.
Definition: types.h:46
unsigned int _generation
Definition: binarydatasaver.h:52
void printData()
Definition: binarydatasaver.cc:250
static pid_t PID
Definition: binarydatasaver.h:66
A class to handle simulation data saving in binary format.
Definition: binarydatasaver.h:44
std::string _tar_cmd
Definition: binarydatasaver.h:50
virtual BinaryDataSaver * clone()
Definition: binarydatasaver.h:71
virtual void loadStatServices(StatServices *loader)
Definition: binarydatasaver.h:77
virtual void FHwrite()
Definition: binarydatasaver.cc:176
A class to store any kind of data in a char buffer before unloading it in a binary data file...
Definition: binarystoragebuffer.h:40
virtual void loadFileServices(FileServices *loader)
Definition: binarydatasaver.h:76
std::string _dir
Definition: binarydatasaver.h:50
virtual void execute()
Definition: binarydatasaver.cc:140
virtual void FHread(string &filename)
Definition: binarydatasaver.h:74
BinaryDataSaver()
Definition: binarydatasaver.cc:53
virtual bool setParameters()
Definition: binarydatasaver.cc:73
std::string _tar_ext
Definition: binarydatasaver.h:50
std::string _uncomp_cmd
Definition: binarydatasaver.h:50
std::map< unsigned int, unsigned int > _offset_table
Definition: binarydatasaver.h:54
virtual age_t requiredAgeClass()
Definition: binarydatasaver.h:80
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:51
std::string _comp_cmd
Definition: binarydatasaver.h:50
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:72
void storeData()
Definition: binarydatasaver.cc:223
BinaryStorageBuffer _buff
Definition: binarydatasaver.h:48

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR