File: ACE_Event.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (160 lines) | stat: -rw-r--r-- 5,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
.TH ACE_Event 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Event \- A wrapper around the Win32 event locking mechanism. 
.SH SYNOPSIS
.br
.PP
\fC#include <Synch.h>\fR
.PP
Inherited by \fBACE_Auto_Event\fR, and \fBACE_Manual_Event\fR.
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_Event\fR (int manual_reset = 0, int initial_state = 0, int type = USYNC_THREAD, const \fBACE_TCHAR\fR *name = 0, void *arg = 0)"
.br
.RI "\fIConstructor that creates event.\fR"
.ti -1c
.RI "\fB~ACE_Event\fR (void)"
.br
.RI "\fIImplicitly destroy the event variable.\fR"
.ti -1c
.RI "int \fBremove\fR (void)"
.br
.ti -1c
.RI "ACE_event_t \fBhandle\fR (void) const"
.br
.RI "\fIUnderlying handle to event.\fR"
.ti -1c
.RI "void \fBhandle\fR (ACE_event_t new_handle)"
.br
.ti -1c
.RI "int \fBwait\fR (void)"
.br
.ti -1c
.RI "int \fBwait\fR (const \fBACE_Time_Value\fR *abstime)"
.br
.RI "\fISame as \fBwait\fR() above, but this one can be timed  is absolute time-of-day.\fR"
.ti -1c
.RI "int \fBsignal\fR (void)"
.br
.ti -1c
.RI "int \fBpulse\fR (void)"
.br
.ti -1c
.RI "int \fBreset\fR (void)"
.br
.RI "\fISet to nonsignaled state.\fR"
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "ACE_event_t \fBhandle_\fR"
.br
.RI "\fIThe underlying handle.\fR"
.ti -1c
.RI "int \fBremoved_\fR"
.br
.RI "\fIKeeps track of whether <remove> has been called yet to avoid multiple <remove> calls, e.g., explicitly and implicitly in the destructor. This flag isn't protected by a lock, so make sure that you don't have multiple threads simultaneously calling <remove> on the same object, which is a bad idea anyway...\fR"
.in -1c
.SS Private Methods

.in +1c
.ti -1c
.RI "\fBACE_Event\fR (const ACE_Event& event)"
.br
.ti -1c
.RI "const ACE_Event& \fBoperator=\fR (const ACE_Event &rhs)"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 
A wrapper around the Win32 event locking mechanism.
.PP
.PP
 Portable implementation of an Event mechanism, which is native to Win32, but must be emulated on UNIX. Note that this only provides global naming and system-scope locking support on Win32 platforms. 
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS ACE_Event::ACE_Event (int manual_reset = 0, int initial_state = 0, int type = USYNC_THREAD, const \fBACE_TCHAR\fR * name = 0, void * arg = 0)
.PP
Constructor that creates event.
.PP
.SS ACE_Event::~ACE_Event (void)
.PP
Implicitly destroy the event variable.
.PP
.SS ACE_Event::ACE_Event (const ACE_Event & event)\fC [private]\fR
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS void ACE_Event::dump (void) const
.PP
Dump the state of an object.
.PP
Reimplemented in \fBACE_Manual_Event\fR, and \fBACE_Auto_Event\fR.
.SS void ACE_Event::handle (ACE_event_t new_handle)
.PP
Set the underlying handle to event. Note that this method assumes ownership of the <handle> and will close it down in <remove>. If you want the <handle> to stay open when <remove> is called make sure to call <dup> on the <handle> before closing it. You are responsible for the closing the existing <handle> before overwriting it. 
.SS ACE_event_t ACE_Event::handle (void) const
.PP
Underlying handle to event.
.PP
.SS const ACE_Event& ACE_Event::operator= (const ACE_Event & rhs)\fC [private]\fR
.PP
.SS int ACE_Event::pulse (void)
.PP
if MANUAL reset wakeup all waiting threads and reset event else AUTO reset wakeup one waiting thread (if present) and reset event 
.SS int ACE_Event::remove (void)
.PP
Explicitly destroy the event variable. Note that only one thread should call this method since it doesn't protect against race conditions. 
.SS int ACE_Event::reset (void)
.PP
Set to nonsignaled state.
.PP
.SS int ACE_Event::signal (void)
.PP
if MANUAL reset wake up all waiting threads set to signaled state else AUTO reset if no thread is waiting, set to signaled state if thread(s) are waiting, wake up one waiting thread and reset event 
.SS int ACE_Event::wait (const \fBACE_Time_Value\fR * abstime)
.PP
Same as \fBwait\fR() above, but this one can be timed  is absolute time-of-day.
.PP
.SS int ACE_Event::wait (void)
.PP
if MANUAL reset sleep till the event becomes signaled event remains signaled after \fBwait\fR() completes. else AUTO reset sleep till the event becomes signaled event resets \fBwait\fR() completes. 
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS ACE_Event::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
Reimplemented in \fBACE_Manual_Event\fR, and \fBACE_Auto_Event\fR.
.SS ACE_event_t ACE_Event::handle_\fC [protected]\fR
.PP
The underlying handle.
.PP
.SS int ACE_Event::removed_\fC [protected]\fR
.PP
Keeps track of whether <remove> has been called yet to avoid multiple <remove> calls, e.g., explicitly and implicitly in the destructor. This flag isn't protected by a lock, so make sure that you don't have multiple threads simultaneously calling <remove> on the same object, which is a bad idea anyway...
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.