LLDB  mainline
Public Member Functions | Static Public Member Functions | List of all members
lldb_private::StringList Class Reference

#include <StringList.h>

Public Member Functions

 StringList ()
 
 StringList (const char *str)
 
 StringList (const char **strv, int strc)
 
virtual ~StringList ()
 
void AppendString (const std::string &s)
 
void AppendString (std::string &&s)
 
void AppendString (const char *str)
 
void AppendString (const char *str, size_t str_len)
 
void AppendString (llvm::StringRef str)
 
void AppendList (const char **strv, int strc)
 
void AppendList (StringList strings)
 
size_t GetSize () const
 
void SetSize (size_t n)
 
size_t GetMaxStringLength () const
 
std::string & operator[] (size_t idx)
 
const std::string & operator[] (size_t idx) const
 
void PopBack ()
 
const char * GetStringAtIndex (size_t idx) const
 
void Join (const char *separator, Stream &strm)
 
void Clear ()
 
void LongestCommonPrefix (std::string &common_prefix)
 
void InsertStringAtIndex (size_t idx, const std::string &str)
 
void InsertStringAtIndex (size_t idx, std::string &&str)
 
void InsertStringAtIndex (size_t id, const char *str)
 
void DeleteStringAtIndex (size_t id)
 
void RemoveBlankLines ()
 
size_t SplitIntoLines (const std::string &lines)
 
size_t SplitIntoLines (const char *lines, size_t len)
 
