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
MaskSet.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//------------------------------------------------------------------------------
3
// MaskSet.h
4
//------------------------------------------------------------------------------
5
// Copyright (c) 1999 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 MASK_SET_H
13
#define MASK_SET_H
14
15
#include "
assa/FdSet.h
"
16
17
namespace
ASSA {
18
24
class
MaskSet
25
{
26
public
:
28
FdSet
m_rset
;
29
31
FdSet
m_wset
;
32
34
FdSet
m_eset
;
35
36
public
:
38
void
reset
();
39
41
void
sync
();
42
44
int
max_fd
();
45
47
void
dump
();
48
};
49
50
inline
void
51
MaskSet::
52
sync
()
53
{
54
m_rset
.
sync
();
55
m_wset
.
sync
();
56
m_eset
.
sync
();
57
}
58
59
60
inline
void
61
MaskSet::
62
reset
()
63
{
64
m_rset
.
reset
();
65
m_wset
.
reset
();
66
m_eset
.
reset
();
67
}
68
69
inline
int
70
MaskSet::
71
max_fd
()
72
{
73
return
(std::max (
m_rset
.
maxInSet
(),
74
std::max (
m_wset
.
maxInSet
(),
75
m_eset
.
maxInSet
())));
76
}
77
78
inline
void
79
MaskSet::
80
dump
()
81
{
82
DL
((
REACTTRACE
,
"+---------------------------\n"
));
83
DL
((
REACTTRACE
,
"| RD FDs set %s\n"
,
m_rset
.
dump_c_str
().c_str ()));
84
DL
((
REACTTRACE
,
"| WR FDs set %s\n"
,
m_wset
.
dump_c_str
().c_str ()));
85
DL
((
REACTTRACE
,
"| EX FDs set %s\n"
,
m_eset
.
dump_c_str
().c_str ()));
86
DL
((
REACTTRACE
,
"+---------------------------\n"
));
87
}
88
89
}
// end namespace ASSA
90
91
#endif
/* MASK_SET_H */
Generated on Tue Jun 19 2012 07:33:38 for libassa by
1.8.1.1