1e8d8bef9SDimitry Andric //===-- CommandObjectScript.h -----------------------------------*- C++ -*-===//
2e8d8bef9SDimitry Andric //
3e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e8d8bef9SDimitry Andric //
7e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
8e8d8bef9SDimitry Andric 
9e8d8bef9SDimitry Andric #ifndef LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
10e8d8bef9SDimitry Andric #define LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
11e8d8bef9SDimitry Andric 
12e8d8bef9SDimitry Andric #include "lldb/Interpreter/CommandObject.h"
13e8d8bef9SDimitry Andric 
14e8d8bef9SDimitry Andric namespace lldb_private {
15e8d8bef9SDimitry Andric 
16e8d8bef9SDimitry Andric class CommandObjectScript : public CommandObjectRaw {
17e8d8bef9SDimitry Andric public:
18e8d8bef9SDimitry Andric   CommandObjectScript(CommandInterpreter &interpreter);
19e8d8bef9SDimitry Andric   ~CommandObjectScript() override;
GetOptions()20e8d8bef9SDimitry Andric   Options *GetOptions() override { return &m_options; }
21e8d8bef9SDimitry Andric 
22e8d8bef9SDimitry Andric   class CommandOptions : public Options {
23e8d8bef9SDimitry Andric   public:
2481ad6265SDimitry Andric     CommandOptions() = default;
25e8d8bef9SDimitry Andric     ~CommandOptions() override = default;
26e8d8bef9SDimitry Andric     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
27e8d8bef9SDimitry Andric                           ExecutionContext *execution_context) override;
28e8d8bef9SDimitry Andric     void OptionParsingStarting(ExecutionContext *execution_context) override;
29e8d8bef9SDimitry Andric     llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
30e8d8bef9SDimitry Andric     lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
31e8d8bef9SDimitry Andric   };
32e8d8bef9SDimitry Andric 
33e8d8bef9SDimitry Andric protected:
34*c9157d92SDimitry Andric   void DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
35e8d8bef9SDimitry Andric 
36e8d8bef9SDimitry Andric private:
37e8d8bef9SDimitry Andric   CommandOptions m_options;
38e8d8bef9SDimitry Andric };
39e8d8bef9SDimitry Andric 
40e8d8bef9SDimitry Andric } // namespace lldb_private
41e8d8bef9SDimitry Andric 
42e8d8bef9SDimitry Andric #endif // LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
43