Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
thread_initializer.cpp
1
2
/***************************************************************************
3
* thread_initializer.cpp - Thread initializer interface
4
*
5
* Created: Fri Jan 12 13:29:29 2007
6
* Copyright 2006-2007 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 <core/threading/thread_initializer.h>
25
26
namespace
fawkes {
27
28
/** @class CannotInitializeThreadException core/threading/thread_initializer.h
29
* Thread cannot be initialized.
30
* Thrown if a thread could not be initialized for whatever reason.
31
* @ingroup Exceptions
32
*/
33
34
/** Constructor.
35
* Make sure you use append() or prepend() to add messages!
36
*/
37
CannotInitializeThreadException::CannotInitializeThreadException
()
38
:
Exception
()
39
{
40
}
41
42
43
/** Constructor.
44
* @param format message format (reason or symptom of failure)
45
*/
46
CannotInitializeThreadException::CannotInitializeThreadException
(
const
char
*format, ...)
47
:
Exception
()
48
{
49
va_list va;
50
va_start(va, format);
51
append_va
(format, va);
52
va_end(va);
53
}
54
55
56
57
/** @class ThreadInitializer core/threading/thread_initializer.h
58
* Thread initializer interface.
59
* This interface is used by the ThreadManager. The init() method is called
60
* for each added thread. If there are any special needs that have to be
61
* initialized before the thread is started on the given real classes of
62
* the thread this is the way to do it. See Fawkes main application for
63
* an example.
64
* @author Tim Niemueller
65
*
66
* @fn void ThreadInitializer::init(Thread *thread) = 0
67
* This method is called by the ThreadManager for each newly added Thread.
68
* @param thread thread to initialize.
69
* @exception CannotInitializeThread thrown if thread can for not be
70
* initialized
71
*/
72
73
/** Virtual empty destructor. */
74
ThreadInitializer::~ThreadInitializer
()
75
{
76
}
77
78
79
}
// end namespace fawkes
src
libs
core
threading
thread_initializer.cpp
Generated by
1.8.1.2