Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame^] | 1 | //===-- CommandObjectQuit.h -------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef liblldb_CommandObjectQuit_h_ |
| 11 | #define liblldb_CommandObjectQuit_h_ |
| 12 | |
| 13 | // C Includes |
| 14 | // C++ Includes |
| 15 | // Other libraries and framework includes |
| 16 | // Project includes |
| 17 | #include "lldb/Interpreter/CommandObject.h" |
| 18 | |
| 19 | namespace lldb_private { |
| 20 | |
| 21 | //------------------------------------------------------------------------- |
| 22 | // CommandObjectQuit |
| 23 | //------------------------------------------------------------------------- |
| 24 | |
| 25 | // SPECIAL NOTE!! The CommandObjectQuit is special, because the actual function to execute |
| 26 | // when the user types 'quit' is passed (via function pointer) to the Command Interpreter when it |
| 27 | // is constructed. The function pointer is then stored in this CommandObjectQuit, and is invoked |
| 28 | // via the CommandObjectQuit::Execute function. This is the only command object that works this |
| 29 | // way; it was done this way because different Command Interpreter callers may want or need different things |
| 30 | // to be done in order to shut down properly. |
| 31 | |
| 32 | class CommandObjectQuit : public CommandObject |
| 33 | { |
| 34 | public: |
| 35 | |
| 36 | CommandObjectQuit (); |
| 37 | |
| 38 | virtual |
| 39 | ~CommandObjectQuit (); |
| 40 | |
| 41 | virtual bool |
| 42 | Execute (Args& command, |
| 43 | CommandContext *context, |
| 44 | CommandInterpreter *interpreter, |
| 45 | CommandReturnObject &result); |
| 46 | |
| 47 | }; |
| 48 | |
| 49 | } // namespace lldb_private |
| 50 | |
| 51 | #endif // liblldb_CommandObjectQuit_h_ |