1 //===-- OptionGroupValueObjectDisplay.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_OPTIONGROUPVALUEOBJECTDISPLAY_H
10 #define LLDB_INTERPRETER_OPTIONGROUPVALUEOBJECTDISPLAY_H
11 
12 #include "lldb/Core/ValueObject.h"
13 #include "lldb/Interpreter/Options.h"
14 
15 namespace lldb_private {
16 
17 // OptionGroupValueObjectDisplay
18 
19 class OptionGroupValueObjectDisplay : public OptionGroup {
20 public:
21   OptionGroupValueObjectDisplay() = default;
22 
23   ~OptionGroupValueObjectDisplay() override = default;
24 
25   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
26 
27   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
28                         ExecutionContext *execution_context) override;
29 
30   void OptionParsingStarting(ExecutionContext *execution_context) override;
31 
32   bool AnyOptionWasSet() const {
33     return show_types || no_summary_depth != 0 || show_location ||
34            flat_output || use_objc || max_depth != UINT32_MAX ||
35            ptr_depth != 0 || !use_synth || be_raw || ignore_cap ||
36            run_validator;
37   }
38 
39   DumpValueObjectOptions GetAsDumpOptions(
40       LanguageRuntimeDescriptionDisplayVerbosity lang_descr_verbosity =
41           eLanguageRuntimeDescriptionDisplayVerbosityFull,
42       lldb::Format format = lldb::eFormatDefault,
43       lldb::TypeSummaryImplSP summary_sp = lldb::TypeSummaryImplSP());
44 
45   bool show_types : 1, show_location : 1, flat_output : 1, use_objc : 1,
46       use_synth : 1, be_raw : 1, ignore_cap : 1, run_validator : 1,
47       max_depth_is_default : 1;
48 
49   uint32_t no_summary_depth;
50   uint32_t max_depth;
51   uint32_t ptr_depth;
52   uint32_t elem_count;
53   lldb::DynamicValueType use_dynamic;
54 };
55 
56 } // namespace lldb_private
57 
58 #endif // LLDB_INTERPRETER_OPTIONGROUPVALUEOBJECTDISPLAY_H
59