LLDB  mainline
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
lldb_private::OptionGroupOptions Class Reference

#include <Options.h>

Inheritance diagram for lldb_private::OptionGroupOptions:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::OptionGroupOptions:
Collaboration graph
[legend]

Classes

struct  OptionInfo
 

Public Types

typedef std::vector< OptionInfoOptionInfos
 

Public Member Functions

 OptionGroupOptions ()
 
 ~OptionGroupOptions () override=default
 
void Append (OptionGroup *group)
 Append options from a OptionGroup class. More...
 
void Append (OptionGroup *group, uint32_t src_mask, uint32_t dst_mask)
 Append options from a OptionGroup class. More...
 
void Finalize ()
 
bool DidFinalize ()
 
Status SetOptionValue (uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
 Set the value of an option. More...
 
void OptionParsingStarting (ExecutionContext *execution_context) override
 
Status OptionParsingFinished (ExecutionContext *execution_context) override
 
llvm::ArrayRef< OptionDefinition > GetDefinitions () override
 
const OptionGroupGetGroupWithOption (char short_opt)
 
- Public Member Functions inherited from lldb_private::Options
 Options ()
 
virtual ~Options ()
 
void BuildGetoptTable ()
 
void BuildValidOptionSets ()
 
uint32_t NumCommandOptions ()
 
OptionGetLongOptions ()
 Get the option definitions to use when parsing Args options. More...
 
void OptionSeen (int short_option)
 
bool VerifyOptions (CommandReturnObject &result)
 
bool VerifyPartialOptions (CommandReturnObject &result)
 
void OutputFormattedUsageText (Stream &strm, const OptionDefinition &option_def, uint32_t output_max_columns)
 
void GenerateOptionUsage (Stream &strm, CommandObject *cmd, uint32_t screen_width)
 
bool SupportsLongOption (const char *long_option)
 
void NotifyOptionParsingStarting (ExecutionContext *execution_context)
 
llvm::Expected< ArgsParse (const Args &args, ExecutionContext *execution_context, lldb::PlatformSP platform_sp, bool require_validation)
 Parse the provided arguments. More...
 
llvm::Expected< ArgsParseAlias (const Args &args, OptionArgVector *option_arg_vector, std::string &input_line)
 
OptionElementVector ParseForCompletion (const Args &args, uint32_t cursor_index)
 
Status NotifyOptionParsingFinished (ExecutionContext *execution_context)
 
bool HandleOptionCompletion (lldb_private::CompletionRequest &request, OptionElementVector &option_map, CommandInterpreter &interpreter)
 Handles the generic bits of figuring out whether we are in an option, and if so completing it. More...
 
virtual bool HandleOptionArgumentCompletion (lldb_private::CompletionRequest &request, OptionElementVector &opt_element_vector, int opt_element_index, CommandInterpreter &interpreter)
 Handles the generic bits of figuring out whether we are in an option, and if so completing it. More...
 

Public Attributes

std::vector< OptionDefinition > m_option_defs
 
OptionInfos m_option_infos
 
bool m_did_finalize
 

Additional Inherited Members

- Protected Types inherited from lldb_private::Options
typedef std::set< int > OptionSet
 
typedef std::vector< OptionSetOptionSetVector
 
- Protected Member Functions inherited from lldb_private::Options
OptionSetVectorGetRequiredOptions ()
 
OptionSetVectorGetOptionalOptions ()
 
bool IsASubset (const OptionSet &set_a, const OptionSet &set_b)
 
size_t OptionsSetDiff (const OptionSet &set_a, const OptionSet &set_b, OptionSet &diffs)
 
void OptionsSetUnion (const OptionSet &set_a, const OptionSet &set_b, OptionSet &union_set)
 
- Protected Attributes inherited from lldb_private::Options
std::vector< Optionm_getopt_table
 
OptionSet m_seen_options
 
OptionSetVector m_required_options
 
OptionSetVector m_optional_options
 

Detailed Description

Definition at line 267 of file Options.h.

Member Typedef Documentation

◆ OptionInfos

Definition at line 329 of file Options.h.

Constructor & Destructor Documentation

◆ OptionGroupOptions()

lldb_private::OptionGroupOptions::OptionGroupOptions ( )
inline

Definition at line 269 of file Options.h.

◆ ~OptionGroupOptions()

lldb_private::OptionGroupOptions::~OptionGroupOptions ( )
overridedefault

Member Function Documentation

◆ Append() [1/2]

void OptionGroupOptions::Append ( OptionGroup group)

Append options from a OptionGroup class.

Append all options from group using the exact same option groups that each option is defined with.

Parameters
[in]groupA group of options to take option values from and copy their definitions into this class.

Definition at line 843 of file Options.cpp.

References lldb_private::OptionGroup::GetDefinitions().

Referenced by CommandObjectCommandsAlias::CommandObjectCommandsAlias(), lldb_private::CommandObjectExpression::CommandObjectExpression(), CommandObjectProcessKDPPacketSend::CommandObjectProcessKDPPacketSend(), CommandObjectTypeFormatAdd::CommandObjectTypeFormatAdd(), and CommandObjectTypeLookup::CommandObjectTypeLookup().

◆ Append() [2/2]

void OptionGroupOptions::Append ( OptionGroup group,
uint32_t  src_mask,
uint32_t  dst_mask 
)

Append options from a OptionGroup class.

Append options from group that have a usage mask that has any bits in "src_mask" set. After the option definition is copied into the options definitions in this class, set the usage_mask to "dst_mask".

Parameters
[in]groupA group of options to take option values from and copy their definitions into this class.
[in]src_maskWhen copying options from group, you might only want some of the options to be appended to this group. This mask allows you to control which options from group get added. It also allows you to specify the same options from group multiple times for different option sets.
[in]dst_maskSet the usage mask for any copied options to dst_mask after copying the option definition.

Definition at line 860 of file Options.cpp.

References lldb_private::OptionGroup::GetDefinitions().

◆ DidFinalize()

bool lldb_private::OptionGroupOptions::DidFinalize ( )
inline

Definition at line 308 of file Options.h.

◆ Finalize()

void OptionGroupOptions::Finalize ( )

◆ GetDefinitions()

llvm::ArrayRef<OptionDefinition> lldb_private::OptionGroupOptions::GetDefinitions ( )
inlineoverridevirtual

Reimplemented from lldb_private::Options.

Definition at line 317 of file Options.h.

◆ GetGroupWithOption()

const OptionGroup * OptionGroupOptions::GetGroupWithOption ( char  short_opt)

Definition at line 851 of file Options.cpp.

◆ OptionParsingFinished()

Status OptionGroupOptions::OptionParsingFinished ( ExecutionContext execution_context)
overridevirtual

◆ OptionParsingStarting()

void OptionGroupOptions::OptionParsingStarting ( ExecutionContext execution_context)
overridevirtual

Implements lldb_private::Options.

Definition at line 894 of file Options.cpp.

References lldb_private::OptionGroup::OptionParsingStarting().

◆ SetOptionValue()

Status OptionGroupOptions::SetOptionValue ( uint32_t  option_idx,
llvm::StringRef  option_arg,
ExecutionContext execution_context 
)
overridevirtual

Set the value of an option.

Parameters
[in]option_idxThe index into the "struct option" array that was returned by Options::GetLongOptions().
[in]option_argThe argument value for the option that the user entered, or nullptr if there is no argument for the current option.
[in]execution_contextThe execution context to use for evaluating the option. May be nullptr if the option is to be evaluated outside any particular context.
See also
Args::ParseOptions (Options&)
man getopt_long_only

Implements lldb_private::Options.

Definition at line 876 of file Options.cpp.

References lldb_private::Status::SetErrorString().

Member Data Documentation

◆ m_did_finalize

bool lldb_private::OptionGroupOptions::m_did_finalize

Definition at line 333 of file Options.h.

Referenced by CommandObjectPlatformConnect::GetOptions().

◆ m_option_defs

std::vector<OptionDefinition> lldb_private::OptionGroupOptions::m_option_defs

Definition at line 331 of file Options.h.

◆ m_option_infos

OptionInfos lldb_private::OptionGroupOptions::m_option_infos

Definition at line 332 of file Options.h.


The documentation for this class was generated from the following files: