2 * Copyright 2006-2007, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
8 #ifndef COMMAND_STACK_H
9 #define COMMAND_STACK_H
19 class CommandStack
: public Notifier
{
21 CommandStack(RWLocker
* locker
);
22 virtual ~CommandStack();
24 status_t
Perform(Command
* command
);
29 bool GetUndoName(BString
& name
);
30 bool GetRedoName(BString
& name
);
37 status_t
_AddCommand(Command
* command
);
41 typedef std::stack
<Command
*> command_stack
;
43 command_stack fUndoHistory
;
44 command_stack fRedoHistory
;
45 Command
* fSavedCommand
;
48 #endif // COMMAND_STACK_H