source: molecuilder/src/Actions/Action.hpp@ 53f5e6

Last change on this file since 53f5e6 was 32df34, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Added an action that allows grouping and grouped execution of several actions.

  • Property mode set to 100644
File size: 570 bytes
Line 
1/*
2 * Action.h
3 *
4 * Created on: Dec 8, 2009
5 * Author: crueger
6 */
7
8#ifndef ACTION_H_
9#define ACTION_H_
10
11/**
12 * Base class for all actions.
13 *
14 * Actions describe something that has to be done.
15 * Actions can be passed around, stored, performed and undone (Command-Pattern).
16 *
17 * TODO: Add queues of actions that have been performed to allow easy implementation of multiple-step undo
18 */
19class Action
20{
21protected:
22public:
23 Action();
24 virtual ~Action();
25
26 virtual void call()=0;
27 virtual void undo()=0;
28 virtual bool canUndo()=0;
29
30};
31
32#endif /* ACTION_H_ */
Note: See TracBrowser for help on using the repository browser.