LLDB mainline
|
#include <MainLoopBase.h>
Classes | |
class | ReadHandle |
Public Types | |
typedef std::unique_ptr< ReadHandle > | ReadHandleUP |
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< Callback > | m_pending_callbacks |
bool | m_terminate_request: 1 |
Private Member Functions | |
MainLoopBase (const MainLoopBase &)=delete | |
const MainLoopBase & | operator= (const MainLoopBase &)=delete |
Definition at line 36 of file MainLoopBase.h.
typedef std::function<void(MainLoopBase &)> lldb_private::MainLoopBase::Callback |
Definition at line 46 of file MainLoopBase.h.
typedef std::unique_ptr<ReadHandle> lldb_private::MainLoopBase::ReadHandleUP |
Definition at line 44 of file MainLoopBase.h.
|
inline |
Definition at line 41 of file MainLoopBase.h.
|
virtualdefault |
|
privatedelete |
void MainLoopBase::AddPendingCallback | ( | const Callback & | callback | ) |
Definition at line 14 of file MainLoopBase.cpp.
References m_callback_mutex, m_pending_callbacks, and TriggerPendingCallbacks().
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Exited().
|
inlineprotected |
Definition at line 66 of file MainLoopBase.h.
Referenced by lldb_private::MainLoopPosix::RegisterReadObject(), and lldb_private::MainLoopWindows::RegisterReadObject().
|
privatedelete |
|
protected |
Definition at line 22 of file MainLoopBase.cpp.
References m_callback_mutex, and m_pending_callbacks.
Referenced by lldb_private::MainLoopPosix::Run(), and lldb_private::MainLoopWindows::Run().
|
pure virtual |
Implemented in lldb_private::MainLoopPosix, and lldb_private::MainLoopWindows.
|
inlinevirtual |
Definition at line 63 of file MainLoopBase.h.
References m_terminate_request.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DataAvailableCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vStopped(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Exited().
|
inlinevirtual |
Reimplemented in lldb_private::MainLoopPosix, and lldb_private::MainLoopWindows.
Definition at line 59 of file MainLoopBase.h.
|
protectedpure virtual |
Implemented in lldb_private::MainLoopPosix, and lldb_private::MainLoopWindows.
Referenced by AddPendingCallback().
|
protectedpure virtual |
Implemented in lldb_private::MainLoopPosix, and lldb_private::MainLoopWindows.
Referenced by lldb_private::MainLoopBase::ReadHandle::~ReadHandle().
|
protected |
Definition at line 78 of file MainLoopBase.h.
Referenced by AddPendingCallback(), and ProcessPendingCallbacks().
|
protected |
Definition at line 79 of file MainLoopBase.h.
Referenced by AddPendingCallback(), and ProcessPendingCallbacks().
|
protected |
Definition at line 80 of file MainLoopBase.h.
Referenced by lldb_private::MainLoopPosix::RunImpl::ProcessEvents(), RequestTermination(), lldb_private::MainLoopPosix::Run(), and lldb_private::MainLoopWindows::Run().