1 //===-- OptionValueFileColonLine.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_OPTIONVALUEFILECOLONLINE_H 10 #define LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H 11 12 #include "lldb/Interpreter/OptionValue.h" 13 14 #include "lldb/Utility/FileSpec.h" 15 #include "llvm/Support/Chrono.h" 16 17 namespace lldb_private { 18 19 class OptionValueFileColonLine : public OptionValue { 20 public: 21 OptionValueFileColonLine(); 22 OptionValueFileColonLine(const llvm::StringRef input); 23 ~OptionValueFileColonLine()24 ~OptionValueFileColonLine() override {} 25 GetType()26 OptionValue::Type GetType() const override { return eTypeFileLineColumn; } 27 28 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, 29 uint32_t dump_mask) override; 30 31 Status 32 SetValueFromString(llvm::StringRef value, 33 VarSetOperationType op = eVarSetOperationAssign) override; 34 Status 35 SetValueFromString(const char *, 36 VarSetOperationType = eVarSetOperationAssign) = delete; 37 Clear()38 void Clear() override { 39 m_file_spec.Clear(); 40 m_line_number = LLDB_INVALID_LINE_NUMBER; 41 m_column_number = LLDB_INVALID_COLUMN_NUMBER; 42 } 43 44 lldb::OptionValueSP DeepCopy() const override; 45 46 void AutoComplete(CommandInterpreter &interpreter, 47 CompletionRequest &request) override; 48 GetFileSpec()49 FileSpec &GetFileSpec() { return m_file_spec; } GetLineNumber()50 uint32_t GetLineNumber() { return m_line_number; } GetColumnNumber()51 uint32_t GetColumnNumber() { return m_column_number; } 52 SetCompletionMask(uint32_t mask)53 void SetCompletionMask(uint32_t mask) { m_completion_mask = mask; } 54 55 protected: 56 FileSpec m_file_spec; 57 uint32_t m_line_number; 58 uint32_t m_column_number; 59 uint32_t m_completion_mask; 60 }; 61 62 } // namespace lldb_private 63 64 #endif // LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H 65