1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 #include "../base/defines.h"
11 
12 
13 #ifndef _DeleteNodeCommand_h
14 #define _DeleteNodeCommand_h
15 
16 
17 #include "NoUndoCommand.h"
18 
19 
20 //
21 // Class name definition:
22 //
23 #define ClassDeleteNodeCommand	"DeleteNodeCommand"
24 
25 
26 class EditorWindow;
27 class List;
28 
29 //
30 // DeleteNodeCommand class definition:
31 //
32 class DeleteNodeCommand : public NoUndoCommand
33 {
34   private:
35 
36   protected:
37 
38     EditorWindow *editor;
39     List	*toDelete;	// Buffer of nodes to restore on undo.
40 
41     virtual boolean doIt(CommandInterface *ci);
42 
43   public:
44     //
45     // Constructor:
46     //
47     DeleteNodeCommand(const char*   name,
48 		      CommandScope* scope,
49 		      boolean	active,
50                       EditorWindow* editor);
51 
52     //
53     // Destructor:
54     //
~DeleteNodeCommand()55     ~DeleteNodeCommand(){}
56 
57     //
58     // Returns a pointer to the class name.
59     //
getClassName()60     const char* getClassName()
61     {
62 	return ClassDeleteNodeCommand;
63     }
64 };
65 
66 
67 #endif // _DeleteNodeCommand_h
68