| 45 |
|
#include <string> |
| 46 |
|
#include "brains/SimInfo.hpp" |
| 47 |
|
|
| 48 |
< |
class StaticAnalyser{ |
| 49 |
< |
public: |
| 50 |
< |
StaticAnalyser(SimInfo* info, const std::string& filename) : info_(info), currentSnapshot_(NULL), dumpFilename_(filename), step_(1) {} |
| 51 |
< |
virtual ~StaticAnalyser() {} |
| 52 |
< |
virtual void process()=0; |
| 48 |
> |
class StaticAnalyser{ |
| 49 |
> |
public: |
| 50 |
> |
StaticAnalyser(SimInfo* info, const std::string& filename) : info_(info), currentSnapshot_(NULL), dumpFilename_(filename), step_(1), usePeriodicBoundaryConditions_(info->getSimParams()->getUsePeriodicBoundaryConditions()) {} |
| 51 |
> |
virtual ~StaticAnalyser() {} |
| 52 |
> |
virtual void process()=0; |
| 53 |
|
|
| 54 |
< |
void setOutputName(const std::string& filename) { |
| 55 |
< |
outputFilename_ = filename; |
| 56 |
< |
} |
| 54 |
> |
void setOutputName(const std::string& filename) { |
| 55 |
> |
outputFilename_ = filename; |
| 56 |
> |
} |
| 57 |
|
|
| 58 |
< |
const std::string& getOutputFileName() const { |
| 59 |
< |
return outputFilename_; |
| 60 |
< |
} |
| 58 |
> |
const std::string& getOutputFileName() const { |
| 59 |
> |
return outputFilename_; |
| 60 |
> |
} |
| 61 |
|
|
| 62 |
< |
void setStep(int step) { |
| 63 |
< |
assert(step > 0); |
| 64 |
< |
step_ =step; |
| 65 |
< |
} |
| 62 |
> |
void setStep(int step) { |
| 63 |
> |
assert(step > 0); |
| 64 |
> |
step_ =step; |
| 65 |
> |
} |
| 66 |
|
|
| 67 |
< |
int getStep() { return step_;} |
| 67 |
> |
int getStep() { return step_;} |
| 68 |
|
|
| 69 |
< |
protected: |
| 70 |
< |
SimInfo* info_; |
| 71 |
< |
Snapshot* currentSnapshot_; |
| 72 |
< |
std::string dumpFilename_; |
| 73 |
< |
std::string outputFilename_; |
| 74 |
< |
int step_; |
| 75 |
< |
}; |
| 69 |
> |
protected: |
| 70 |
> |
SimInfo* info_; |
| 71 |
> |
Snapshot* currentSnapshot_; |
| 72 |
> |
std::string dumpFilename_; |
| 73 |
> |
std::string outputFilename_; |
| 74 |
> |
int step_; |
| 75 |
> |
bool usePeriodicBoundaryConditions_; |
| 76 |
> |
}; |
| 77 |
|
|
| 78 |
|
} |
| 79 |
|
#endif |