24 #include <aspect/inifins/mainloop.h> 25 #include <aspect/mainloop.h> 26 #include <aspect/mainloop/employer.h> 27 #include <aspect/blocked_timing/executor.h> 28 #include <core/threading/thread_finalizer.h> 48 __employer = employer;
58 if (mainloop_thread == NULL) {
60 "MainLoopAspect, but RTTI says it " 61 "has not. ", thread->
name());
66 "in wait-for-wakeup mode.");
70 __mainloop_uc.add(mainloop_thread);
86 if (mainloop_thread == NULL) {
88 "MainLoopAspect, but RTTI says it " 89 "has not. ", thread->
name());
94 __mainloop_uc.remove(mainloop_thread);
107 if ( (mainloop_thread = dynamic_cast<MainLoopAspect *>(thread)) != NULL ) {
124 if ( (mainloop_thread = dynamic_cast<MainLoopAspect *>(thread)) != NULL ) {
126 __mainloop_uc.remove(mainloop_thread);
void add_notification_listener(ThreadNotificationListener *notification_listener)
Add notification listener.
virtual void set_mainloop_thread(Thread *mainloop_thread)=0
Set a new main loop.
Thread aspect that allows to replace the main loop of the main application of Fawkes.
Fawkes library namespace.
virtual bool thread_init_failed(Thread *thread)
Thread initialization failed.
Thread class encapsulation of pthreads.
OpMode opmode() const
Get operation mode.
virtual bool thread_started(Thread *thread)
Thread started successfully.
Thread cannot be initialized.
Base class for exceptions in Fawkes.
virtual void finalize(Thread *thread)
Finalize thread.
const char * name() const
Get name of thread.
virtual void init(Thread *thread)
Initialize thread.
void init_MainLoopAspect(BlockedTimingExecutor *btexec)
Initialize main loop aspect.
Main loop employer The MainLoopEmployer calls the main loop for execution.
Thread cannot be finalized.
MainLoopAspectIniFin(MainLoopEmployer *employer, BlockedTimingExecutor *btexec)
Constructor.
operate in wait-for-wakeup mode
void append(const char *format,...)
Append messages to the message list.
Aspect initializer/finalizer base class.