69 |
|
delete previousSnapshot_; |
70 |
|
} |
71 |
|
|
72 |
< |
virtual bool advance() = 0; |
72 |
> |
virtual bool advance() { return true; } |
73 |
|
|
74 |
|
virtual Snapshot* getSnapshot(int id) = 0; |
75 |
|
|
88 |
|
Snapshot* getCurrentSnapshot() { |
89 |
|
return currentSnapshot_; |
90 |
|
} |
91 |
– |
|
92 |
– |
virtual int getCapacity() = 0; |
91 |
|
|
92 |
< |
virtual void setCapacity(int capacity) = 0; |
92 |
> |
int getStorageLayout() { |
93 |
> |
return storageLayout_; |
94 |
> |
} |
95 |
|
|
96 |
– |
//bool getNotifyStatus(); |
97 |
– |
|
98 |
– |
//void setNotifyStatus(bool status); |
99 |
– |
|
100 |
– |
//void attach(SnapshotObserver*); |
101 |
– |
|
102 |
– |
//void detach(SnapshotObserver*); |
103 |
– |
|
104 |
– |
//void notify(); |
105 |
– |
|
96 |
|
protected: |
97 |
|
|
98 |
< |
SnapshotManager() : currentSnapshot_(NULL), previousSnapshot_(NULL) { |
98 |
> |
SnapshotManager(int storageLayout) : storageLayout_(storageLayout), currentSnapshot_(NULL), previousSnapshot_(NULL) { |
99 |
|
} |
100 |
|
|
101 |
|
Snapshot* currentSnapshot_; |
102 |
|
Snapshot* previousSnapshot_; |
103 |
|
|
104 |
|
private: |
105 |
< |
//vector<SnapshotObserver*> observers_; |
105 |
> |
int storageLayout_; |
106 |
|
|
107 |
|
}; |
108 |
|
|