libassa
3.5.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
assa
SigSet.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//------------------------------------------------------------------------------
3
// SigSet.h
4
//------------------------------------------------------------------------------
5
// Copyright (c) 1997 by Vladislav Grinchenko
6
//
7
// This library is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Library General Public
9
// License as published by the Free Software Foundation; either
10
// version 2 of the License, or (at your option) any later version.
11
//------------------------------------------------------------------------------
12
#ifndef _SigSet_h
13
#define _SigSet_h
14
15
// System includes
16
//
17
#include <signal.h>
18
#include <errno.h>
19
20
namespace
ASSA {
21
22
#if !defined(WIN32)
23
52
class
SigSet
53
{
54
public
:
58
SigSet
();
59
62
SigSet
(sigset_t* source_);
63
66
~SigSet
();
67
74
int
empty
(
void
);
75
82
int
fill
(
void
);
83
90
int
add
(
int
signo_);
91
97
int
del
(
int
signo_);
98
104
int
is_member
(
int
signo_);
105
109
operator
sigset_t *();
110
111
private
:
113
sigset_t
m_sigset
;
114
};
115
116
inline
117
SigSet::
118
SigSet
() { (int) sigemptyset(&
m_sigset
); }
119
120
inline
121
SigSet::
122
SigSet
(sigset_t* s_) {
m_sigset
= *s_; }
123
124
inline
125
SigSet::
126
~SigSet
() {
/* no-op */
}
127
128
inline
int
129
SigSet::
130
empty
(
void
) {
return
sigemptyset(&
m_sigset
); }
131
132
inline
int
133
SigSet::
134
fill
(
void
) {
return
sigfillset(&
m_sigset
); }
135
136
inline
int
137
SigSet::
138
add
(
int
signo_) {
return
sigaddset(&
m_sigset
,signo_); }
139
140
inline
int
141
SigSet::
142
del
(
int
signo_) {
return
sigdelset(&
m_sigset
,signo_); }
143
144
inline
int
145
SigSet::
146
is_member
(
int
signo_) {
return
sigismember(&
m_sigset
,signo_); }
147
148
inline
149
SigSet::
150
operator sigset_t *() {
return
&m_sigset; }
151
152
#endif // !defined(WIN32)
153
154
}
// end namespace ASSA
155
156
#endif
/* _SigSet_h */
Generated on Tue Jun 19 2012 07:42:06 for libassa by
1.8.1.1