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 LLDB_INTERPRETER_OPTIONVALUELANGUAGE_H
11 #define LLDB_INTERPRETER_OPTIONVALUELANGUAGE_H
12 
14 #include "lldb/lldb-enumerations.h"
15 
16 namespace lldb_private {
17 
18 class OptionValueLanguage : public Cloneable<OptionValueLanguage, OptionValue> {
19 public:
21  : m_current_value(value), m_default_value(value) {}
22 
24  lldb::LanguageType default_value)
25  : m_current_value(current_value), m_default_value(default_value) {}
26 
27  ~OptionValueLanguage() override = default;
28 
29  // Virtual subclass pure virtual overrides
30 
31  OptionValue::Type GetType() const override { return eTypeLanguage; }
32 
33  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
34  uint32_t dump_mask) override;
35 
36  Status
37  SetValueFromString(llvm::StringRef value,
39 
40  void Clear() override {
42  m_value_was_set = false;
43  }
44 
45  // Subclass specific functions
46 
48 
50 
52 
54 
55 protected:
58 };
59 
60 } // namespace lldb_private
61 
62 #endif // LLDB_INTERPRETER_OPTIONVALUELANGUAGE_H
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::OptionValueLanguage::GetDefaultValue
lldb::LanguageType GetDefaultValue() const
Definition: OptionValueLanguage.h:49
lldb_private::OptionValueLanguage::OptionValueLanguage
OptionValueLanguage(lldb::LanguageType current_value, lldb::LanguageType default_value)
Definition: OptionValueLanguage.h:23
lldb_private::OptionValueLanguage::m_default_value
lldb::LanguageType m_default_value
Definition: OptionValueLanguage.h:57
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::OptionValueLanguage::~OptionValueLanguage
~OptionValueLanguage() override=default
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Cloneable
Definition: Cloneable.h:40
OptionValue.h
lldb_private::OptionValueLanguage::Clear
void Clear() override
Definition: OptionValueLanguage.h:40
lldb_private::VarSetOperationType
VarSetOperationType
Settable state variable types.
Definition: lldb-private-enumerations.h:83
lldb_private::OptionValueLanguage
Definition: OptionValueLanguage.h:18
lldb_private::OptionValueLanguage::SetCurrentValue
void SetCurrentValue(lldb::LanguageType value)
Definition: OptionValueLanguage.h:51
lldb-enumerations.h
lldb_private::OptionValueLanguage::GetType
OptionValue::Type GetType() const override
Definition: OptionValueLanguage.h:31
lldb_private::OptionValueLanguage::m_current_value
lldb::LanguageType m_current_value
Definition: OptionValueLanguage.h:56
lldb_private::OptionValueLanguage::SetDefaultValue
void SetDefaultValue(lldb::LanguageType value)
Definition: OptionValueLanguage.h:53
lldb_private::OptionValueLanguage::OptionValueLanguage
OptionValueLanguage(lldb::LanguageType value)
Definition: OptionValueLanguage.h:20
lldb_private::Status
Definition: Status.h:44
lldb_private::OptionValue::Type
Type
Definition: OptionValue.h:26
uint32_t
lldb_private::OptionValue::m_value_was_set
bool m_value_was_set
Definition: OptionValue.h:332
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::OptionValue::eTypeLanguage
@ eTypeLanguage
Definition: OptionValue.h:39
lldb_private::OptionValueLanguage::GetCurrentValue
lldb::LanguageType GetCurrentValue() const
Definition: OptionValueLanguage.h:47
lldb_private::OptionValueLanguage::DumpValue
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
Definition: OptionValueLanguage.cpp:20
lldb_private::OptionValueLanguage::SetValueFromString
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Definition: OptionValueLanguage.cpp:32
lldb_private::eVarSetOperationAssign
@ eVarSetOperationAssign
Definition: lldb-private-enumerations.h:90