LLDB  mainline
OptionValueLanguage.h
Go to the documentation of this file.
1 //===-- OptionValueLanguage.h -------------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_OptionValueLanguage_h_
11 #define liblldb_OptionValueLanguage_h_
12 
14 #include "lldb/lldb-enumerations.h"
15 
16 namespace lldb_private {
17 
19 public:
21  : OptionValue(), m_current_value(value), m_default_value(value) {}
22 
24  lldb::LanguageType default_value)
25  : OptionValue(), m_current_value(current_value),
26  m_default_value(default_value) {}
27 
28  ~OptionValueLanguage() override {}
29 
30  // Virtual subclass pure virtual overrides
31 
32  OptionValue::Type GetType() const override { return eTypeLanguage; }
33 
34  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
35  uint32_t dump_mask) override;
36 
37  Status
38  SetValueFromString(llvm::StringRef value,
40  Status
41  SetValueFromString(const char *,
43 
44  bool Clear() override {
46  m_value_was_set = false;
47  return true;
48  }
49 
50  lldb::OptionValueSP DeepCopy() const override;
51 
52  // Subclass specific functions
53 
55 
57 
59 
61 
62 protected:
65 };
66 
67 } // namespace lldb_private
68 
69 #endif // liblldb_OptionValueLanguage_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
void SetDefaultValue(lldb::LanguageType value)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void SetCurrentValue(lldb::LanguageType value)
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
OptionValue::Type GetType() const override
LanguageType
Programming language type.
VarSetOperationType
Settable state variable types.
OptionValueLanguage(lldb::LanguageType current_value, lldb::LanguageType default_value)
OptionValueLanguage(lldb::LanguageType value)
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
lldb::OptionValueSP DeepCopy() const override
lldb::LanguageType GetCurrentValue() const
lldb::LanguageType GetDefaultValue() const
An error handling class.
Definition: Status.h:44