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