LLDB mainline
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
lldb_private::MainLoopBase Class Referenceabstract

#include <MainLoopBase.h>

Inheritance diagram for lldb_private::MainLoopBase:
Inheritance graph
[legend]

Classes

class  ReadHandle
 

Public Types

typedef std::unique_ptr< ReadHandleReadHandleUP
 
typedef std::function< void(MainLoopBase &)> Callback
 

Public Member Functions

 MainLoopBase ()
 
virtual ~MainLoopBase ()=default
 
virtual ReadHandleUP RegisterReadObject (const lldb::IOObjectSP &object_sp, const Callback &callback, Status &error)=0
 
void AddPendingCallback (const Callback &callback)
 
virtual Status Run ()
 
virtual void RequestTermination ()
 

Protected Member Functions

ReadHandleUP CreateReadHandle (const lldb::IOObjectSP &object_sp)
 
virtual void UnregisterReadObject (IOObject::WaitableHandle handle)=0
 
virtual void TriggerPendingCallbacks ()=0
 
void ProcessPendingCallbacks ()
 

Protected Attributes

std::mutex m_callback_mutex
 
std::vector< Callbackm_pending_callbacks
 
bool m_terminate_request: 1
 

Private Member Functions

 MainLoopBase (const MainLoopBase &)=delete
 
const MainLoopBaseoperator= (const MainLoopBase &)=delete
 

Detailed Description

Definition at line 36 of file MainLoopBase.h.

Member Typedef Documentation

◆ Callback

typedef std::function<void(MainLoopBase &)> lldb_private::MainLoopBase::Callback

Definition at line 46 of file MainLoopBase.h.

◆ ReadHandleUP

Definition at line 44 of file MainLoopBase.h.

Constructor & Destructor Documentation

◆ MainLoopBase() [1/2]

lldb_private::MainLoopBase::MainLoopBase ( )
inline

Definition at line 41 of file MainLoopBase.h.

◆ ~MainLoopBase()

virtual lldb_private::MainLoopBase::~MainLoopBase ( )
virtualdefault

◆ MainLoopBase() [2/2]

lldb_private::MainLoopBase::MainLoopBase ( const MainLoopBase )
privatedelete

Member Function Documentation

◆ AddPendingCallback()

void MainLoopBase::AddPendingCallback ( const Callback callback)

◆ CreateReadHandle()

ReadHandleUP lldb_private::MainLoopBase::CreateReadHandle ( const lldb::IOObjectSP object_sp)
inlineprotected

◆ operator=()

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

◆ ProcessPendingCallbacks()

void MainLoopBase::ProcessPendingCallbacks ( )
protected

◆ RegisterReadObject()

virtual ReadHandleUP lldb_private::MainLoopBase::RegisterReadObject ( const lldb::IOObjectSP object_sp,
const Callback callback,
Status error 
)
pure virtual

◆ RequestTermination()

virtual void lldb_private::MainLoopBase::RequestTermination ( )
inlinevirtual

◆ Run()

virtual Status lldb_private::MainLoopBase::Run ( )
inlinevirtual

Reimplemented in lldb_private::MainLoopPosix, and lldb_private::MainLoopWindows.

Definition at line 59 of file MainLoopBase.h.

◆ TriggerPendingCallbacks()

virtual void lldb_private::MainLoopBase::TriggerPendingCallbacks ( )
protectedpure virtual

◆ UnregisterReadObject()

virtual void lldb_private::MainLoopBase::UnregisterReadObject ( IOObject::WaitableHandle  handle)
protectedpure virtual

Member Data Documentation

◆ m_callback_mutex

std::mutex lldb_private::MainLoopBase::m_callback_mutex
protected

Definition at line 78 of file MainLoopBase.h.

Referenced by AddPendingCallback(), and ProcessPendingCallbacks().

◆ m_pending_callbacks

std::vector<Callback> lldb_private::MainLoopBase::m_pending_callbacks
protected

Definition at line 79 of file MainLoopBase.h.

Referenced by AddPendingCallback(), and ProcessPendingCallbacks().

◆ m_terminate_request

bool lldb_private::MainLoopBase::m_terminate_request
protected

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