OpendTect
6.3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
master_od_source
include
Basic
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
23
mExpClass
(Basic)
SignalHandling
: public
CallBacker
24
{
25
public
:
26
27
static
void
initClass
();
28
29
enum
EvType
{
30
ConnClose
,
31
ChldStop
,
32
ReInit
,
33
Stop
,
34
Cont
,
35
Alarm
,
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
48
SignalHandling
();
49
~
SignalHandling
();
50
static
SignalHandling
& SH();
53
CallBackSet
&
conncbs_
;
54
CallBackSet
&
chldcbs_
;
55
CallBackSet
&
reinitcbs_
;
56
CallBackSet
&
stopcbs_
;
57
CallBackSet
&
contcbs_
;
58
CallBackSet
&
alarmcbs_
;
59
CallBackSet
&
killcbs_
;
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
};
mExpClass
#define mExpClass(module)
Definition:
commondefs.h:157
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition:
callback.h:182
mGlobal
#define mGlobal(module)
Definition:
commondefs.h:160
ptrman.h
SignalHandling::Stop
Definition:
sighndl.h:33
callback.h
SignalHandling::stopcbs_
CallBackSet & stopcbs_
Definition:
sighndl.h:56
SignalHandling::ReInit
Definition:
sighndl.h:32
SignalHandling::alarmcbs_
CallBackSet & alarmcbs_
Definition:
sighndl.h:58
SignalHandling::reinitcbs_
CallBackSet & reinitcbs_
Definition:
sighndl.h:55
SignalHandling::Alarm
Definition:
sighndl.h:35
SignalHandling
Asynchronous event handling and notification.
Definition:
sighndl.h:23
SignalHandling::ChldStop
Definition:
sighndl.h:31
SignalHandling::conncbs_
CallBackSet & conncbs_
Definition:
sighndl.h:53
SignalHandling::ConnClose
Definition:
sighndl.h:30
DBG
Defines a generic interface for supplying debug/runtime info.
Definition:
debug.h:31
handle
C & handle()
Definition:
i_uiobjqtbody.h:105
SignalHandling::chldcbs_
CallBackSet & chldcbs_
Definition:
sighndl.h:54
SignalHandling::Cont
Definition:
sighndl.h:34
DBG::forceCrash
void forceCrash(bool withdump)
CallBackSet
TypeSet of CallBacks with a few extras.
Definition:
callback.h:149
SignalHandling::contcbs_
CallBackSet & contcbs_
Definition:
sighndl.h:57
SignalHandling::killcbs_
CallBackSet & killcbs_
Definition:
sighndl.h:59
CallBack
CallBacks object-oriented (object + method).
Definition:
callback.h:62
initClass
static void initClass()
SignalHandling::EvType
EvType
Definition:
sighndl.h:29
Generated at for the
OpendTect
seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017