| 40 |
|
*/ |
| 41 |
|
#ifndef BRAINS_BLOCKSNAPSHOTMANAGER_HPP |
| 42 |
|
#define BRAINS_BLOCKSNAPSHOTMANAGER_HPP |
| 43 |
+ |
#include <vector> |
| 44 |
|
|
| 45 |
|
#include "brains/SnapshotManager.hpp" |
| 46 |
|
namespace oopse { |
| 60 |
|
BlockSnapshotMananger(SimInfo* info, const std::string& filename, int storageLayout, int blockCapacity = 2); |
| 61 |
|
~BlockSnapshotMananger(); |
| 62 |
|
|
| 63 |
< |
virtual Snapshot* getSnapshot(int id); |
| 63 |
> |
virtual Snapshot* getSnapshot(int id) { return snapshots_[id]; } |
| 64 |
|
|
| 65 |
|
/** Returns number of snapshot blocks in this BlockSnapshotManager*/ |
| 66 |
|
int getNBlocks() { |
| 85 |
|
return blockCapacity_; |
| 86 |
|
} |
| 87 |
|
|
| 88 |
< |
int getNFrames() { |
| 88 |
< |
return reader_->getNFrames(); |
| 89 |
< |
} |
| 88 |
> |
int getNFrames(); |
| 89 |
|
|
| 90 |
|
private: |
| 91 |
|
|
| 92 |
|
Snapshot* loadFrame(int frame); |
| 93 |
|
|
| 94 |
|
SimInfo* info_; |
| 96 |
– |
int storageLayout_; |
| 95 |
|
int blockCapacity_; |
| 96 |
|
|
| 97 |
|
std::vector<Snapshot*> snapshots_; |