Fawkes API  Fawkes Development Version
fawkes::MainLoopAspect Class Reference

Thread aspect that allows to replace the main loop of the main application of Fawkes. More...

#include <>>

Inheritance diagram for fawkes::MainLoopAspect:

Public Member Functions

 MainLoopAspect ()
 Constructor. More...
 
virtual ~MainLoopAspect ()
 Virtual empty destructor. More...
 
void init_MainLoopAspect (BlockedTimingExecutor *btexec)
 Initialize main loop aspect. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Protected Attributes

BlockedTimingExecutorblocked_timing_executor
 This is a blocked timing executor instance which can be used to run threads with the BlockedTimingAspect. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

Detailed Description

Thread aspect that allows to replace the main loop of the main application of Fawkes.

Warning, replacing the main loop may severely interfere with the functionality of Fawkes. Make sure that you know what the main loop needs, what it has to do and what it should not do.

At any given time there can only be one thread active with this aspect.

Author
Tim Niemueller

Definition at line 37 of file mainloop.h.

Constructor & Destructor Documentation

◆ MainLoopAspect()

fawkes::MainLoopAspect::MainLoopAspect ( )

Constructor.

Definition at line 50 of file mainloop.cpp.

References fawkes::Aspect::add_aspect().

◆ ~MainLoopAspect()

fawkes::MainLoopAspect::~MainLoopAspect ( )
virtual

Virtual empty destructor.

Definition at line 56 of file mainloop.cpp.

Member Function Documentation

◆ init_MainLoopAspect()

void fawkes::MainLoopAspect::init_MainLoopAspect ( BlockedTimingExecutor btexec)

Initialize main loop aspect.

Called from the Aspect initializer.

Parameters
btexecblocked timing executor instance that can be used to run threads that have the blocked timing aspect. It's accessible as blocked_timing_aspect.

Definition at line 68 of file mainloop.cpp.

References blocked_timing_executor.

Referenced by fawkes::MainLoopAspectIniFin::init().

Member Data Documentation

◆ blocked_timing_executor

BlockedTimingExecutor * fawkes::MainLoopAspect::blocked_timing_executor
protected

This is a blocked timing executor instance which can be used to run threads with the BlockedTimingAspect.

Definition at line 46 of file mainloop.h.

Referenced by init_MainLoopAspect(), and TimeTrackerMainLoopThread::loop().


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