LLDB mainline
OptionGroupFile.cpp
Go to the documentation of this file.
1//===-- OptionGroupFile.cpp -----------------------------------------------===//
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
10
12
13using namespace lldb;
14using namespace lldb_private;
15
16OptionGroupFile::OptionGroupFile(uint32_t usage_mask, bool required,
17 const char *long_option, int short_option,
18 uint32_t completion_type,
19 lldb::CommandArgumentType argument_type,
20 const char *usage_text) {
23 m_option_definition.long_option = long_option;
24 m_option_definition.short_option = short_option;
28 m_option_definition.completion_type = completion_type;
29 m_option_definition.argument_type = argument_type;
31}
32
34 llvm::StringRef option_arg,
35 ExecutionContext *execution_context) {
37 return error;
38}
39
41 ExecutionContext *execution_context) {
42 m_file.Clear();
43}
44
46 uint32_t usage_mask, bool required, const char *long_option,
47 int short_option, uint32_t completion_type,
48 lldb::CommandArgumentType argument_type, const char *usage_text)
49 : m_file_list() {
52 m_option_definition.long_option = long_option;
53 m_option_definition.short_option = short_option;
57 m_option_definition.completion_type = completion_type;
58 m_option_definition.argument_type = argument_type;
60}
61
63
66 llvm::StringRef option_value,
67 ExecutionContext *execution_context) {
69 return error;
70}
71
73 ExecutionContext *execution_context) {
75}
static llvm::raw_ostream & error(Stream &strm)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
OptionValueFileSpecList m_file_list
void OptionParsingStarting(ExecutionContext *execution_context) override
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)
void OptionParsingStarting(ExecutionContext *execution_context) override
OptionValueFileSpec m_file
OptionDefinition m_option_definition
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)
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
OptionValidator * validator
If non-NULL, option is valid iff |validator->IsValid()|, otherwise always valid.
const char * long_option
Full name for this option.
const char * usage_text
Full text explaining what this options does and what (if any) argument to pass it.
bool required
This option is required (in the current usage level).
uint32_t completion_type
The kind of completion for this option.
int option_has_arg
no_argument, required_argument or optional_argument
uint32_t usage_mask
Used to mark options that can be used together.
lldb::CommandArgumentType argument_type
Type of argument this option takes.
OptionEnumValues enum_values
If not empty, an array of enum values.
int short_option
Single character for this option.