Ardour  9.0-pre0-582-g084a23a80d
AbstractUI< RequestObject > Class Template Referenceabstract

#include <abstract_ui.h>

Inheritance diagram for AbstractUI< RequestObject >:
[legend]

Classes

struct  RequestBuffer
 

Public Member Functions

 AbstractUI (const std::string &name)
 
virtual ~AbstractUI ()
 
void register_thread (pthread_t, std::string, uint32_t num_requests)
 
bool call_slot (EventLoop::InvalidationRecord *, const std::function< void()> &)
 
Glib::Threads::RWLock & slot_invalidation_rwlock ()
 
- Public Member Functions inherited from BaseUI
 BaseUI (const std::string &name)
 
virtual ~BaseUI ()
 
BaseUIbase_instance ()
 
Glib::RefPtr< Glib::MainLoop > main_loop () const
 
bool caller_is_self () const
 
bool ok () const
 
void run ()
 
void quit ()
 
- Public Member Functions inherited from PBD::EventLoop
 EventLoop (std::string const &)
 
virtual ~EventLoop ()
 
virtual bool call_slot (InvalidationRecord *, const std::function< void()> &)=0
 
std::string event_loop_name () const
 

Public Attributes

Glib::Threads::RWLock request_buffer_map_lock
 
- Public Attributes inherited from PBD::EventLoop
std::list< InvalidationRecord * > trash
 

Protected Types

typedef RequestBuffer::rw_vector RequestBufferVector
 
typedef std::map< pthread_t, RequestBuffer * >::iterator RequestBufferMapIterator
 
typedef std::map< pthread_t, RequestBuffer * > RequestBufferMap
 

Protected Member Functions

RequestObject * get_request (RequestType)
 
void handle_ui_requests ()
 
void send_request (RequestObject *)
 
virtual void do_request (RequestObject *)=0
 
RequestBufferget_per_thread_request_buffer ()
 
- Protected Member Functions inherited from BaseUI
bool signal_running ()
 
virtual void thread_init ()
 
int set_thread_priority () const
 
bool request_handler (Glib::IOCondition)
 
void signal_new_request ()
 
void attach_request_source ()
 
virtual void maybe_install_precall_handler (Glib::RefPtr< Glib::MainContext >)
 

Protected Attributes

RequestBufferMap request_buffers
 
std::list< RequestObject * > request_list
 
PBD::ScopedConnection new_thread_connection
 
- Protected Attributes inherited from BaseUI
bool _ok
 
Glib::RefPtr< Glib::MainLoop > _main_loop
 
Glib::RefPtr< Glib::MainContext > m_context
 
PBD::Thread_run_loop_thread
 
Glib::Threads::Mutex _run_lock
 
Glib::Threads::Cond _running
 

Additional Inherited Members

- Public Types inherited from PBD::EventLoop
enum  RequestType { range_guarantee = ~0 }
 
- Static Public Member Functions inherited from BaseUI
static RequestType new_request_type ()
 
static void set_thread_priority (int p)
 
- Static Public Member Functions inherited from PBD::EventLoop
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)
 
- Static Public Attributes inherited from BaseUI
static RequestType CallSlot
 
static RequestType Quit
 

Detailed Description

template<typename RequestObject>
class AbstractUI< RequestObject >

Definition at line 55 of file abstract_ui.h.

Member Typedef Documentation

◆ RequestBufferMap

template<typename RequestObject >
typedef std::map<pthread_t,RequestBuffer*> AbstractUI< RequestObject >::RequestBufferMap
protected

Definition at line 88 of file abstract_ui.h.

◆ RequestBufferMapIterator

template<typename RequestObject >
typedef std::map<pthread_t,RequestBuffer*>::iterator AbstractUI< RequestObject >::RequestBufferMapIterator
protected

Definition at line 87 of file abstract_ui.h.

◆ RequestBufferVector

template<typename RequestObject >
typedef RequestBuffer::rw_vector AbstractUI< RequestObject >::RequestBufferVector
protected

Definition at line 74 of file abstract_ui.h.

Constructor & Destructor Documentation

◆ AbstractUI()

template<typename RequestObject >
AbstractUI< RequestObject >::AbstractUI ( const std::string &  name)

◆ ~AbstractUI()

template<typename RequestObject >
virtual AbstractUI< RequestObject >::~AbstractUI ( )
virtual

Member Function Documentation

◆ call_slot()

template<typename RequestObject >
bool AbstractUI< RequestObject >::call_slot ( EventLoop::InvalidationRecord *  ,
const std::function< void()> &   
)

◆ do_request()

template<typename RequestObject >
virtual void AbstractUI< RequestObject >::do_request ( RequestObject *  )
protectedpure virtual

◆ get_per_thread_request_buffer()

template<typename RequestObject >
RequestBuffer* AbstractUI< RequestObject >::get_per_thread_request_buffer ( )
protected

◆ get_request()

template<typename RequestObject >
RequestObject* AbstractUI< RequestObject >::get_request ( RequestType  )
protected

◆ handle_ui_requests()

template<typename RequestObject >
void AbstractUI< RequestObject >::handle_ui_requests ( )
protectedvirtual

Derived UI objects must implement this method, which will be called whenever there are requests to be dealt with.

Implements BaseUI.

◆ register_thread()

template<typename RequestObject >
void AbstractUI< RequestObject >::register_thread ( pthread_t  ,
std::string  ,
uint32_t  num_requests 
)

◆ send_request()

template<typename RequestObject >
void AbstractUI< RequestObject >::send_request ( RequestObject *  )
protected

◆ slot_invalidation_rwlock()

template<typename RequestObject >
Glib::Threads::RWLock& AbstractUI< RequestObject >::slot_invalidation_rwlock ( )
inlinevirtual

Implements PBD::EventLoop.

Definition at line 63 of file abstract_ui.h.

Member Data Documentation

◆ new_thread_connection

template<typename RequestObject >
PBD::ScopedConnection AbstractUI< RequestObject >::new_thread_connection
protected

Definition at line 100 of file abstract_ui.h.

◆ request_buffer_map_lock

template<typename RequestObject >
Glib::Threads::RWLock AbstractUI< RequestObject >::request_buffer_map_lock

Definition at line 65 of file abstract_ui.h.

◆ request_buffers

template<typename RequestObject >
RequestBufferMap AbstractUI< RequestObject >::request_buffers
protected

Definition at line 91 of file abstract_ui.h.

◆ request_list

template<typename RequestObject >
std::list<RequestObject*> AbstractUI< RequestObject >::request_list
protected

Definition at line 93 of file abstract_ui.h.


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