Nemo  2.4.2
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
binarydataloader.h
Go to the documentation of this file.
1 
26 #ifndef BINARYDATALOADER_H
27 #define BINARYDATALOADER_H
28 
29 #include <string>
30 #include <map>
31 #include "binarystoragebuffer.h"
32 #include "fileparser.h"
33 #include "MPImanager.h"
34 
35 class SimBuilder;
36 class Metapop;
37 
40 
43 
46 
49 
52 
53  unsigned int _gen;
54 
55  std::string _filename;
56 
57 // std::map<unsigned int, unsigned int> _offset_table;
58 
60 
61  unsigned int _generation_in_file;
62 
64 
65 public:
66 
70  { }
71 
73 
74  off_t extractOffsetTable (int FD);
75 
76  Metapop* extractPop (string& filename, unsigned int generation, SimBuilder* sim, Metapop* popPtr);
77 
78  Metapop* getPop ( ) const {return _in_pop;}
79 
80  SimBuilder* getSim ( ) const {return _new_sim;}
81 
82  unsigned int getGeneration ( ) const {return _gen;}
83 
84  void setGeneration (unsigned int gen) {_gen = gen;}
85 
86  const BinaryStorageBuffer* getBuffer ( ) const {return &_buff;}
87 
88  void clear ( );
89 };
90 #endif
A class to load a whole population from a binary data file.
Definition: binarydataloader.h:39
SimBuilder * getSim() const
Definition: binarydataloader.h:80
Metapop * extractPop(string &filename, unsigned int generation, SimBuilder *sim, Metapop *popPtr)
Definition: binarydataloader.cc:161
unsigned int _generation_in_file
Definition: binarydataloader.h:61
BinaryStorageBuffer _buff
The data countainer into which the data will be copied.
Definition: binarydataloader.h:45
SimBuilder * _current_sim
Pointer to the current (calling) simulation object.
Definition: binarydataloader.h:42
BinaryFileParser _pExtractor
Definition: binarydataloader.h:63
std::string _filename
Definition: binarydataloader.h:55
Metapop * _in_pop
Pointer to the a newly created Metapop object used to retrieve the data.
Definition: binarydataloader.h:48
void clear()
Definition: binarydataloader.cc:51
off_t extractOffsetTable(int FD)
Definition: binarydataloader.cc:61
unsigned int _gen
Definition: binarydataloader.h:53
void setGeneration(unsigned int gen)
Definition: binarydataloader.h:84
Metapop * getPop() const
Definition: binarydataloader.h:78
off_t _offsetDataStart
Definition: binarydataloader.h:59
~BinaryDataLoader()
Definition: binarydataloader.cc:45
unsigned int getGeneration() const
Definition: binarydataloader.h:82
BinaryDataLoader()
Definition: binarydataloader.h:67
SimBuilder * _new_sim
Pointer to a new simulation builder to load the new simulation.
Definition: binarydataloader.h:51
const BinaryStorageBuffer * getBuffer() const
Definition: binarydataloader.h:86
Retrieves simulation parameters from a binary data file.
Definition: fileparser.h:49
A class to store any kind of data in a char buffer before unloading it in a binary data file.
Definition: binarystoragebuffer.h:42
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:78
Provides methods to build the user's selected set of life cycle events and traits from the parameters...
Definition: basicsimulation.h:166

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR