sigx++  2.0.1
threadable.h
Go to the documentation of this file.
1 #ifndef _SIGX_THREADABLE_HPP_
2 #define _SIGX_THREADABLE_HPP_
3 
4 /*
5  * Copyright 2006 Klaus Triendl
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21 */
22 
28 #include <sigxconfig.h>
30 
31 
32 namespace sigx
33 {
34 
42 class SIGX_API threadable: public manual_dispatchable
43 {
44 protected:
56  virtual void on_startup() {}
57 
66  virtual void on_cleanup() {}
67 };
68 
69 
70 } // namespace sigx
71 
72 
73 #endif // end file guard
Derived classes denote that they are a thread wrapper.
Definition: threadable.h:42
virtual void on_startup()
Initialize thread specific stuff just before entering the thread's mainloop.
Definition: threadable.h:56
virtual void on_cleanup()
cleanup other stuff just after quitting the mainloop.
Definition: threadable.h:66
Definition: auto_dispatchable.h:27
A dispatchable whose dispatcher pointer is managed by derived classes.
Definition: manual_dispatchable.h:39