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
15
16namespace lldb_private {
17
18class OptionValueLanguage : public Cloneable<OptionValueLanguage, OptionValue> {
19public:
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 llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override;
37
38 Status
39 SetValueFromString(llvm::StringRef value,
41
42 void Clear() override {
44 m_value_was_set = false;
45 }
46
47 // Subclass specific functions
48
50
52
54
56
57protected:
60};
61
62} // namespace lldb_private
63
64#endif // LLDB_INTERPRETER_OPTIONVALUELANGUAGE_H
A class that implements CRTP-based "virtual constructor" idiom.
Definition: Cloneable.h:40
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override
OptionValue::Type GetType() const override
lldb::LanguageType GetDefaultValue() const
lldb::LanguageType GetCurrentValue() const
void SetDefaultValue(lldb::LanguageType value)
OptionValueLanguage(lldb::LanguageType current_value, lldb::LanguageType default_value)
OptionValueLanguage(lldb::LanguageType value)
~OptionValueLanguage() override=default
void SetCurrentValue(lldb::LanguageType value)
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
A class that represents a running process on the host machine.
VarSetOperationType
Settable state variable types.
LanguageType
Programming language type.