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