LLDB mainline
|
#include <OptionValueFileSpec.h>
Public Member Functions | |
OptionValueFileSpec (bool resolve=true) | |
OptionValueFileSpec (const FileSpec &value, bool resolve=true) | |
OptionValueFileSpec (const FileSpec ¤t_value, const FileSpec &default_value, bool resolve=true) | |
~OptionValueFileSpec () override=default | |
OptionValue::Type | GetType () const override |
void | DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override |
llvm::json::Value | ToJSON (const ExecutionContext *exe_ctx) override |
Status | SetValueFromString (llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override |
void | Clear () override |
void | AutoComplete (CommandInterpreter &interpreter, CompletionRequest &request) override |
FileSpec & | GetCurrentValue () |
const FileSpec & | GetCurrentValue () const |
const FileSpec & | GetDefaultValue () const |
void | SetCurrentValue (const FileSpec &value, bool set_value_was_set) |
void | SetDefaultValue (const FileSpec &value) |
const lldb::DataBufferSP & | GetFileContents () |
void | SetCompletionMask (uint32_t mask) |
![]() | |
std::shared_ptr< typename Base::TopmostBase > | Clone () const override |
![]() | |
OptionValue ()=default | |
virtual | ~OptionValue ()=default |
virtual Type | GetType () const =0 |
virtual bool | ValueIsTransparent () const |
virtual const char * | GetTypeAsCString () const |
virtual void | DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)=0 |
virtual llvm::json::Value | ToJSON (const ExecutionContext *exe_ctx) |
virtual Status | SetValueFromString (llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) |
virtual void | Clear ()=0 |
virtual lldb::OptionValueSP | DeepCopy (const lldb::OptionValueSP &new_parent) const |
virtual void | AutoComplete (CommandInterpreter &interpreter, CompletionRequest &request) |
virtual lldb::OptionValueSP | GetSubValue (const ExecutionContext *exe_ctx, llvm::StringRef name, Status &error) const |
virtual Status | SetSubValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value) |
virtual bool | IsAggregateValue () const |
virtual ConstString | GetName () const |
virtual bool | DumpQualifiedName (Stream &strm) const |
uint32_t | GetTypeAsMask () |
OptionValueArch * | GetAsArch () |
const OptionValueArch * | GetAsArch () const |
OptionValueArray * | GetAsArray () |
const OptionValueArray * | GetAsArray () const |
OptionValueArgs * | GetAsArgs () |
const OptionValueArgs * | GetAsArgs () const |
OptionValueBoolean * | GetAsBoolean () |
const OptionValueBoolean * | GetAsBoolean () const |
OptionValueChar * | GetAsChar () |
const OptionValueChar * | GetAsChar () const |
OptionValueDictionary * | GetAsDictionary () |
const OptionValueDictionary * | GetAsDictionary () const |
OptionValueEnumeration * | GetAsEnumeration () |
const OptionValueEnumeration * | GetAsEnumeration () const |
OptionValueFileSpec * | GetAsFileSpec () |
const OptionValueFileSpec * | GetAsFileSpec () const |
OptionValueFileSpecList * | GetAsFileSpecList () |
const OptionValueFileSpecList * | GetAsFileSpecList () const |
OptionValueFormat * | GetAsFormat () |
const OptionValueFormat * | GetAsFormat () const |
OptionValueLanguage * | GetAsLanguage () |
const OptionValueLanguage * | GetAsLanguage () const |
OptionValuePathMappings * | GetAsPathMappings () |
const OptionValuePathMappings * | GetAsPathMappings () const |
OptionValueProperties * | GetAsProperties () |
const OptionValueProperties * | GetAsProperties () const |
OptionValueRegex * | GetAsRegex () |
const OptionValueRegex * | GetAsRegex () const |
OptionValueSInt64 * | GetAsSInt64 () |
const OptionValueSInt64 * | GetAsSInt64 () const |
OptionValueString * | GetAsString () |
const OptionValueString * | GetAsString () const |
OptionValueUInt64 * | GetAsUInt64 () |
const OptionValueUInt64 * | GetAsUInt64 () const |
OptionValueUUID * | GetAsUUID () |
const OptionValueUUID * | GetAsUUID () const |
OptionValueFormatEntity * | GetAsFormatEntity () |
const OptionValueFormatEntity * | GetAsFormatEntity () const |
bool | AppendFileSpecValue (FileSpec file_spec) |
bool | OptionWasSet () const |
void | SetOptionWasSet () |
void | SetParent (const lldb::OptionValueSP &parent_sp) |
lldb::OptionValueSP | GetParent () const |
void | SetValueChangedCallback (std::function< void()> callback) |
void | NotifyValueChanged () |
template<typename T , std::enable_if_t<!std::is_pointer_v< T >, bool > = true> | |
std::optional< T > | GetValueAs () const |
template<typename T , typename U = typename std::remove_const< typename std::remove_pointer<T>::type>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true> | |
T | GetValueAs () const |
bool | SetValueAs (bool v) |
bool | SetValueAs (char v) |
bool | SetValueAs (uint64_t v) |
bool | SetValueAs (int64_t v) |
bool | SetValueAs (UUID v) |
bool | SetValueAs (llvm::StringRef v) |
bool | SetValueAs (lldb::LanguageType v) |
bool | SetValueAs (lldb::Format v) |
bool | SetValueAs (FileSpec v) |
bool | SetValueAs (ArchSpec v) |
template<typename T , std::enable_if_t< std::is_enum_v< T >, bool > = true> | |
bool | SetValueAs (T t) |
Protected Attributes | |
FileSpec | m_current_value |
FileSpec | m_default_value |
lldb::DataBufferSP | m_data_sp |
llvm::sys::TimePoint | m_data_mod_time |
uint32_t | m_completion_mask = CommandCompletions::eDiskFileCompletion |
bool | m_resolve |
![]() | |
lldb::OptionValueWP | m_parent_wp |
std::function< void()> | m_callback |
bool | m_value_was_set = false |
Definition at line 20 of file OptionValueFileSpec.h.
OptionValueFileSpec::OptionValueFileSpec | ( | bool | resolve = true | ) |
Definition at line 21 of file OptionValueFileSpec.cpp.
OptionValueFileSpec::OptionValueFileSpec | ( | const FileSpec & | value, |
bool | resolve = true |
||
) |
Definition at line 23 of file OptionValueFileSpec.cpp.
OptionValueFileSpec::OptionValueFileSpec | ( | const FileSpec & | current_value, |
const FileSpec & | default_value, | ||
bool | resolve = true |
||
) |
Definition at line 28 of file OptionValueFileSpec.cpp.
|
overridedefault |
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 85 of file OptionValueFileSpec.cpp.
References lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(), and m_completion_mask.
|
inlineoverridevirtual |
Implements lldb_private::OptionValue.
Definition at line 46 of file OptionValueFileSpec.h.
References m_current_value, m_data_mod_time, m_data_sp, m_default_value, and lldb_private::OptionValue::m_value_was_set.
Referenced by lldb_private::OptionGroupFile::OptionParsingStarting(), lldb_private::OptionGroupOutputFile::OptionParsingStarting(), and SetValueFromString().
|
overridevirtual |
Implements lldb_private::OptionValue.
Definition at line 35 of file OptionValueFileSpec.cpp.
References lldb_private::OptionValue::eDumpOptionType, lldb_private::OptionValue::eDumpOptionValue, lldb_private::FileSpec::GetPath(), lldb_private::OptionValue::GetTypeAsCString(), m_current_value, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().
|
inline |
Definition at line 58 of file OptionValueFileSpec.h.
References m_current_value.
Referenced by CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), CommandObjectPlatformSettings::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectTargetSymbolsAdd::DoExecute(), CommandObjectMemoryRead::DoExecute(), and CommandObjectTargetCreate::DoExecute().
|
inline |
Definition at line 60 of file OptionValueFileSpec.h.
References m_current_value.
|
inline |
Definition at line 62 of file OptionValueFileSpec.h.
References m_default_value.
const lldb::DataBufferSP & OptionValueFileSpec::GetFileContents | ( | ) |
Definition at line 91 of file OptionValueFileSpec.cpp.
References lldb_private::FileSystem::CreateDataBuffer(), lldb_private::FileSystem::GetModificationTime(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), m_current_value, m_data_mod_time, and m_data_sp.
Referenced by lldb_private::TargetProperties::GetExpressionPrefixContents().
|
inlineoverridevirtual |
Implements lldb_private::OptionValue.
Definition at line 33 of file OptionValueFileSpec.h.
References lldb_private::OptionValue::eTypeFileSpec.
|
inline |
Definition at line 75 of file OptionValueFileSpec.h.
References m_completion_mask.
|
inline |
Definition at line 64 of file OptionValueFileSpec.h.
References m_current_value, m_data_sp, and lldb_private::OptionValue::m_value_was_set.
|
inline |
Definition at line 71 of file OptionValueFileSpec.h.
References m_default_value.
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 49 of file OptionValueFileSpec.cpp.
References Clear(), error(), lldb_private::eVarSetOperationAppend, lldb_private::eVarSetOperationAssign, lldb_private::eVarSetOperationClear, lldb_private::eVarSetOperationInsertAfter, lldb_private::eVarSetOperationInsertBefore, lldb_private::eVarSetOperationInvalid, lldb_private::eVarSetOperationRemove, lldb_private::eVarSetOperationReplace, lldb_private::FileSystem::Instance(), m_current_value, m_data_mod_time, m_data_sp, m_resolve, lldb_private::OptionValue::m_value_was_set, lldb_private::OptionValue::NotifyValueChanged(), lldb_private::FileSystem::Resolve(), lldb_private::FileSpec::SetFile(), and lldb_private::OptionValue::SetValueFromString().
Referenced by lldb_private::OptionGroupFile::SetOptionValue(), and lldb_private::OptionGroupOutputFile::SetOptionValue().
|
inlineoverridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 38 of file OptionValueFileSpec.h.
References lldb_private::FileSpec::GetPath(), and m_current_value.
|
protected |
Definition at line 82 of file OptionValueFileSpec.h.
Referenced by AutoComplete(), and SetCompletionMask().
|
protected |
Definition at line 78 of file OptionValueFileSpec.h.
Referenced by Clear(), DumpValue(), GetCurrentValue(), GetFileContents(), SetCurrentValue(), SetValueFromString(), and ToJSON().
|
protected |
Definition at line 81 of file OptionValueFileSpec.h.
Referenced by Clear(), GetFileContents(), and SetValueFromString().
|
protected |
Definition at line 80 of file OptionValueFileSpec.h.
Referenced by Clear(), GetFileContents(), SetCurrentValue(), and SetValueFromString().
|
protected |
Definition at line 79 of file OptionValueFileSpec.h.
Referenced by Clear(), GetDefaultValue(), and SetDefaultValue().
|
protected |
Definition at line 83 of file OptionValueFileSpec.h.
Referenced by SetValueFromString().