foobar2000 SDK  2015-01-14
Public Member Functions | Private Attributes
threaded_process_callback_redir< TTarget >

#include <threaded_process.h>

+ Inheritance diagram for threaded_process_callback_redir< TTarget >:

Public Member Functions

 threaded_process_callback_redir (TTarget *target)
 
void on_done (HWND p_wnd, bool p_was_aborted)
 
void on_init (HWND p_wnd)
 
void run (threaded_process_status &p_status, abort_callback &p_abort)
 
- Public Member Functions inherited from threaded_process_callback
 FB2K_MAKE_SERVICE_INTERFACE (threaded_process_callback, service_base)
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Private Attributes

const service_ptr_t< TTarget > m_target
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

template<typename TTarget>
class threaded_process_callback_redir< TTarget >

Helper - forward threaded_process_callback calls to a service object that for whatever reason cannot publish threaded_process_callback API by itself.

Definition at line 111 of file threaded_process.h.

Constructor & Destructor Documentation

template<typename TTarget >
threaded_process_callback_redir< TTarget >::threaded_process_callback_redir ( TTarget *  target)
inline

Definition at line 113 of file threaded_process.h.

113 : m_target(target) {}
const service_ptr_t< TTarget > m_target

Member Function Documentation

template<typename TTarget >
void threaded_process_callback_redir< TTarget >::on_done ( HWND  p_wnd,
bool  p_was_aborted 
)
inlinevirtual

Called after the worker thread has finished executing.

Reimplemented from threaded_process_callback.

Definition at line 116 of file threaded_process.h.

116 {m_target->tpc_on_done(p_wnd, p_was_aborted); }
const service_ptr_t< TTarget > m_target
template<typename TTarget >
void threaded_process_callback_redir< TTarget >::on_init ( HWND  p_wnd)
inlinevirtual

Called from the main thread before spawning the worker thread.
Note that you should not access the window handle passed to on_init() in the worker thread later on.

Reimplemented from threaded_process_callback.

Definition at line 114 of file threaded_process.h.

114 {m_target->tpc_on_init(p_wnd);}
const service_ptr_t< TTarget > m_target
template<typename TTarget >
void threaded_process_callback_redir< TTarget >::run ( threaded_process_status p_status,
abort_callback p_abort 
)
inlinevirtual

Called from the worker thread. Do all the hard work here.

Implements threaded_process_callback.

Definition at line 115 of file threaded_process.h.

115 {m_target->tpc_run(p_status, p_abort);}
const service_ptr_t< TTarget > m_target

Field Documentation

template<typename TTarget >
const service_ptr_t<TTarget> threaded_process_callback_redir< TTarget >::m_target
private

Definition at line 118 of file threaded_process.h.


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