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

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