1 |
torben |
26 |
#ifndef _PosixSignalHandler_h_ |
2 |
|
|
#define _PosixSignalHandler_h_ |
3 |
|
|
|
4 |
|
|
/** |
5 |
|
|
* Gets a method called when the corresponding signal is received. |
6 |
|
|
* A PosixSignalHandler must be connected to the PosixSignalDispatcher |
7 |
|
|
* for it to be called. |
8 |
|
|
*/ |
9 |
|
|
class PosixSignalHandler |
10 |
|
|
{ |
11 |
|
|
public: |
12 |
torben |
196 |
/** |
13 |
|
|
* This method is called when the specified POSIX signal is |
14 |
|
|
* received by the PosixSignalDispatcher that is managing |
15 |
|
|
* this handler. |
16 |
|
|
*/ |
17 |
|
|
virtual void HandlePosixSignal( int signalNumber ) = 0 ; |
18 |
|
|
|
19 |
|
|
/** |
20 |
|
|
* Destructor is declared virtual as we expect this class to be |
21 |
|
|
* subclassed. It is also declared pure abstract to make this |
22 |
|
|
* class a pure abstract class. |
23 |
|
|
*/ |
24 |
|
|
virtual ~PosixSignalHandler() = 0 ; |
25 |
torben |
26 |
} ; |
26 |
|
|
|
27 |
|
|
inline |
28 |
|
|
PosixSignalHandler::~PosixSignalHandler() |
29 |
|
|
{ |
30 |
torben |
196 |
/* empty */ |
31 |
torben |
26 |
} |
32 |
|
|
#endif // #ifndef _PosixSignalHandler_h_ |