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.
References m_strings.
Referenced by AppendList(), LogDump(), operator<<(), operator<<(), operator<<(), operator=(), and ~StringList().
|
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 |
References StringList().
void StringList::AppendList | ( | const char ** | strv, |
int | strc ) |
Definition at line 62 of file StringList.cpp.
References m_strings.
Referenced by lldb_private::CommandInterpreter::GetCommandSP(), and operator<<().
void StringList::AppendList | ( | StringList | strings | ) |
Definition at line 69 of file StringList.cpp.
References begin(), end(), GetSize(), m_strings, and StringList().
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::ArchSpec::ListSupportedArchNames(), lldb_private::Editline::NextLineCommand(), operator<<(), 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 CommandObjectTypeSummaryAdd::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::CommandInterpreter::GetCommandSP(), 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(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), lldb_private::IOHandlerDelegateMultiline::IOHandlerIsInputComplete(), lldb_private::REPL::IOHandlerIsInputComplete(), Join(), RemoveBlankLines(), lldb_private::CommandInterpreter::ResolveCommandImpl(), 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(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), lldb_private::REPL::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, and StringList().
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(), and StringList().
StringList & StringList::operator<< | ( | const std::string & | s | ) |
Definition at line 216 of file StringList.cpp.
References AppendString(), and StringList().
StringList & StringList::operator<< | ( | const StringList & | strings | ) |
Definition at line 221 of file StringList.cpp.
References AppendList(), and StringList().
StringList & StringList::operator= | ( | const std::vector< std::string > & | rhs | ) |
Definition at line 226 of file StringList.cpp.
References m_strings, and StringList().
|
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.
Referenced by lldb::SBCommandInterpreter::HandleCompletionWithDescriptions().
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::CommandCompletions::SettingsNames(), and SplitIntoLines().
|
private |
Definition at line 133 of file StringList.h.
Referenced by AppendList(), AppendList(), AppendString(), AppendString(), AppendString(), AppendString(), AppendString(), AppendString(), begin(), begin(), Clear(), DeleteStringAtIndex(), end(), end(), GetMaxStringLength(), GetSize(), GetStringAtIndex(), InsertStringAtIndex(), InsertStringAtIndex(), InsertStringAtIndex(), LogDump(), LongestCommonPrefix(), operator=(), operator[](), operator[](), PopBack(), RemoveBlankLines(), SetSize(), SplitIntoLines(), StringList(), StringList(), and StringList().