Image Component Library (ICL)
ICLUtils
src
ICLUtils
SignalHandler.h
Go to the documentation of this file.
1
/********************************************************************
2
** Image Component Library (ICL) **
3
** **
4
** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5
** Neuroinformatics Group **
6
** Website: www.iclcv.org and **
7
** http://opensource.cit-ec.de/projects/icl **
8
** **
9
** File : ICLUtils/src/ICLUtils/SignalHandler.h **
10
** Module : ICLUtils **
11
** Authors: Christof Elbrechter, Viktor Richter **
12
** **
13
** **
14
** GNU LESSER GENERAL PUBLIC LICENSE **
15
** This file may be used under the terms of the GNU Lesser General **
16
** Public License version 3.0 as published by the **
17
** **
18
** Free Software Foundation and appearing in the file LICENSE.LGPL **
19
** included in the packaging of this file. Please review the **
20
** following information to ensure the license requirements will **
21
** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22
** **
23
** The development of this software was supported by the **
24
** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25
** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26
** Forschungsgemeinschaft (DFG) in the context of the German **
27
** Excellence Initiative. **
28
** **
29
********************************************************************/
30
31
#pragma once
32
33
#include <
ICLUtils/CompatMacros.h
>
34
#include <
ICLUtils/Mutex.h
>
35
#include <
ICLUtils/Macros.h
>
36
#include <string>
37
#include <vector>
38
#include <
ICLUtils/Function.h
>
39
40
namespace
icl
{
41
namespace
utils{
42
44
62
class
ICLUtils_API
SignalHandler
{
63
public
:
65
99
private
:
100
SignalHandler
();
101
102
// todo: later the constructor should be made private!
103
//public:
105
//SignalHandler(const std::string &signalsList="SIGINT,SIGHUP,SIGTERM,SIGSEGV");
106
107
108
public
:
109
//friend class NamedCallbackHandler;
110
112
120
static
void
install(
const
std::string &
id
,
121
Function<void,const std::string&>
handler,
122
const
std::string &signalList=
"SIGINT,SIGTERM,SIGSEGV"
,
123
int
orderPercent = 0);
124
125
static
void
uninstall(
const
std::string &
id
);
126
127
129
131
// virtual ~SignalHandler();
132
134
138
// virtual void handleSignals(const std::string &signalAsString)=0;
139
141
145
// void removeHandle(std::string signalName);
146
148
150
//void removeAllHandles();
151
153
155
//void oldAction(const std::string &signal);
156
157
//private:
159
//std::vector<int> m_vecAssocitatedSignals;
160
};
161
162
}
// namespace utils
163
}
// namespace icl
icl::utils::Function< void, const std::string & >
icl
undocument this line if you encounter any issues!
Definition:
Any.h:37
ICLUtils_API
#define ICLUtils_API
this macros are important for creating dll's
Definition:
CompatMacros.h:171
CompatMacros.h
Macros.h
icl::utils::SignalHandler
C++ Signal-Handler interface class.
Definition:
SignalHandler.h:62
Mutex.h
Function.h
Generated on Mon May 20 2019 12:00:18 for Image Component Library (ICL) by
1.8.15