OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "basicmod.h"
15 #include "callback.h"
16 #include "ptrman.h"
17 
18 namespace DBG { mGlobal(Basic) void forceCrash(bool); }
19 
25 {
26 public:
27 
28  static void initClass();
29 
30  enum EvType {
37  Kill // This process
38  };
39 
40  static void startNotify(EvType,const CallBack&);
41  static void stopNotify(EvType,const CallBack&);
42  static void stopProcess(int,bool friendly=true);
43  static void stopRemote( const char*,int, bool friendly=true,
44  const char* rshcomm=0 );
45  static void initFatalSignalHandling();
46 
47 protected:
48 
51  static SignalHandling& SH();
61 
63 
64  static void handle(int);
65 
66  void doKill(int);
67  void doStop(int,bool withcbs=true);
68  void doCont();
69  void handleConn();
70  void handleChld();
71  void handleAlarm();
72  void handleReInit();
73 
74 
75  friend void DBG::forceCrash(bool);
76 
77 };
78 
79 
SignalHandling::reinitcbs_
CallBackSet & reinitcbs_
Definition: sighndl.h:56
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
SignalHandling::Stop
@ Stop
Definition: sighndl.h:34
SignalHandling::getCBL
CallBackSet & getCBL(EvType)
SignalHandling::alarmcbs_
CallBackSet & alarmcbs_
Definition: sighndl.h:59
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
SignalHandling::doKill
void doKill(int)
SignalHandling::stopRemote
static void stopRemote(const char *, int, bool friendly=true, const char *rshcomm=0)
SignalHandling::SH
static SignalHandling & SH()
SignalHandling::stopcbs_
CallBackSet & stopcbs_
Definition: sighndl.h:57
CallBackSet
TypeSet of CallBacks with a few extras.
Definition: callback.h:152
SignalHandling::Alarm
@ Alarm
Definition: sighndl.h:36
SignalHandling::conncbs_
CallBackSet & conncbs_
Definition: sighndl.h:54
callback.h
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
SignalHandling::stopProcess
static void stopProcess(int, bool friendly=true)
SignalHandling::SignalHandling
SignalHandling()
SignalHandling::initFatalSignalHandling
static void initFatalSignalHandling()
SignalHandling::handle
static void handle(int)
CallBack
CallBacks object-oriented (object + method).
Definition: callback.h:62
ptrman.h
SignalHandling::killcbs_
CallBackSet & killcbs_
Definition: sighndl.h:60
SignalHandling::Cont
@ Cont
Definition: sighndl.h:35
SignalHandling::EvType
EvType
Definition: sighndl.h:30
SignalHandling::contcbs_
CallBackSet & contcbs_
Definition: sighndl.h:58
SignalHandling::handleAlarm
void handleAlarm()
SignalHandling::ChldStop
@ ChldStop
Definition: sighndl.h:32
SignalHandling::handleReInit
void handleReInit()
SignalHandling::stopNotify
static void stopNotify(EvType, const CallBack &)
SignalHandling::startNotify
static void startNotify(EvType, const CallBack &)
SignalHandling::handleChld
void handleChld()
SignalHandling::initClass
static void initClass()
SignalHandling::chldcbs_
CallBackSet & chldcbs_
Definition: sighndl.h:55
DBG::forceCrash
void forceCrash(bool withdump)
SignalHandling::doCont
void doCont()
DBG
Defines a generic interface for supplying debug/runtime info.
Definition: debug.h:33
SignalHandling::doStop
void doStop(int, bool withcbs=true)
SignalHandling::handleConn
void handleConn()
SignalHandling::~SignalHandling
~SignalHandling()
SignalHandling
Asynchronous event handling and notification.
Definition: sighndl.h:25
SignalHandling::ReInit
@ ReInit
Definition: sighndl.h:33
SignalHandling::ConnClose
@ ConnClose
Definition: sighndl.h:31

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