1 |
tim |
1911 |
#ifndef IO_ZCONSREADER_HPP
|
2 |
|
|
#define IO_ZCONSREADER_HPP
|
3 |
gezelter |
1490 |
|
4 |
|
|
#include <fstream>
|
5 |
|
|
#include <string>
|
6 |
|
|
#include <vector>
|
7 |
tim |
1492 |
#include "brains/SimInfo.hpp"
|
8 |
tim |
1911 |
#include "constraints/ZconsStruct.hpp"
|
9 |
tim |
1818 |
namespace oopse {
|
10 |
gezelter |
1490 |
|
11 |
tim |
1911 |
|
12 |
tim |
1818 |
/**
|
13 |
|
|
* @class ZConsReader
|
14 |
|
|
* @todo document
|
15 |
|
|
*/
|
16 |
gezelter |
1490 |
class ZConsReader{
|
17 |
|
|
public:
|
18 |
|
|
|
19 |
|
|
ZConsReader(SimInfo* info);
|
20 |
|
|
~ZConsReader();
|
21 |
|
|
|
22 |
|
|
void readNextFrame();
|
23 |
|
|
bool hasNextFrame();
|
24 |
tim |
1911 |
int getNZMols() {return allZmols_.size();}
|
25 |
|
|
int getNFixedZmols() {return fixedZmolData_.size();}
|
26 |
|
|
const std::vector<ZconsData>& getFixedZMolData() {return fixedZmolData_; }
|
27 |
|
|
double getCurTime() {return curTime_; }
|
28 |
gezelter |
1490 |
|
29 |
|
|
private:
|
30 |
tim |
1818 |
|
31 |
tim |
1911 |
std::ifstream istream_;
|
32 |
|
|
SimInfo* info_;
|
33 |
|
|
std::vector<int> allZmols_;
|
34 |
|
|
double curTime_;
|
35 |
|
|
std::vector<ZconsData> fixedZmolData_;
|
36 |
|
|
const static int MAXBUFFERSIZE = 2000;
|
37 |
gezelter |
1490 |
};
|
38 |
|
|
|
39 |
tim |
1818 |
}
|
40 |
gezelter |
1490 |
#endif
|