1 |
< |
#ifndef _ZCONSREADER_H_ |
2 |
< |
#define _ZCONSREADER_H_ |
1 |
> |
#ifndef IO_ZCONSREADER_HPP |
2 |
> |
#define IO_ZCONSREADER_HPP |
3 |
|
|
4 |
|
#include <fstream> |
5 |
|
#include <string> |
6 |
|
#include <vector> |
7 |
– |
|
7 |
|
#include "brains/SimInfo.hpp" |
8 |
< |
|
8 |
> |
#include "constraints/ZconsStruct.hpp" |
9 |
|
namespace oopse { |
10 |
|
|
11 |
+ |
|
12 |
|
/** |
13 |
|
* @class ZConsReader |
14 |
|
* @todo document |
17 |
|
public: |
18 |
|
|
19 |
|
ZConsReader(SimInfo* info); |
20 |
– |
ZConsReader(const std::string& filename); |
20 |
|
~ZConsReader(); |
21 |
|
|
23 |
– |
void readHeader(); |
22 |
|
void readNextFrame(); |
23 |
|
bool hasNextFrame(); |
24 |
< |
int getNumZMol(); |
25 |
< |
std::vector<int> getZConsIndex(); |
26 |
< |
std::vector<double> getZConsPos(); |
27 |
< |
//vector<double> getKRatio(); |
30 |
< |
|
31 |
< |
std::vector<double> getCurZPos(); |
32 |
< |
std::vector<double> getCurFZ(); |
33 |
< |
double getCurTime(); |
24 |
> |
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 |
|
|
29 |
|
private: |
30 |
|
|
31 |
< |
std::ifstream* istream; |
32 |
< |
SimInfo* info; |
33 |
< |
std::string zconsFileName; |
34 |
< |
|
35 |
< |
int nZMol; |
36 |
< |
std::vector<int> index; |
43 |
< |
std::vector<double> zconsPos; |
44 |
< |
//vector<double> kRatio; |
45 |
< |
|
46 |
< |
double curTime; |
47 |
< |
std::vector<double> curFZ; |
48 |
< |
std::vector<double> curZPos; |
49 |
< |
|
31 |
> |
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 |
|
}; |
38 |
|
|
39 |
|
} |