LLDB  mainline
OptionGroupFile.h
Go to the documentation of this file.
1 //===-- OptionGroupFile.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_INTERPRETER_OPTIONGROUPFILE_H
10 #define LLDB_INTERPRETER_OPTIONGROUPFILE_H
11 
15 
16 namespace lldb_private {
17 
18 // OptionGroupFile
19 
20 class OptionGroupFile : public OptionGroup {
21 public:
22  OptionGroupFile(uint32_t usage_mask, bool required, const char *long_option,
23  int short_option, uint32_t completion_type,
24  lldb::CommandArgumentType argument_type,
25  const char *usage_text);
26 
27  ~OptionGroupFile() override = default;
28 
29  llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
30  return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
31  }
32 
33  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
34  ExecutionContext *execution_context) override;
35 
36  void OptionParsingStarting(ExecutionContext *execution_context) override;
37 
39 
40  const OptionValueFileSpec &GetOptionValue() const { return m_file; }
41 
42 protected:
45 };
46 
47 // OptionGroupFileList
48 
50 public:
51  OptionGroupFileList(uint32_t usage_mask, bool required,
52  const char *long_option, int short_option,
53  uint32_t completion_type,
54  lldb::CommandArgumentType argument_type,
55  const char *usage_text);
56 
57  ~OptionGroupFileList() override;
58 
59  llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
60  return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
61  }
62 
63  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
64  ExecutionContext *execution_context) override;
65 
66  void OptionParsingStarting(ExecutionContext *execution_context) override;
67 
69 
71 
72 protected:
75 };
76 
77 } // namespace lldb_private
78 
79 #endif // LLDB_INTERPRETER_OPTIONGROUPFILE_H
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::OptionGroupFileList::GetOptionValue
OptionValueFileSpecList & GetOptionValue()
Definition: OptionGroupFile.h:68
lldb_private::OptionGroup
Definition: Options.h:233
lldb_private::OptionGroupFile::SetOptionValue
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Definition: OptionGroupFile.cpp:33
lldb_private::OptionGroupFile::m_option_definition
OptionDefinition m_option_definition
Definition: OptionGroupFile.h:44
lldb_private::OptionValueFileSpec
Definition: OptionValueFileSpec.h:20
lldb_private::OptionGroupFile::GetOptionValue
const OptionValueFileSpec & GetOptionValue() const
Definition: OptionGroupFile.h:40
Options.h
lldb::CommandArgumentType
CommandArgumentType
Definition: lldb-enumerations.h:515
lldb_private::OptionGroupFileList::m_file_list
OptionValueFileSpecList m_file_list
Definition: OptionGroupFile.h:73
lldb_private::OptionGroupFileList::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: OptionGroupFile.cpp:72
lldb_private::OptionGroupFile::GetOptionValue
OptionValueFileSpec & GetOptionValue()
Definition: OptionGroupFile.h:38
lldb_private::OptionGroupFileList::m_option_definition
OptionDefinition m_option_definition
Definition: OptionGroupFile.h:74
lldb_private::OptionGroupFileList::SetOptionValue
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Definition: OptionGroupFile.cpp:65
lldb_private::OptionGroupFileList::OptionGroupFileList
OptionGroupFileList(uint32_t usage_mask, bool required, const char *long_option, int short_option, uint32_t completion_type, lldb::CommandArgumentType argument_type, const char *usage_text)
Definition: OptionGroupFile.cpp:45
lldb_private::OptionGroupFileList::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: OptionGroupFile.h:59
lldb_private::Status
Definition: Status.h:44
lldb_private::OptionGroupFile
Definition: OptionGroupFile.h:20
uint32_t
lldb_private::OptionGroupFile::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: OptionGroupFile.h:29
lldb_private::OptionGroupFileList
Definition: OptionGroupFile.h:49
lldb_private::OptionGroupFile::~OptionGroupFile
~OptionGroupFile() override=default
lldb_private::OptionGroupFileList::~OptionGroupFileList
~OptionGroupFileList() override
lldb_private::OptionValueFileSpecList
Definition: OptionValueFileSpecList.h:19
lldb_private::OptionGroupFile::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: OptionGroupFile.cpp:40
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::OptionDefinition
Definition: OptionDefinition.h:20
OptionValueFileSpecList.h
lldb_private::OptionGroupFileList::GetOptionValue
const OptionValueFileSpecList & GetOptionValue() const
Definition: OptionGroupFile.h:70
OptionValueFileSpec.h
lldb_private::OptionGroupFile::m_file
OptionValueFileSpec m_file
Definition: OptionGroupFile.h:43
lldb_private::OptionGroupFile::OptionGroupFile
OptionGroupFile(uint32_t usage_mask, bool required, const char *long_option, int short_option, uint32_t completion_type, lldb::CommandArgumentType argument_type, const char *usage_text)
Definition: OptionGroupFile.cpp:16