LLDB mainline
lldb_private::line_editor::EditlineHistory Class Reference

Public Member Functions

 ~EditlineHistory ()
bool IsValid () const
HistoryWGetHistoryPtr ()
void Enter (const EditLineCharType *line_cstr)
bool Load ()
bool Save ()

Static Public Member Functions

static EditlineHistorySP GetHistory (const std::string &prefix)

Protected Attributes

HistoryWm_history = nullptr
 The history object.
HistEventW m_event
 The history event needed to contain all history events.
std::string m_prefix
 The prefix name (usually the editline program name) to use when loading/saving history.
std::string m_path
 Path to the history file.

Private Member Functions

 EditlineHistory (const std::string &prefix, uint32_t size, bool unique_entries)
const char * GetHistoryFilePath ()

Detailed Description

Definition at line 200 of file Editline.cpp.

Constructor & Destructor Documentation

◆ EditlineHistory()

lldb_private::line_editor::EditlineHistory::EditlineHistory ( const std::string & prefix,
uint32_t size,
bool unique_entries )
inlineprivate

Definition at line 204 of file Editline.cpp.

References history_w, history_winit, m_event, m_history, and m_prefix.

Referenced by GetHistory().

◆ ~EditlineHistory()

lldb_private::line_editor::EditlineHistory::~EditlineHistory ( )
inline

Definition at line 238 of file Editline.cpp.

References history_wend, m_history, and Save().

Member Function Documentation

◆ Enter()

void lldb_private::line_editor::EditlineHistory::Enter ( const EditLineCharType * line_cstr)
inline

Definition at line 269 of file Editline.cpp.

References history_w, m_event, and m_history.

◆ GetHistory()

EditlineHistorySP lldb_private::line_editor::EditlineHistory::GetHistory ( const std::string & prefix)
inlinestatic

Definition at line 247 of file Editline.cpp.

References EditlineHistory().

Referenced by lldb_private::Editline::Editline().

◆ GetHistoryFilePath()

const char * lldb_private::line_editor::EditlineHistory::GetHistoryFilePath ( )
inlineprivate

◆ GetHistoryPtr()

HistoryW * lldb_private::line_editor::EditlineHistory::GetHistoryPtr ( )
inline

Definition at line 267 of file Editline.cpp.

References HistoryW, and m_history.

◆ IsValid()

bool lldb_private::line_editor::EditlineHistory::IsValid ( ) const
inline

Definition at line 265 of file Editline.cpp.

References m_history.

◆ Load()

bool lldb_private::line_editor::EditlineHistory::Load ( )
inline

Definition at line 274 of file Editline.cpp.

References GetHistoryFilePath(), history_w, m_event, and m_history.

◆ Save()

bool lldb_private::line_editor::EditlineHistory::Save ( )
inline

Definition at line 285 of file Editline.cpp.

References GetHistoryFilePath(), history_w, m_event, and m_history.

Referenced by ~EditlineHistory().

Member Data Documentation

◆ m_event

HistEventW lldb_private::line_editor::EditlineHistory::m_event
protected

The history event needed to contain all history events.

Definition at line 300 of file Editline.cpp.

Referenced by EditlineHistory(), Enter(), Load(), and Save().

◆ m_history

HistoryW* lldb_private::line_editor::EditlineHistory::m_history = nullptr
protected

The history object.

Definition at line 298 of file Editline.cpp.

Referenced by EditlineHistory(), Enter(), GetHistoryFilePath(), GetHistoryPtr(), IsValid(), Load(), Save(), and ~EditlineHistory().

◆ m_path

std::string lldb_private::line_editor::EditlineHistory::m_path
protected

Path to the history file.

Definition at line 305 of file Editline.cpp.

Referenced by GetHistoryFilePath().

◆ m_prefix

std::string lldb_private::line_editor::EditlineHistory::m_prefix
protected

The prefix name (usually the editline program name) to use when loading/saving history.

Definition at line 303 of file Editline.cpp.

Referenced by EditlineHistory(), and GetHistoryFilePath().


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