LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
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 205 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 209 of file Editline.cpp.

References history_w, history_winit, m_event, and m_history.

◆ ~EditlineHistory()

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

Definition at line 244 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 275 of file Editline.cpp.

References history_w, m_event, and m_history.

◆ GetHistory()

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

Definition at line 253 of file Editline.cpp.

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 273 of file Editline.cpp.

References m_history.

◆ IsValid()

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

Definition at line 271 of file Editline.cpp.

References m_history.

◆ Load()

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

Definition at line 280 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 291 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 306 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 304 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 311 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 309 of file Editline.cpp.

Referenced by GetHistoryFilePath().


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