Ardour  9.0-pre0-582-g084a23a80d
PBD::EventLoop Class Referenceabstract

#include <event_loop.h>

Inheritance diagram for PBD::EventLoop:
[legend]

Classes

struct  BaseRequestObject
 
struct  InvalidationRecord
 
struct  RequestBufferSupplier
 
struct  ThreadBufferMapping
 

Public Types

enum  RequestType { range_guarantee = ~0 }
 

Public Member Functions

 EventLoop (std::string const &)
 
virtual ~EventLoop ()
 
virtual bool call_slot (InvalidationRecord *, const std::function< void()> &)=0
 
virtual Glib::Threads::RWLock & slot_invalidation_rwlock ()=0
 
std::string event_loop_name () const
 

Static Public Member Functions

static void * invalidate_request (void *data)
 
static EventLoopget_event_loop_for_thread ()
 
static void set_event_loop_for_thread (EventLoop *ui)
 
static std::vector< ThreadBufferMappingget_request_buffers_for_target_thread (const std::string &)
 
static void pre_register (const std::string &emitting_thread_name, uint32_t num_requests)
 
static void remove_request_buffer_from_map (pthread_t)
 
static InvalidationRecord__invalidator (sigc::trackable &trackable, const char *, int)
 

Public Attributes

std::list< InvalidationRecord * > trash
 

Private Types

typedef std::vector< ThreadBufferMappingThreadRequestBufferList
 
typedef std::vector< RequestBufferSupplierRequestBufferSuppliers
 

Private Attributes

std::string _name
 

Static Private Attributes

static Glib::Threads::Private< EventLoopthread_event_loop
 
static ThreadRequestBufferList thread_buffer_requests
 
static Glib::Threads::Mutex thread_buffer_requests_lock
 
static RequestBufferSuppliers request_buffer_suppliers
 

Detailed Description

An EventLoop is as basic abstraction designed to be used with any "user interface" (not necessarily graphical) that needs to wait on events/requests and dispatch/process them as they arrive.

This is a very basic class that doesn't by itself provide an actual event loop or thread. See BaseUI for the "real" object to be used when something like this is needed (it inherits from EventLoop).

Definition at line 44 of file event_loop.h.

Member Typedef Documentation

◆ RequestBufferSuppliers

Definition at line 132 of file event_loop.h.

◆ ThreadRequestBufferList

Definition at line 115 of file event_loop.h.

Member Enumeration Documentation

◆ RequestType

Enumerator
range_guarantee 

Definition at line 50 of file event_loop.h.

Constructor & Destructor Documentation

◆ EventLoop()

PBD::EventLoop::EventLoop ( std::string const &  )

◆ ~EventLoop()

virtual PBD::EventLoop::~EventLoop ( )
virtual

Member Function Documentation

◆ __invalidator()

static InvalidationRecord* PBD::EventLoop::__invalidator ( sigc::trackable &  trackable,
const char *  ,
int   
)
static

◆ call_slot()

virtual bool PBD::EventLoop::call_slot ( InvalidationRecord ,
const std::function< void()> &   
)
pure virtual

◆ event_loop_name()

std::string PBD::EventLoop::event_loop_name ( ) const
inline

Definition at line 92 of file event_loop.h.

◆ get_event_loop_for_thread()

static EventLoop* PBD::EventLoop::get_event_loop_for_thread ( )
static

◆ get_request_buffers_for_target_thread()

static std::vector<ThreadBufferMapping> PBD::EventLoop::get_request_buffers_for_target_thread ( const std::string &  )
static

◆ invalidate_request()

static void* PBD::EventLoop::invalidate_request ( void *  data)
static

◆ pre_register()

static void PBD::EventLoop::pre_register ( const std::string &  emitting_thread_name,
uint32_t  num_requests 
)
static

◆ remove_request_buffer_from_map()

static void PBD::EventLoop::remove_request_buffer_from_map ( pthread_t  )
static

◆ set_event_loop_for_thread()

static void PBD::EventLoop::set_event_loop_for_thread ( EventLoop ui)
static

◆ slot_invalidation_rwlock()

Member Data Documentation

◆ _name

std::string PBD::EventLoop::_name
private

Definition at line 113 of file event_loop.h.

◆ request_buffer_suppliers

RequestBufferSuppliers PBD::EventLoop::request_buffer_suppliers
staticprivate

Definition at line 133 of file event_loop.h.

◆ thread_buffer_requests

ThreadRequestBufferList PBD::EventLoop::thread_buffer_requests
staticprivate

Definition at line 116 of file event_loop.h.

◆ thread_buffer_requests_lock

Glib::Threads::Mutex PBD::EventLoop::thread_buffer_requests_lock
staticprivate

Definition at line 117 of file event_loop.h.

◆ thread_event_loop

Glib::Threads::Private<EventLoop> PBD::EventLoop::thread_event_loop
staticprivate

Definition at line 112 of file event_loop.h.

◆ trash

std::list<InvalidationRecord*> PBD::EventLoop::trash

Definition at line 107 of file event_loop.h.


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