Fawkes API  Fawkes Development Version
thread_loop_listener.cpp
1 
2 /***************************************************************************
3  * thread_loop_listener.cpp - thread notification listener interface
4  *
5  * Created: Thu Feb 19 13:50:42 2015
6  * Copyright 2015 Till Hofmann
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #include <core/threading/thread_loop_listener.h>
25 
26 namespace fawkes {
27 
28 /** @class ThreadLoopListener <core/threading/thread_loop_listener.h>
29  * Thread loop listener interface.
30  * A thread loop listener can be added to a thread to define pre and post loop
31  * tasks, which are executed before and after every loop.
32  *
33  * @author Till Hofmann
34  */
35 
36 /** Virtual empty destructor. */
38 {
39 }
40 
41 /** Empty stub for the pre loop function of the loop listener.
42  * This function is called by the thread every time before loop() is called.
43  * Provide a stub such that not every derived class must implement the function.
44  * @param thread thread this loop listener belongs to
45  */
46 void
48 {
49 }
50 
51 /** Empty stub for the post loop function of the loop listener.
52  * This function is called by the thread every time after loop() returned.
53  * Provide a stub such that not every derived class must implement the function.
54  * @param thread thread this loop listener belongs to
55  */
56 void
58 {
59 }
60 
61 } // end namespace fawkes
virtual void post_loop(Thread *thread)
Empty stub for the post loop function of the loop listener.
virtual void pre_loop(Thread *thread)
Empty stub for the pre loop function of the loop listener.
virtual ~ThreadLoopListener()
Virtual empty destructor.
Thread class encapsulation of pthreads.
Definition: thread.h:46
Fawkes library namespace.