Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
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
37class SimBuilder;
38class Metapop;
39
42
45
48
51
54
55 unsigned int _gen;
56
57 std::string _filename;
58
59// std::map<unsigned int, unsigned int> _offset_table;
60
62
63 unsigned int _generation_in_file;
64
66
67public:
68
72 { }
73
75
76 off_t extractOffsetTable (int FD);
77
78 Metapop* extractPop (string& filename, unsigned int generation, SimBuilder* sim, Metapop* popPtr);
79
80 Metapop* getPop ( ) const {return _in_pop;}
81
82 SimBuilder* getSim ( ) const {return _new_sim;}
83
84 unsigned int getGeneration ( ) const {return _gen;}
85
86 void setGeneration (unsigned int gen) {_gen = gen;}
87
88 const BinaryStorageBuffer* getBuffer ( ) const {return &_buff;}
89
90 void clear ( );
91};
92#endif
A class to load a whole population from a binary data file.
Definition: binarydataloader.h:41
Metapop * extractPop(string &filename, unsigned int generation, SimBuilder *sim, Metapop *popPtr)
Definition: binarydataloader.cc:163
unsigned int _generation_in_file
Definition: binarydataloader.h:63
BinaryStorageBuffer _buff
The data countainer into which the data will be copied.
Definition: binarydataloader.h:47
SimBuilder * _current_sim
Pointer to the current (calling) simulation object.
Definition: binarydataloader.h:44
BinaryFileParser _pExtractor
Definition: binarydataloader.h:65
std::string _filename
Definition: binarydataloader.h:57
Metapop * _in_pop
Pointer to the a newly created Metapop object used to retrieve the data.
Definition: binarydataloader.h:50
void clear()
Definition: binarydataloader.cc:53
off_t extractOffsetTable(int FD)
Definition: binarydataloader.cc:63
unsigned int _gen
Definition: binarydataloader.h:55
void setGeneration(unsigned int gen)
Definition: binarydataloader.h:86
off_t _offsetDataStart
Definition: binarydataloader.h:61
const BinaryStorageBuffer * getBuffer() const
Definition: binarydataloader.h:88
SimBuilder * getSim() const
Definition: binarydataloader.h:82
~BinaryDataLoader()
Definition: binarydataloader.cc:47
unsigned int getGeneration() const
Definition: binarydataloader.h:84
Metapop * getPop() const
Definition: binarydataloader.h:80
BinaryDataLoader()
Definition: binarydataloader.h:69
SimBuilder * _new_sim
Pointer to a new simulation builder to load the new simulation.
Definition: binarydataloader.h:53
Retrieves simulation parameters from a binary data file.
Definition: fileparser.h:51
A class to store any kind of data in a char buffer before unloading it in a binary data file.
Definition: binarystoragebuffer.h:44
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:80
Provides methods to build the user's selected set of life cycle events and traits from the parameters...
Definition: basicsimulation.h:168

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR