OpendTect-6_4  6.4
sighndl.h
Go to the documentation of this file.
1 #ifndef sighndl_h
2 #define sighndl_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: April 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "basicmod.h"
16 #include "callback.h"
17 #include "ptrman.h"
18 
19 namespace DBG { mGlobal(Basic) void forceCrash(bool); }
20 
26 {
27 public:
28 
29  static void initClass();
30 
31  enum EvType {
38  Kill // This process
39  };
40 
41  static void startNotify(EvType,const CallBack&);
42  static void stopNotify(EvType,const CallBack&);
43  static void stopProcess(int,bool friendly=true);
44  static void stopRemote( const char*,int, bool friendly=true,
45  const char* rshcomm=0 );
46  static void initFatalSignalHandling();
47 
48 protected:
49 
51  ~SignalHandling();
52  static SignalHandling& SH();
62 
63  CallBackSet& getCBL(EvType);
64 
65  static void handle(int);
66 
67  void doKill(int);
68  void doStop(int,bool withcbs=true);
69  void doCont();
70  void handleConn();
71  void handleChld();
72  void handleAlarm();
73  void handleReInit();
74 
75 
76  friend void DBG::forceCrash(bool);
77 
78 };
79 
80 
81 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mGlobal(module)
Definition: commondefs.h:163
Definition: sighndl.h:35
CallBackSet & stopcbs_
Definition: sighndl.h:58
Definition: sighndl.h:34
CallBackSet & alarmcbs_
Definition: sighndl.h:60
CallBackSet & reinitcbs_
Definition: sighndl.h:57
Definition: sighndl.h:37
Asynchronous event handling and notification.
Definition: sighndl.h:25
Definition: sighndl.h:33
CallBackSet & conncbs_
Definition: sighndl.h:55
Definition: sighndl.h:32
Defines a generic interface for supplying debug/runtime info.
Definition: debug.h:33
C & handle()
Definition: i_uiobjqtbody.h:106
CallBackSet & chldcbs_
Definition: sighndl.h:56
Definition: sighndl.h:36
void forceCrash(bool withdump)
TypeSet of CallBacks with a few extras.
Definition: callback.h:128
CallBackSet & contcbs_
Definition: sighndl.h:59
CallBackSet & killcbs_
Definition: sighndl.h:61
CallBacks object-oriented (object + method).
Definition: callback.h:57
static void initClass()
EvType
Definition: sighndl.h:31

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019