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

#include <CommandHistory.h>

Collaboration diagram for lldb_private::CommandHistory:
Collaboration graph
[legend]

Public Member Functions

 CommandHistory ()
 
 ~CommandHistory ()
 
size_t GetSize () const
 
bool IsEmpty () const
 
llvm::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 CommandHistoryoperator= (const CommandHistory &)=delete
 

Private Attributes

std::recursive_mutex m_mutex
 
History m_history
 

Detailed Description

Definition at line 21 of file CommandHistory.h.

Member Typedef Documentation

◆ History

typedef std::vector<std::string> lldb_private::CommandHistory::History
private

Definition at line 52 of file CommandHistory.h.

Constructor & Destructor Documentation

◆ CommandHistory() [1/2]

CommandHistory::CommandHistory ( )

Definition at line 16 of file CommandHistory.cpp.

◆ ~CommandHistory()

CommandHistory::~CommandHistory ( )

Definition at line 18 of file CommandHistory.cpp.

◆ CommandHistory() [2/2]

lldb_private::CommandHistory::CommandHistory ( const CommandHistory )
privatedelete

Member Function Documentation

◆ AppendString()

void CommandHistory::AppendString ( llvm::StringRef  str,
bool  reject_if_dupe = true 
)

◆ Clear()

void CommandHistory::Clear ( )

Definition at line 93 of file CommandHistory.cpp.

References m_history, and m_mutex.

◆ Dump()

void CommandHistory::Dump ( Stream stream,
size_t  start_idx = 0,
size_t  stop_idx = SIZE_MAX 
) const

◆ FindString()

llvm::Optional< llvm::StringRef > CommandHistory::FindString ( llvm::StringRef  input_str) const

◆ GetRecentmostString()

llvm::StringRef CommandHistory::GetRecentmostString ( ) const

Definition at line 75 of file CommandHistory.cpp.

References m_history, and m_mutex.

◆ GetSize()

size_t CommandHistory::GetSize ( ) const

Definition at line 20 of file CommandHistory.cpp.

References m_history, and m_mutex.

◆ GetStringAtIndex()

llvm::StringRef CommandHistory::GetStringAtIndex ( size_t  idx) const

Definition at line 64 of file CommandHistory.cpp.

References m_history, and m_mutex.

Referenced by operator[]().

◆ IsEmpty()

bool CommandHistory::IsEmpty ( ) const

Definition at line 25 of file CommandHistory.cpp.

References m_history, and m_mutex.

Referenced by lldb_private::CommandInterpreter::HandleCommand().

◆ operator=()

const CommandHistory& lldb_private::CommandHistory::operator= ( const CommandHistory )
privatedelete

◆ operator[]()

llvm::StringRef CommandHistory::operator[] ( size_t  idx) const

Definition at line 71 of file CommandHistory.cpp.

References GetStringAtIndex().

Member Data Documentation

◆ g_repeat_char

const char lldb_private::CommandHistory::g_repeat_char = '!'
static

◆ m_history

History lldb_private::CommandHistory::m_history
private

◆ m_mutex

std::recursive_mutex lldb_private::CommandHistory::m_mutex
mutableprivate

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