aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/SignalHandler.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/SignalHandler.hh')
-rw-r--r--src/FbTk/SignalHandler.hh48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/FbTk/SignalHandler.hh b/src/FbTk/SignalHandler.hh
index aa3a275..41220b6 100644
--- a/src/FbTk/SignalHandler.hh
+++ b/src/FbTk/SignalHandler.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: SignalHandler.hh,v 1.2 2002/11/27 21:47:33 fluxgen Exp $ 22// $Id: SignalHandler.hh,v 1.3 2002/12/01 13:42:14 rathnor Exp $
23 23
24#ifndef FBTK_SIGNALHANDLER_HH 24#ifndef FBTK_SIGNALHANDLER_HH
25#define FBTK_SIGNALHANDLER_HH 25#define FBTK_SIGNALHANDLER_HH
@@ -31,38 +31,38 @@ namespace FbTk {
31 31
32class SignalEventHandler { 32class SignalEventHandler {
33public: 33public:
34 virtual void handleSignal(int signum) = 0; 34 virtual void handleSignal(int signum) = 0;
35}; 35};
36 36
37/** 37/**
38 Handles system signals, singleton. 38 Handles system signals, singleton.
39 Usage: inherit the class EventHandler and then register 39 Usage: inherit the class EventHandler and then register
40 it to SignalHandler by calling registerHandler with 40 it to SignalHandler by calling registerHandler with
41 a signal number 41 a signal number
42*/ 42*/
43class SignalHandler { 43class SignalHandler {
44public: 44public:
45 /// get singleton object 45 /// get singleton object
46 static SignalHandler *instance(); 46 static SignalHandler *instance();
47 /** 47 /**
48 Register an event handler 48 Register an event handler
49 @return true on success else false 49 @return true on success else false
50 @param signum signal number 50 @param signum signal number
51 @param eh event handler 51 @param eh event handler
52 @param oldhandler_ret return handler to old sighandler 52 @param oldhandler_ret return handler to old sighandler
53 */ 53 */
54 bool registerHandler(int signum, SignalEventHandler *eh, SignalEventHandler **oldhandler_ret = 0); 54 bool registerHandler(int signum, SignalEventHandler *eh, SignalEventHandler **oldhandler_ret = 0);
55 /** 55 /**
56 removes the signum handler 56 removes the signum handler
57 @param signum signal number 57 @param signum signal number
58 */ 58 */
59 void removeHandler(int signum); 59 void removeHandler(int signum);
60private: 60private:
61 SignalHandler(); 61 SignalHandler();
62 62
63 static void handleSignal(int signum); 63 static void handleSignal(int signum);
64 64
65 static SignalEventHandler *s_signal_handler[NSIG]; ///< NSIG defined in signal.h 65 static SignalEventHandler *s_signal_handler[NSIG]; ///< NSIG defined in signal.h
66}; 66};
67 67
68}; // end namespace FbTk 68}; // end namespace FbTk