1 //===-- CommandObjectScript.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_CommandObjectScript_h_
11 #define liblldb_CommandObjectScript_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 // CommandObjectScript
23 //-------------------------------------------------------------------------
24 
25 class CommandObjectScript : public CommandObject
26 {
27 public:
28 
29     CommandObjectScript (lldb::ScriptLanguage script_lang);
30 
31     virtual
32     ~CommandObjectScript ();
33 
34     bool WantsRawCommandString();
35 
36     virtual bool
37     ExecuteRawCommandString (const char *command,
38              CommandContext *context,
39              CommandInterpreter *interpreter,
40              CommandReturnObject &result);
41 
42     virtual bool
43     Execute (Args& command,
44              CommandContext *context,
45              CommandInterpreter *interpreter,
46              CommandReturnObject &result);
47 
48     ScriptInterpreter *
49     GetInterpreter ();
50 
51 private:
52     lldb::ScriptLanguage m_script_lang;
53     std::auto_ptr<ScriptInterpreter> m_interpreter_ap;
54 };
55 
56 } // namespace lldb_private
57 
58 #endif  // liblldb_CommandObjectScript_h_
59