blob: 4af857dccd5d2b47028222bc7f399af26197e704 [file] [log] [blame]
Enrico Granatac2a28252011-08-16 16:49:25 +00001//===-- CommandObjectPythonFunction.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_CommandObjectPythonFunction_h_
11#define liblldb_CommandObjectPythonFunction_h_
12
13// C Includes
14// C++ Includes
15// Other libraries and framework includes
16// Project includes
17#include "lldb/Interpreter/CommandObject.h"
18
19namespace lldb_private {
20
21//-------------------------------------------------------------------------
22// CommandObjectApropos
23//-------------------------------------------------------------------------
24
25class CommandObjectPythonFunction : public CommandObject
26{
27private:
28 std::string m_function_name;
29
30public:
31
32 CommandObjectPythonFunction (CommandInterpreter &interpreter,
33 std::string name,
34 std::string funct);
35
36 virtual
37 ~CommandObjectPythonFunction ();
38
39 virtual bool
40 ExecuteRawCommandString (const char *raw_command_line, CommandReturnObject &result);
41
42 virtual bool
43 WantsRawCommandString ()
44 {
45 return true;
46 }
47
48 bool
49 Execute (Args& command,
50 CommandReturnObject &result)
51 {
52 std::string cmd_string;
53 command.GetCommandString(cmd_string);
54 return ExecuteRawCommandString(cmd_string.c_str(), result);
55 }
56
57
58};
59
60} // namespace lldb_private
61
62#endif // liblldb_CommandObjectPythonFunction_h_