|
LLDB mainline
|
#include <CommandHistory.h>
Public Member Functions | |
| CommandHistory ()=default | |
| ~CommandHistory ()=default | |
| size_t | GetSize () const |
| bool | IsEmpty () const |
| std::optional< llvm::StringRef > | FindString (llvm::StringRef input_str) const |
| llvm::StringRef | GetStringAtIndex (size_t idx) const |
| llvm::StringRef | operator[] (size_t idx) const |
| llvm::StringRef | GetRecentmostString () const |
| void | AppendString (llvm::StringRef str, bool reject_if_dupe=true) |
| void | Clear () |
| void | Dump (Stream &stream, size_t start_idx=0, size_t stop_idx=SIZE_MAX) const |
Static Public Attributes | |
| static const char | g_repeat_char = '!' |
Private Types | |
| typedef std::vector< std::string > | History |
Private Member Functions | |
| CommandHistory (const CommandHistory &)=delete | |
| const CommandHistory & | operator= (const CommandHistory &)=delete |
Private Attributes | |
| std::recursive_mutex | m_mutex |
| History | m_history |
Definition at line 22 of file CommandHistory.h.
|
private |
Definition at line 53 of file CommandHistory.h.
|
default |
Referenced by CommandHistory(), and operator=().
|
default |
|
privatedelete |
References CommandHistory().
| void CommandHistory::AppendString | ( | llvm::StringRef | str, |
| bool | reject_if_dupe = true ) |
Definition at line 79 of file CommandHistory.cpp.
| void CommandHistory::Clear | ( | ) |
Definition at line 90 of file CommandHistory.cpp.
| void CommandHistory::Dump | ( | Stream & | stream, |
| size_t | start_idx = 0, | ||
| size_t | stop_idx = SIZE_MAX ) const |
Definition at line 95 of file CommandHistory.cpp.
References lldb_private::Stream::Indent(), m_history, m_mutex, and lldb_private::Stream::Printf().
Referenced by CommandObjectSessionHistory::DoExecute().
| std::optional< llvm::StringRef > CommandHistory::FindString | ( | llvm::StringRef | input_str | ) | const |
Definition at line 28 of file CommandHistory.cpp.
References g_repeat_char, m_history, and m_mutex.
| llvm::StringRef CommandHistory::GetRecentmostString | ( | ) | const |
Definition at line 72 of file CommandHistory.cpp.
| size_t CommandHistory::GetSize | ( | ) | const |
Definition at line 17 of file CommandHistory.cpp.
References m_history, and m_mutex.
Referenced by CommandObjectSessionHistory::DoExecute().
| llvm::StringRef CommandHistory::GetStringAtIndex | ( | size_t | idx | ) | const |
Definition at line 61 of file CommandHistory.cpp.
References m_history, and m_mutex.
Referenced by operator[]().
| bool CommandHistory::IsEmpty | ( | ) | const |
Definition at line 22 of file CommandHistory.cpp.
|
privatedelete |
References CommandHistory().
| llvm::StringRef CommandHistory::operator[] | ( | size_t | idx | ) | const |
Definition at line 68 of file CommandHistory.cpp.
References GetStringAtIndex().
|
static |
Definition at line 47 of file CommandHistory.h.
Referenced by FindString(), lldb_private::CommandInterpreter::HandleCommand(), and lldb_private::CommandInterpreter::HandleCompletion().
|
private |
Definition at line 55 of file CommandHistory.h.
Referenced by AppendString(), Clear(), Dump(), FindString(), GetRecentmostString(), GetSize(), GetStringAtIndex(), and IsEmpty().
|
mutableprivate |
Definition at line 54 of file CommandHistory.h.
Referenced by AppendString(), Clear(), Dump(), FindString(), GetRecentmostString(), GetSize(), GetStringAtIndex(), and IsEmpty().