LLDB mainline
|
#include <StringList.h>
Public Types | |
typedef collection::iterator | iterator |
typedef collection::const_iterator | const_iterator |
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 | AppendString (const llvm::Twine &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 |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () 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 () |
std::string | LongestCommonPrefix () |
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="\n") const |
StringList & | operator<< (const char *str) |
StringList & | operator<< (const std::string &s) |
StringList & | operator<< (const StringList &strings) |
StringList & | operator= (const std::vector< std::string > &rhs) |
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) |
Private Types | |
typedef std::vector< std::string > | collection |
Private Attributes | |
collection | m_strings |
Definition at line 26 of file StringList.h.
|
private |
Definition at line 27 of file StringList.h.
typedef collection::const_iterator lldb_private::StringList::const_iterator |
Definition at line 61 of file StringList.h.
typedef collection::iterator lldb_private::StringList::iterator |
Definition at line 60 of file StringList.h.
StringList::StringList | ( | ) |
Definition at line 22 of file StringList.cpp.
|
explicit |
Definition at line 24 of file StringList.cpp.
References m_strings.
StringList::StringList | ( | const char ** | strv, |
int | strc | ||
) |
Definition at line 29 of file StringList.cpp.
References m_strings.
|
virtualdefault |
void StringList::AppendList | ( | const char ** | strv, |
int | strc | ||
) |
void StringList::AppendList | ( | StringList | strings | ) |
void StringList::AppendString | ( | const char * | str | ) |
Definition at line 38 of file StringList.cpp.
References m_strings.
void StringList::AppendString | ( | const char * | str, |
size_t | str_len | ||
) |
Definition at line 49 of file StringList.cpp.
References m_strings.
void StringList::AppendString | ( | const llvm::Twine & | str | ) |
Definition at line 58 of file StringList.cpp.
References m_strings.
void StringList::AppendString | ( | const std::string & | s | ) |
Definition at line 43 of file StringList.cpp.
References m_strings.
Referenced by AddMatches(), lldb_private::AddNamesMatchingPartialString(), lldb_private::Editline::BreakLineCommand(), lldb_private::CommandInterpreter::FindCommandsForApropos(), lldb_private::CommandInterpreter::GetAliasCommandObject(), lldb_private::CommandInterpreter::GetCommandSP(), lldb_private::CompletionResult::GetDescriptions(), lldb_private::Editline::GetInputAsStringList(), lldb::SBStructuredData::GetKeys(), lldb_private::IOHandlerEditline::GetLines(), lldb_private::CompletionResult::GetMatches(), lldb_private::CommandObjectMultiword::GetSubcommandSP(), lldb_private::CommandInterpreter::GetUserCommandObject(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::ArchSpec::ListSupportedArchNames(), lldb_private::Editline::NextLineCommand(), and operator<<().
void StringList::AppendString | ( | llvm::StringRef | str | ) |
Definition at line 54 of file StringList.cpp.
References m_strings.
void StringList::AppendString | ( | std::string && | s | ) |
Definition at line 45 of file StringList.cpp.
References m_strings.
|
inline |
Definition at line 63 of file StringList.h.
References m_strings.
Referenced by AppendList(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_qPathComplete().
|
inline |
Definition at line 65 of file StringList.h.
References m_strings.
void StringList::Clear | ( | ) |
Definition at line 105 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CommandObjectHelp::DoExecute(), lldb_private::CompletionResult::GetDescriptions(), lldb_private::CompletionResult::GetMatches(), and lldb_private::CommandInterpreter::ResolveCommandImpl().
std::string StringList::CopyList | ( | const char * | item_preamble = nullptr , |
const char * | items_sep = "\n" |
||
) | const |
Definition at line 198 of file StringList.cpp.
References GetSize(), lldb_private::StreamString::GetString(), and GetStringAtIndex().
Referenced by lldb_private::REPL::IOHandlerComplete(), CommandObjectTypeSummaryAdd::IOHandlerInputComplete(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::REPL::IOHandlerIsInputComplete(), and lldb_private::IOHandlerEditline::Run().
void StringList::DeleteStringAtIndex | ( | size_t | id | ) |
Definition at line 147 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CommandObjectMultiword::HandleCompletion(), lldb_private::CommandInterpreter::HandleCompletionMatches(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), and RemoveBlankLines().
|
inline |
Definition at line 64 of file StringList.h.
References m_strings.
Referenced by AppendList(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_qPathComplete(), and SplitIntoLines().
|
inline |
Definition at line 66 of file StringList.h.
References m_strings.
size_t StringList::GetMaxStringLength | ( | ) | const |
Definition at line 76 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CommandObjectApropos::DoExecute().
size_t StringList::GetSize | ( | ) | const |
Definition at line 74 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CompletionRequest::AddCompletions(), AppendList(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::REPL::CalculateActualIndentation(), lldb_private::CommandCompletions::CompleteModifiableCmdPathArgs(), CopyList(), lldb_private::CommandObjectApropos::DoExecute(), lldb_private::CommandObjectHelp::DoExecute(), lldb_private::CommandObjectMultiword::Execute(), lldb_private::CommandInterpreter::GetAliasFullName(), lldb_private::CommandInterpreter::GetCommandNamesMatchingPartialString(), lldb_private::IOHandlerEditline::GetLines(), lldb_private::CommandInterpreter::HandleCommands(), lldb_private::CommandObjectMultiword::HandleCompletion(), lldb_private::CommandInterpreter::HandleCompletionMatches(), lldb::SBCommandInterpreter::HandleCompletionWithDescriptions(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerFixIndentation(), CommandObjectCommandsScriptAdd::IOHandlerInputComplete(), CommandObjectTypeSummaryAdd::IOHandlerInputComplete(), CommandObjectTypeSynthAdd::IOHandlerInputComplete(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::IOHandlerDelegateMultiline::IOHandlerIsInputComplete(), lldb_private::REPL::IOHandlerIsInputComplete(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), Join(), RemoveBlankLines(), lldb_private::CommandInterpreter::ResolveCommandImpl(), lldb_private::BreakpointOptions::CommandData::SerializeToStructuredData(), and lldb_private::CommandCompletions::SettingsNames().
const char * StringList::GetStringAtIndex | ( | size_t | idx | ) | const |
Definition at line 86 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CompletionRequest::AddCompletions(), CopyList(), lldb_private::CommandObjectApropos::DoExecute(), lldb_private::CommandObjectHelp::DoExecute(), lldb_private::Editline::FixIndentationCommand(), lldb_private::CommandInterpreter::GetAliasFullName(), lldb_private::CommandInterpreter::GetCommandSP(), lldb_private::CommandObjectMultiword::GetSubcommandSP(), lldb_private::CommandInterpreter::HandleCommands(), lldb_private::CommandObjectMultiword::HandleCompletion(), lldb_private::CommandInterpreter::HandleCompletionMatches(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerIsInputComplete(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), Join(), and lldb_private::CommandInterpreter::ResolveCommandImpl().
void StringList::InsertStringAtIndex | ( | size_t | id, |
const char * | str | ||
) |
Definition at line 124 of file StringList.cpp.
References m_strings.
void StringList::InsertStringAtIndex | ( | size_t | idx, |
const std::string & | str | ||
) |
Definition at line 133 of file StringList.cpp.
References m_strings.
Referenced by lldb::SBCommandInterpreter::HandleCompletionWithDescriptions().
void StringList::InsertStringAtIndex | ( | size_t | idx, |
std::string && | str | ||
) |
Definition at line 140 of file StringList.cpp.
References m_strings.
void StringList::Join | ( | const char * | separator, |
Stream & | strm | ||
) |
Definition at line 92 of file StringList.cpp.
References GetSize(), GetStringAtIndex(), and lldb_private::Stream::PutCString().
Referenced by lldb_private::arch_helper(), and IOHandlerLuaInterpreter::IOHandlerIsInputComplete().
|
virtual |
Definition at line 232 of file StringList.cpp.
References lldb_private::StreamString::GetData(), lldb_private::Stream::Indent(), LLDB_LOGV, m_strings, and lldb_private::Stream::Printf().
|
inlinestatic |
Definition at line 121 of file StringList.h.
References l.
std::string StringList::LongestCommonPrefix | ( | ) |
Definition at line 107 of file StringList.cpp.
References m_strings.
Referenced by lldb::SBCommandInterpreter::HandleCompletionWithDescriptions(), and lldb_private::Editline::TabCommand().
StringList & StringList::operator<< | ( | const char * | str | ) |
Definition at line 211 of file StringList.cpp.
References AppendString().
StringList & StringList::operator<< | ( | const std::string & | s | ) |
Definition at line 216 of file StringList.cpp.
References AppendString().
StringList & StringList::operator<< | ( | const StringList & | strings | ) |
Definition at line 221 of file StringList.cpp.
References AppendList().
StringList & StringList::operator= | ( | const std::vector< std::string > & | rhs | ) |
Definition at line 226 of file StringList.cpp.
References m_strings.
|
inline |
Definition at line 68 of file StringList.h.
References m_strings.
|
inline |
Definition at line 73 of file StringList.h.
References m_strings.
|
inline |
Definition at line 78 of file StringList.h.
References m_strings.
Referenced by lldb_private::IOHandlerDelegateMultiline::IOHandlerIsInputComplete().
void StringList::RemoveBlankLines | ( | ) |
Definition at line 185 of file StringList.cpp.
References DeleteStringAtIndex(), GetSize(), and m_strings.
|
inline |
Definition at line 56 of file StringList.h.
References m_strings.
size_t StringList::SplitIntoLines | ( | const char * | lines, |
size_t | len | ||
) |
Definition at line 156 of file StringList.cpp.
size_t StringList::SplitIntoLines | ( | const std::string & | lines | ) |
Definition at line 152 of file StringList.cpp.
References SplitIntoLines().
Referenced by lldb::SBTypeCategory::AddTypeSummary(), lldb::SBTypeCategory::AddTypeSynthetic(), lldb::SBDebugger::GetInternalVariableValue(), CommandObjectCommandsScriptAdd::IOHandlerInputComplete(), CommandObjectTypeSummaryAdd::IOHandlerInputComplete(), CommandObjectTypeSynthAdd::IOHandlerInputComplete(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::CommandCompletions::SettingsNames(), and SplitIntoLines().
|
private |
Definition at line 133 of file StringList.h.
Referenced by AppendList(), AppendString(), begin(), Clear(), DeleteStringAtIndex(), end(), GetMaxStringLength(), GetSize(), GetStringAtIndex(), InsertStringAtIndex(), LogDump(), LongestCommonPrefix(), operator=(), operator[](), PopBack(), RemoveBlankLines(), SetSize(), SplitIntoLines(), and StringList().