Nemo  2.3.46
binarydataloader.h
Go to the documentation of this file.
1 
28 #ifndef BINARYDATALOADER_H
29 #define BINARYDATALOADER_H
30 
31 #include <string>
32 #include <map>
33 #include "binarystoragebuffer.h"
34 #include "fileparser.h"
35 #include "MPImanager.h"
36 
37 class SimBuilder;
38 class Metapop;
39 
42 
44 
46 
48 
50 
51  unsigned int _gen;
52 
53  std::string _filename;
54 
55  std::map<unsigned int, unsigned int> _offset_table;
56 
58 
59 public:
60 
61  BinaryDataLoader() : _current_sim(0),_buff(),_in_pop(0),
62  _new_sim(0),_gen(0),_filename(),_pExtractor(0)
63  { }
64 
66 
67  int extractOffsetTable (int FD);
68 
69  Metapop* extractPop (string& filename, unsigned int generation, SimBuilder* sim, Metapop* popPtr);
70 
71  Metapop* getPop ( ) const {return _in_pop;}
72 
73  unsigned int getGeneration ( ) const {return _gen;}
74 
75  void setGeneration (unsigned int gen) {_gen = gen;}
76 
77  const BinaryStorageBuffer* getBuffer ( ) const {return &_buff;}
78 
79  void clear ( );
80 };
81 #endif
Provides methods to build the user's selected set of life cycle events and traits from the parameters...
Definition: basicsimulation.h:162
SimBuilder * _new_sim
Definition: binarydataloader.h:49
void setGeneration(unsigned int gen)
Definition: binarydataloader.h:75
std::string _filename
Definition: binarydataloader.h:53
BinaryDataLoader()
Definition: binarydataloader.h:61
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:79
unsigned int getGeneration() const
Definition: binarydataloader.h:73
const BinaryStorageBuffer * getBuffer() const
Definition: binarydataloader.h:77
~BinaryDataLoader()
Definition: binarydataloader.cc:46
BinaryFileParser _pExtractor
Definition: binarydataloader.h:57
void clear()
Definition: binarydataloader.cc:51
unsigned int _gen
Definition: binarydataloader.h:51
BinaryStorageBuffer _buff
Definition: binarydataloader.h:45
A class to store any kind of data in a char buffer before unloading it in a binary data file...
Definition: binarystoragebuffer.h:40
A class to load a whole population from a binary data file.
Definition: binarydataloader.h:41
int extractOffsetTable(int FD)
Definition: binarydataloader.cc:60
Retrieves simulation parameters from a binary data file.
Definition: fileparser.h:51
Metapop * _in_pop
Definition: binarydataloader.h:47
Metapop * getPop() const
Definition: binarydataloader.h:71
std::map< unsigned int, unsigned int > _offset_table
Definition: binarydataloader.h:55
SimBuilder * _current_sim
Definition: binarydataloader.h:43
Metapop * extractPop(string &filename, unsigned int generation, SimBuilder *sim, Metapop *popPtr)
Definition: binarydataloader.cc:130

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