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 
14 #ifndef _QuitCommand_h
15 #define _QuitCommand_h
16 
17 
18 #include "ConfirmedCommand.h"
19 
20 
21 //
22 // Class name definition:
23 //
24 #define ClassQuitCommand	"QuitCommand"
25 
26 
27 class Application;
28 
29 
30 //
31 // QuitCommand class definition:
32 //
33 class QuitCommand : public ConfirmedCommand
34 {
35   private:
36     Application *application;
37   protected:
38     //
39     // Implements the command:
40     //   Queries the user for confirmation of the command.
41     //   If affirmatively confirmed, the command terminates
42     //   the application program.
43     //
44     virtual boolean doIt(CommandInterface *ci);
45 
46   public:
47     //
48     // Constructor:
49     //
50     QuitCommand(Application*  app,
51 		const char*   name,
52 		CommandScope* scope,
53 		boolean       active,
54 		char*         dialogTitle,
55 		char*         dialogQuestion);
56 
57     //
58     // Destructor:
59     //
~QuitCommand()60     ~QuitCommand(){}
61 
62     //
63     // Returns a pointer to the class name.
64     //
getClassName()65     const char* getClassName()
66     {
67 	return ClassQuitCommand;
68     }
69 };
70 
71 
72 #endif // _QuitCommand_h
73