index 02d54eb7693415fc361ba199f18abc1cddbf4e0a..cd00d421115f8274b2861699d2957e281dfc3b8f 100644 (file)
#ifndef __COMPOSITE_UNDO_COMMIT_OBSERVER_H__
#define __COMPOSITE_UNDO_COMMIT_OBSERVER_H__
+#include "gc-alloc.h"
+#include "gc-managed.h"
#include "undo-stack-observer.h"
#include <list>
this->_observer.notifyUndoCommitEvent(log);
}
+ /**
+ * Issue a clear undo event to the UndoStackObserver
+ * that is associated with this
+ * UndoStackObserverRecord.
+ */
+ void issueClearUndo()
+ {
+ this->_observer.notifyClearUndoEvent();
+ }
+
+ /**
+ * Issue a clear redo event to the UndoStackObserver
+ * that is associated with this
+ * UndoStackObserverRecord.
+ */
+ void issueClearRedo()
+ {
+ this->_observer.notifyClearRedoEvent();
+ }
+
private:
UndoStackObserver& _observer;
};
/// A list of UndoStackObserverRecords, used to aggregate multiple UndoStackObservers.
- typedef std::list< UndoStackObserverRecord > UndoObserverRecordList;
+ typedef std::list< UndoStackObserverRecord, GC::Alloc< UndoStackObserverRecord, GC::MANUAL > > UndoObserverRecordList;
/**
* Constructor.
*/
CompositeUndoStackObserver();
- ~CompositeUndoStackObserver();
+ virtual ~CompositeUndoStackObserver();
/**
* Add an UndoStackObserver.
*/
void notifyUndoCommitEvent(Event* log);
+ virtual void notifyClearUndoEvent();
+ virtual void notifyClearRedoEvent();
+
private:
// Remove an observer from a given list
bool _remove_one(UndoObserverRecordList& list, UndoStackObserver& rec);