--- trunk/OOPSE-3.0/src/brains/SnapshotManager.hpp 2004/10/22 23:09:57 1639 +++ trunk/OOPSE-3.0/src/brains/SnapshotManager.hpp 2004/10/25 04:08:14 1642 @@ -47,36 +47,50 @@ namespace oopse{ */ class SnapshotManager { public: - + SnapshotManager() : currentSnapshot_(NULL), previousSnapshot_(NULL) { + } + virtual ~SnapshotManager(); virtual bool advance() = 0; - Snapshot* getSnapshot(int id); - - Snapshot* getPrevSnapshot(); + virtual Snapshot* getSnapshot(int id) = 0; - void setCurrentSnapshot(); - - Snapshot* getCurrentSnapshot(); + /** + * Returns the pointer of previous snapshot + * @return the pointer of previous snapshot + */ + Snapshot* getPrevSnapshot() { + return previousSnapshot_; + } - void setCurrentSnapshot(); + /** + * Returns the pointer of current snapshot + * @return the pointer of current snapshot + */ + Snapshot* getCurrentSnapshot() { + return currentSnapshot_; + } int getCapacity(); - void setCapacity(); + virtual void setCapacity(int capacity); - void getNotifyStatus(); + bool getNotifyStatus(); - void setNotifyStatus(); + void setNotifyStatus(bool status); void attach(SnapshotObserver*); void detach(SnapshotObserver*); void notify(); + + protected: + Snapshot* currentSnapshot_; + Snapshot* previousSnapshot_; private: - vector snapshots_; vector observers_; + }; }