std::string CopyList (const char *item_preamble=nullptr, const char *items_sep="\) const
 
StringListoperator<< (const char *str)
 
StringListoperator<< (const std::string &s)
 
StringListoperator<< (StringList strings)
 
StringListoperator= (const std::vector< std::string > &rhs)
 
size_t AutoComplete (llvm::StringRef s, StringList &matches, size_t &exact_matches_idx) const
 
virtual void LogDump (Log *log, const char *name=nullptr)
 

Static Public Member Functions

template<typename T >
static void LogDump (Log *log, T s_iterable, const char *name=nullptr)
 

Detailed Description

Definition at line 27 of file StringList.h.

Constructor & Destructor Documentation

◆ StringList() [1/3]

StringList::StringList ( )

Definition at line 22 of file StringList.cpp.

◆ StringList() [2/3]

StringList::StringList ( const char *  str)
explicit

Definition at line 24 of file StringList.cpp.

◆ StringList() [3/3]

StringList::StringList ( const char **  strv,
int  strc 
)

Definition at line 29 of file StringList.cpp.

◆ ~StringList()

StringList::~StringList ( )
virtual

Definition at line 36 of file StringList.cpp.

Member Function Documentation

◆ AppendList() [1/2]

void StringList::AppendList ( const char **  strv,
int  strc 
)

Definition at line 56 of file StringList.cpp.

Referenced by operator<<().

◆ AppendList() [2/2]

void StringList::AppendList ( StringList  strings)

Definition at line 63 of file StringList.cpp.

References GetSize(), and GetStringAtIndex().

◆ AppendString() [1/5]

void StringList::AppendString ( const std::string &  s)

◆ AppendString() [2/5]

void StringList::AppendString ( std::string &&  s)

Definition at line 45 of file StringList.cpp.

◆ AppendString() [3/5]

void StringList::AppendString ( const char *  str)

Definition at line 38 of file StringList.cpp.

◆ AppendString() [4/5]

void StringList::AppendString ( const char *  str,
size_t  str_len 
)

Definition at line 47 of file StringList.cpp.

◆ AppendString() [5/5]

void StringList::AppendString ( llvm::StringRef  str)

Definition at line 52 of file StringList.cpp.

◆ AutoComplete()

size_t StringList::AutoComplete ( llvm::StringRef  s,
StringList matches,
size_t &  exact_matches_idx 
) const

Definition at line 229 of file StringList.cpp.

References AppendString(), Clear(), and GetSize().

Referenced by PopBack(), and lldb_private::CommandCompletions::SettingsNames().

◆ Clear()

void StringList::Clear ( )

◆ CopyList()

std::string StringList::CopyList ( const char *  item_preamble = nullptr,
const char *  items_sep = "\n" 
) const

◆ DeleteStringAtIndex()

void StringList::DeleteStringAtIndex ( size_t  id)

◆ GetMaxStringLength()

size_t StringList::GetMaxStringLength ( ) const

Definition at line 72 of file StringList.cpp.

Referenced by SetSize().

◆ GetSize()

size_t StringList::GetSize ( ) const

Definition at line 70 of file StringList.cpp.

Referenced by lldb_private::CompletionRequest::AddCompletions(), AppendList(), lldb_private::Args::Args(), AutoComplete(), lldb_private::PluginManager::AutoCompletePlatformName(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::REPL::CalculateActualIndentation(), CopyList(), DiskFilesOrDirectories(), lldb_private::CommandObjectApropos::DoExecute(), lldb_private::CommandObjectHelp::DoExecute(), lldb_private::CommandObjectMultiword::Execute(), lldb_private::ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(), lldb_private::ScriptInterpreterPythonImpl::GenerateFunction(), lldb_private::ScriptInterpreterPythonImpl::GenerateScriptAliasFunction(), lldb_private::ScriptInterpreterPythonImpl::GenerateTypeScriptFunction(), lldb_private::ScriptInterpreterPythonImpl::GenerateTypeSynthClass(), lldb_private::ScriptInterpreterPythonImpl::GenerateWatchpointCommandCallbackData(), lldb_private::CommandInterpreter::GetAliasFullName(), lldb_private::CommandInterpreter::GetCommandNamesMatchingPartialString(), lldb_private::BreakpointOptions::CommandBaton::GetDescription(), lldb_private::WatchpointOptions::CommandBaton::GetDescription(), lldb_private::Target::StopHook::GetDescription(), lldb_private::IOHandlerEditline::GetLines(), lldb_private::CommandInterpreter::HandleCommands(), lldb_private::CommandObjectMultiword::HandleCompletion(), lldb_private::IOHandlerConfirm::IOHandlerComplete(), lldb_private::REPL::IOHandlerFixIndentation(), lldb_private::REPL::IOHandlerInputComplete(), CommandObjectTypeSummaryAdd::IOHandlerInputComplete(), CommandObjectTypeSynthAdd::IOHandlerInputComplete(), CommandObjectCommandsAddRegex::IOHandlerInputComplete(), CommandObjectCommandsScriptAdd::IOHandlerInputComplete(), lldb_private::CommandObjectExpression::IOHandlerIsInputComplete(), lldb_private::REPL::IOHandlerIsInputComplete(), lldb_private::IOHandlerDelegateMultiline::IOHandlerIsInputComplete(), Join(), PrivateAutoComplete(), RemoveBlankLines(), lldb_private::CommandInterpreter::RunCommandInterpreter(), lldb_private::CommandCompletions::SettingsNames(), CommandObjectWatchpointCommandAdd::WatchpointOptionsCallbackFunction(), curses::HelpDialogDelegate::WindowDelegateDraw(), and curses::HelpDialogDelegate::WindowDelegateHandleChar().

◆ GetStringAtIndex()

const char * StringList::GetStringAtIndex ( size_t  idx) const

◆ InsertStringAtIndex() [1/3]

void StringList::InsertStringAtIndex ( size_t  idx,
const std::string &  str 
)

◆ InsertStringAtIndex() [2/3]

void StringList::InsertStringAtIndex ( size_t  idx,
std::string &&  str 
)

Definition at line 137 of file StringList.cpp.

◆ InsertStringAtIndex() [3/3]

void StringList::InsertStringAtIndex ( size_t  id,
const char *  str 
)

Definition at line 121 of file StringList.cpp.

◆ Join()

void StringList::Join ( const char *  separator,
Stream strm 
)

Definition at line 88 of file StringList.cpp.

References GetSize(), GetStringAtIndex(), and lldb_private::Stream::PutCString().

Referenced by arch_helper(), and PopBack().

◆ LogDump() [1/2]

void StringList::LogDump ( Log log,
const char *  name = nullptr 
)
virtual

◆ LogDump() [2/2]

template<typename T >
static void lldb_private::StringList::LogDump ( Log log,
s_iterable,
const char *  name = nullptr 
)
inlinestatic

Definition at line 118 of file StringList.h.

References LogDump().

◆ LongestCommonPrefix()

void StringList::LongestCommonPrefix ( std::string &  common_prefix)

◆ operator<<() [1/3]

StringList & StringList::operator<< ( const char *  str)

Definition at line 208 of file StringList.cpp.

References AppendString().

Referenced by PopBack().

◆ operator<<() [2/3]

StringList & StringList::operator<< ( const std::string &  s)

Definition at line 213 of file StringList.cpp.

References AppendString().

◆ operator<<() [3/3]

StringList & StringList::operator<< ( StringList  strings)

Definition at line 218 of file StringList.cpp.

References AppendList().

◆ operator=()

StringList & StringList::operator= ( const std::vector< std::string > &  rhs)

Definition at line 223 of file StringList.cpp.

Referenced by PopBack().

◆ operator[]() [1/2]

std::string& lldb_private::StringList::operator[] ( size_t  idx)
inline

Definition at line 57 of file StringList.h.

◆ operator[]() [2/2]

const std::string& lldb_private::StringList::operator[] ( size_t  idx) const
inline

Definition at line 62 of file StringList.h.

◆ PopBack()

void lldb_private::StringList::PopBack ( )
inline

◆ RemoveBlankLines()

void StringList::RemoveBlankLines ( )

◆ SetSize()

void lldb_private::StringList::SetSize ( size_t  n)
inline

Definition at line 53 of file StringList.h.

References GetMaxStringLength().

◆ SplitIntoLines() [1/2]

size_t StringList::SplitIntoLines ( const std::string &  lines)

◆ SplitIntoLines() [2/2]

size_t StringList::SplitIntoLines ( const char *  lines,
size_t  len 
)

Definition at line 153 of file StringList.cpp.


The documentation for this class was generated from the following files: