Fawkes API  Fawkes Development Version
fawkes::ThreadNotificationListener Class Referenceabstract

Thread notification listener interface. More...

#include <>>

Inheritance diagram for fawkes::ThreadNotificationListener:

Public Member Functions

virtual ~ThreadNotificationListener ()
 Virtual empty destructor. More...
 
virtual bool thread_started (Thread *thread)=0 throw ()
 Thread started successfully. More...
 
virtual bool thread_init_failed (Thread *thread)=0 throw ()
 Thread initialization failed. More...
 

Detailed Description

Thread notification listener interface.

A thread notification listener can be added to a thread to be notified of a successful startup of if the initialization fails (and hence the thread is never started).

Author
Tim Niemueller

Definition at line 32 of file thread_notification_listener.h.

Constructor & Destructor Documentation

◆ ~ThreadNotificationListener()

fawkes::ThreadNotificationListener::~ThreadNotificationListener ( )
virtual

Virtual empty destructor.

Definition at line 55 of file thread_notification_listener.cpp.

Member Function Documentation

◆ thread_init_failed()

bool fawkes::ThreadNotificationListener::thread_init_failed ( Thread thread)
throw (
)
pure virtual

Thread initialization failed.

This method is called by ThreadList if one of the threads in the list failed to initialize. This is not necessarily the thread that you registered the notification for. However, the argument is always the thread that you registered for, no matter which thread in the list failed.

Parameters
threadthread that you registered for
Returns
true to stay registered for further thread notifications, false to unregister.

Implemented in FvBaseThread, and fawkes::MainLoopAspectIniFin.

◆ thread_started()

bool fawkes::ThreadNotificationListener::thread_started ( Thread thread)
throw (
)
pure virtual

Thread started successfully.

This is called by the thread itself when the thread started successfully.

Parameters
threadthread that started successfully
Returns
true to stay registered for further thread notifications, false to unregister.

Implemented in FvBaseThread, and fawkes::MainLoopAspectIniFin.


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