Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
mainloop.cpp
1
2
/***************************************************************************
3
* mainloop.cpp - Main loop aspect for Fawkes
4
*
5
* Created: Sat Aug 02 00:16:30 2008
6
* Copyright 2008-2010 Tim Niemueller [www.niemueller.de]
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 <aspect/mainloop.h>
25
26
namespace
fawkes
{
27
#if 0
/* just to make Emacs auto-indent happy */
28
}
29
#endif
30
31
/** @class MainLoopAspect <aspect/mainloop.h>
32
* Thread aspect that allows to replace the main loop of the main application
33
* of Fawkes.
34
* Warning, replacing the main loop may severely interfere with the
35
* functionality of Fawkes. Make sure that you know what the main loop
36
* needs, what it has to do and what it should not do.
37
*
38
* At any given time there can only be one thread active with this aspect.
39
*
40
* @ingroup Aspects
41
* @author Tim Niemueller
42
*/
43
44
/** @var BlockedTimingExecutor * MainLoopAspect::blocked_timing_executor
45
* This is a blocked timing executor instance which can be used to run threads
46
* with the BlockedTimingAspect.
47
*/
48
49
/** Constructor. */
50
MainLoopAspect::MainLoopAspect()
51
{
52
add_aspect(
"MainLoopAspect"
);
53
}
54
55
/** Virtual empty destructor. */
56
MainLoopAspect::~MainLoopAspect()
57
{
58
}
59
60
61
/** Initialize main loop aspect.
62
* Called from the Aspect initializer.
63
* @param btexec blocked timing executor instance that can be used to run
64
* threads that have the blocked timing aspect. It's accessible as
65
* blocked_timing_aspect.
66
*/
67
void
68
MainLoopAspect::init_MainLoopAspect(
BlockedTimingExecutor
*btexec)
69
{
70
blocked_timing_executor = btexec;
71
}
72
73
}
// end namespace fawkes
fawkes
Fawkes library namespace.
fawkes::BlockedTimingExecutor
Blocked timing executor.
Definition:
executor.h:35
src
libs
aspect
mainloop.cpp
Generated by
1.8.10