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

#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
 
StringListoperator<< (const char *str)
 
StringListoperator<< (const std::string &s)
 
StringListoperator<< (const StringList &strings)
 
StringListoperator= (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
 

Detailed Description

Definition at line 26 of file StringList.h.

Member Typedef Documentation

◆ collection

typedef std::vector<std::string> lldb_private::StringList::collection
private

Definition at line 27 of file StringList.h.

◆ const_iterator

typedef collection::const_iterator lldb_private::StringList::const_iterator

Definition at line 61 of file StringList.h.

◆ iterator

typedef collection::iterator lldb_private::StringList::iterator

Definition at line 60 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.

References m_strings.

◆ StringList() [3/3]

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

Definition at line 29 of file StringList.cpp.

References m_strings.

◆ ~StringList()

StringList::~StringList ( )
virtualdefault

Member Function Documentation

◆ AppendList() [1/2]

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

Definition at line 62 of file StringList.cpp.

References m_strings.

Referenced by operator<<().

◆ AppendList() [2/2]

void StringList::AppendList ( StringList  strings)

Definition at line 69 of file StringList.cpp.

References begin(), end(), GetSize(), and m_strings.

◆ AppendString() [1/6]

void StringList::AppendString ( const char *  str)

Definition at line 38 of file StringList.cpp.

References m_strings.

◆ AppendString() [2/6]

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

Definition at line 49 of file StringList.cpp.

References m_strings.

◆ AppendString() [3/6]

void StringList::AppendString ( const llvm::Twine &  str)

Definition at line 58 of file StringList.cpp.

References m_strings.

◆ AppendString() [4/6]

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

◆ AppendString() [5/6]

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

Definition at line 54 of file StringList.cpp.

References m_strings.

◆ AppendString() [6/6]

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

Definition at line 45 of file StringList.cpp.

References m_strings.

◆ begin() [1/2]

iterator lldb_private::StringList::begin ( )
inline

◆ begin() [2/2]

const_iterator lldb_private::StringList::begin ( ) const
inline

Definition at line 65 of file StringList.h.

References m_strings.

◆ 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)

◆ end() [1/2]

iterator lldb_private::StringList::end ( )
inline

◆ end() [2/2]

const_iterator lldb_private::StringList::end ( ) const
inline

Definition at line 66 of file StringList.h.

References m_strings.

◆ GetMaxStringLength()

size_t StringList::GetMaxStringLength ( ) const

Definition at line 76 of file StringList.cpp.

References m_strings.

Referenced by lldb_private::CommandObjectApropos::DoExecute().

◆ GetSize()

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().

◆ GetStringAtIndex()

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

◆ InsertStringAtIndex() [1/3]

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

Definition at line 124 of file StringList.cpp.

References m_strings.

◆ InsertStringAtIndex() [2/3]

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().

◆ InsertStringAtIndex() [3/3]

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

Definition at line 140 of file StringList.cpp.

References m_strings.

◆ Join()

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

◆ 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 121 of file StringList.h.

References l.

◆ LongestCommonPrefix()

std::string StringList::LongestCommonPrefix ( )

◆ operator<<() [1/3]

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

Definition at line 211 of file StringList.cpp.

References AppendString().

◆ operator<<() [2/3]

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

Definition at line 216 of file StringList.cpp.

References AppendString().

◆ operator<<() [3/3]

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

Definition at line 221 of file StringList.cpp.

References AppendList().

◆ operator=()

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

Definition at line 226 of file StringList.cpp.

References m_strings.

◆ operator[]() [1/2]

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

Definition at line 68 of file StringList.h.

References m_strings.

◆ operator[]() [2/2]

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

Definition at line 73 of file StringList.h.

References m_strings.

◆ PopBack()

void lldb_private::StringList::PopBack ( )
inline

◆ RemoveBlankLines()

void StringList::RemoveBlankLines ( )

Definition at line 185 of file StringList.cpp.

References DeleteStringAtIndex(), GetSize(), and m_strings.

◆ SetSize()

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

Definition at line 56 of file StringList.h.

References m_strings.

◆ SplitIntoLines() [1/2]

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

Definition at line 156 of file StringList.cpp.

References end(), and m_strings.

◆ SplitIntoLines() [2/2]

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

Member Data Documentation

◆ m_strings

collection lldb_private::StringList::m_strings
private

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