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 ()=default
 
 ~CommandHistory ()=default
 
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::stringHistory
 

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]

lldb_private::CommandHistory::CommandHistory ( )
default

◆ ~CommandHistory()

lldb_private::CommandHistory::~CommandHistory ( )
default

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

Definition at line 78 of file CommandHistory.cpp.

References string().

◆ Clear()

void CommandHistory::Clear ( )

Definition at line 89 of file CommandHistory.cpp.

◆ 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

Definition at line 27 of file CommandHistory.cpp.

◆ GetRecentmostString()

llvm::StringRef CommandHistory::GetRecentmostString ( ) const

Definition at line 71 of file CommandHistory.cpp.

◆ GetSize()

size_t CommandHistory::GetSize ( ) const

Definition at line 16 of file CommandHistory.cpp.

Referenced by CommandObjectSessionHistory::DoExecute().

◆ GetStringAtIndex()

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

Definition at line 60 of file CommandHistory.cpp.

◆ IsEmpty()

bool CommandHistory::IsEmpty ( ) const

Definition at line 21 of file CommandHistory.cpp.

◆ operator=()

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

◆ operator[]()

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

Definition at line 67 of file CommandHistory.cpp.

Member Data Documentation

◆ g_repeat_char

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

Definition at line 46 of file CommandHistory.h.

◆ m_history

History lldb_private::CommandHistory::m_history
private

Definition at line 54 of file CommandHistory.h.

◆ m_mutex

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

Definition at line 53 of file CommandHistory.h.


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