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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
|
.TH ACE_Stream 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Stream \- This class is the primary abstraction for the ASX framework. It is moduled after System V Stream.
.SH SYNOPSIS
.br
.PP
\fC#include <Stream.h>\fR
.PP
.SS Public Types
.in +1c
.ti -1c
.RI "enum { \fBM_DELETE\fR = 3 }"
.br
.in -1c
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Stream\fR (void *arg = 0, \fBACE_Module\fR<ACE_SYNCH_USE> *head = 0, \fBACE_Module\fR<ACE_SYNCH_USE> *tail = 0)"
.br
.ti -1c
.RI "virtual int \fBopen\fR (void *arg, \fBACE_Module\fR<ACE_SYNCH_USE> *head = 0, \fBACE_Module\fR<ACE_SYNCH_USE> *tail = 0)"
.br
.ti -1c
.RI "virtual int \fBclose\fR (int flags = M_DELETE)"
.br
.RI "\fIClose down the stream and release all the resources.\fR"
.ti -1c
.RI "virtual \fB~ACE_Stream\fR (void)"
.br
.RI "\fIClose down the stream and release all the resources.\fR"
.ti -1c
.RI "virtual int \fBpush\fR (\fBACE_Module\fR<ACE_SYNCH_USE> *mod)"
.br
.RI "\fIAdd a new module <mod> right below the Stream head.\fR"
.ti -1c
.RI "virtual int \fBpop\fR (int flags = M_DELETE)"
.br
.RI "\fIRemove the <mod> right below the Stream head and close it down.\fR"
.ti -1c
.RI "virtual int \fBtop\fR (\fBACE_Module\fR<ACE_SYNCH_USE> *&mod)"
.br
.RI "\fIReturn the top module on the stream (right below the stream head).\fR"
.ti -1c
.RI "virtual int \fBinsert\fR (const \fBACE_TCHAR\fR *prev_name, \fBACE_Module\fR<ACE_SYNCH_USE> *mod)"
.br
.RI "\fIInsert a new module <mod> below the named module <prev_name>.\fR"
.ti -1c
.RI "virtual int \fBreplace\fR (const \fBACE_TCHAR\fR *replace_name, \fBACE_Module\fR<ACE_SYNCH_USE> *mod, int flags = M_DELETE)"
.br
.RI "\fIReplace the named module <replace_name> with a new module <mod>.\fR"
.ti -1c
.RI "virtual int \fBremove\fR (const \fBACE_TCHAR\fR *mod, int flags = M_DELETE)"
.br
.RI "\fIRemove the named module <mod> from the stream. This bypasses the strict LIFO ordering of <push> and <pop>.\fR"
.ti -1c
.RI "virtual \fBACE_Module\fR<ACE_SYNCH_USE>* \fBhead\fR (void)"
.br
.RI "\fIReturn current stream head.\fR"
.ti -1c
.RI "virtual \fBACE_Module\fR<ACE_SYNCH_USE>* \fBtail\fR (void)"
.br
.RI "\fIReturn current stream tail.\fR"
.ti -1c
.RI "virtual \fBACE_Module\fR<ACE_SYNCH_USE>* \fBfind\fR (const \fBACE_TCHAR\fR *mod)"
.br
.RI "\fIFind a particular \fBACE_Module\fR.\fR"
.ti -1c
.RI "virtual int \fBlink\fR (ACE_Stream<ACE_SYNCH_USE> &)"
.br
.RI "\fICreate a pipe between two Streams.\fR"
.ti -1c
.RI "virtual int \fBunlink\fR (void)"
.br
.RI "\fIRemove a pipe formed between two Streams.\fR"
.ti -1c
.RI "virtual int \fBput\fR (\fBACE_Message_Block\fR *mb, \fBACE_Time_Value\fR *timeout = 0)"
.br
.ti -1c
.RI "virtual int \fBget\fR (\fBACE_Message_Block\fR *&mb, \fBACE_Time_Value\fR *timeout = 0)"
.br
.ti -1c
.RI "virtual int \fBcontrol\fR (\fBACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds\fR cmd, void *args)"
.br
.RI "\fISend control message down the stream.\fR"
.ti -1c
.RI "virtual int \fBwait\fR (void)"
.br
.RI "\fISynchronize with the final close of the stream.\fR"
.ti -1c
.RI "virtual 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 Private Methods
.in +1c
.ti -1c
.RI "int \fBunlink_i\fR (void)"
.br
.RI "\fIActually perform the unlinking of two Streams (must be called with locks held).\fR"
.ti -1c
.RI "int \fBlink_i\fR (ACE_Stream<ACE_SYNCH_USE> &)"
.br
.RI "\fIActually perform the linking of two Streams (must be called with locks held).\fR"
.ti -1c
.RI "int \fBpush_module\fR (\fBACE_Module\fR<ACE_SYNCH_USE> *, \fBACE_Module\fR<ACE_SYNCH_USE> * = 0, \fBACE_Module\fR<ACE_SYNCH_USE> * = 0)"
.br
.RI "\fIMust a new module onto the Stream.\fR"
.in -1c
.SS Private Attributes
.in +1c
.ti -1c
.RI "\fBACE_Module\fR<ACE_SYNCH_USE>* \fBstream_head_\fR"
.br
.RI "\fIPointer to the head of the stream.\fR"
.ti -1c
.RI "\fBACE_Module\fR<ACE_SYNCH_USE>* \fBstream_tail_\fR"
.br
.RI "\fIPointer to the tail of the stream.\fR"
.ti -1c
.RI "ACE_Stream<ACE_SYNCH_USE>* \fBlinked_us_\fR"
.br
.RI "\fIPointer to an adjoining linked stream.\fR"
.ti -1c
.RI "ACE_SYNCH_MUTEX_T \fBlock_\fR"
.br
.RI "\fIProtect the stream against race conditions.\fR"
.ti -1c
.RI "ACE_SYNCH_CONDITION_T \fBfinal_close_\fR"
.br
.RI "\fIUse to tell all threads waiting on the close that we are done.\fR"
.in -1c
.SS Friends
.in +1c
.ti -1c
.RI "class \fBACE_Stream_Iterator< ACE_SYNCH_USE >\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP
.SS template<ACE_SYNCH_DECL> template class ACE_Stream
This class is the primary abstraction for the ASX framework. It is moduled after System V Stream.
.PP
.PP
A Stream consists of a stack of , each of which contains two . Even though the methods in this class are virtual, this class isn't really intended for subclassing unless you know what you are doing. In particular, the destructor calls <close>, which won't be overridden properly unless you call it in a subclass destructor.
.PP
.SH MEMBER ENUMERATION DOCUMENTATION
.PP
.SS template<ACE_SYNCH_DECL> anonymous enum
.PP
\fBEnumeration values:\fR
.in +1c
.TP
\fB\fIM_DELETE\fR \fRIndicates that <close> deletes the Tasks. Don't change this value without updating the same enum in class \fBACE_Module\fR...
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS template<ACE_SYNCH_DECL> ACE_Stream<>::ACE_Stream<> (void * arg = 0, \fBACE_Module\fR< ACE_SYNCH_USE >* head = 0, \fBACE_Module\fR< ACE_SYNCH_USE >* tail = 0)
.PP
Create a Stream consisting of and <tail> as the Stream head and Stream tail, respectively. If these are 0 then the and are used, respectively. is the value past in to the <open> methods of the tasks.
.SS template<ACE_SYNCH_DECL> ACE_Stream<>::~ACE_Stream<> (void)\fC [virtual]\fR
.PP
Close down the stream and release all the resources.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::close (int flags = M_DELETE)\fC [virtual]\fR
.PP
Close down the stream and release all the resources.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::control (\fBACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds\fR cmd, void * args)\fC [virtual]\fR
.PP
Send control message down the stream.
.PP
.SS template<ACE_SYNCH_DECL> void ACE_Stream<>::dump (void) const\fC [virtual]\fR
.PP
Dump the state of an object.
.PP
.SS template<ACE_SYNCH_DECL> \fBACE_Module\fR< ACE_SYNCH_USE >* ACE_Stream<>::find (const \fBACE_TCHAR\fR * mod)\fC [virtual]\fR
.PP
Find a particular \fBACE_Module\fR.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::get (\fBACE_Message_Block\fR *& mb, \fBACE_Time_Value\fR * timeout = 0)\fC [virtual]\fR
.PP
Read the message <mb> that is stored in the the stream head. Wait for upto <timeout> amount of absolute time for the operation to complete (or block forever if <timeout> == 0).
.SS template<ACE_SYNCH_DECL> \fBACE_Module\fR< ACE_SYNCH_USE >* ACE_Stream<>::head (void)\fC [virtual]\fR
.PP
Return current stream head.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::insert (const \fBACE_TCHAR\fR * prev_name, \fBACE_Module\fR< ACE_SYNCH_USE >* mod)\fC [virtual]\fR
.PP
Insert a new module <mod> below the named module <prev_name>.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::link (ACE_Stream< ACE_SYNCH_USE >&)\fC [virtual]\fR
.PP
Create a pipe between two Streams.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::link_i (ACE_Stream< ACE_SYNCH_USE >&)\fC [private]\fR
.PP
Actually perform the linking of two Streams (must be called with locks held).
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::open (void * arg, \fBACE_Module\fR< ACE_SYNCH_USE >* head = 0, \fBACE_Module\fR< ACE_SYNCH_USE >* tail = 0)\fC [virtual]\fR
.PP
Create a Stream consisting of and <tail> as the Stream head and Stream tail, respectively. If these are 0 then the and are used, respectively. is the value past in to the <open> methods of the tasks.
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::pop (int flags = M_DELETE)\fC [virtual]\fR
.PP
Remove the <mod> right below the Stream head and close it down.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::push (\fBACE_Module\fR< ACE_SYNCH_USE >* mod)\fC [virtual]\fR
.PP
Add a new module <mod> right below the Stream head.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::push_module (\fBACE_Module\fR< ACE_SYNCH_USE >*, \fBACE_Module\fR< ACE_SYNCH_USE >* = 0, \fBACE_Module\fR< ACE_SYNCH_USE >* = 0)\fC [private]\fR
.PP
Must a new module onto the Stream.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::put (\fBACE_Message_Block\fR * mb, \fBACE_Time_Value\fR * timeout = 0)\fC [virtual]\fR
.PP
Send the message <mb> down the stream, starting at the Module below the Stream head. Wait for upto <timeout> amount of absolute time for the operation to complete (or block forever if <timeout> == 0).
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::remove (const \fBACE_TCHAR\fR * mod, int flags = M_DELETE)\fC [virtual]\fR
.PP
Remove the named module <mod> from the stream. This bypasses the strict LIFO ordering of <push> and <pop>.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::replace (const \fBACE_TCHAR\fR * replace_name, \fBACE_Module\fR< ACE_SYNCH_USE >* mod, int flags = M_DELETE)\fC [virtual]\fR
.PP
Replace the named module <replace_name> with a new module <mod>.
.PP
.SS template<ACE_SYNCH_DECL> \fBACE_Module\fR< ACE_SYNCH_USE >* ACE_Stream<>::tail (void)\fC [virtual]\fR
.PP
Return current stream tail.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::top (\fBACE_Module\fR< ACE_SYNCH_USE >*& mod)\fC [virtual]\fR
.PP
Return the top module on the stream (right below the stream head).
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::unlink (void)\fC [virtual]\fR
.PP
Remove a pipe formed between two Streams.
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::unlink_i (void)\fC [private]\fR
.PP
Actually perform the unlinking of two Streams (must be called with locks held).
.PP
.SS template<ACE_SYNCH_DECL> int ACE_Stream<>::wait (void)\fC [virtual]\fR
.PP
Synchronize with the final close of the stream.
.PP
.SH FRIENDS AND RELATED FUNCTION DOCUMENTATION
.PP
.SS template<ACE_SYNCH_DECL> class \fBACE_Stream_Iterator\fR\fC [friend]\fR
.PP
.SH MEMBER DATA DOCUMENTATION
.PP
.SS template<ACE_SYNCH_DECL> ACE_Stream<>::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
.SS template<ACE_SYNCH_DECL> ACE_SYNCH_CONDITION_T ACE_Stream<>::final_close_\fC [private]\fR
.PP
Use to tell all threads waiting on the close that we are done.
.PP
.SS template<ACE_SYNCH_DECL> ACE_Stream< ACE_SYNCH_USE >* ACE_Stream<>::linked_us_\fC [private]\fR
.PP
Pointer to an adjoining linked stream.
.PP
.SS template<ACE_SYNCH_DECL> ACE_SYNCH_MUTEX_T ACE_Stream<>::lock_\fC [private]\fR
.PP
Protect the stream against race conditions.
.PP
.SS template<ACE_SYNCH_DECL> \fBACE_Module\fR< ACE_SYNCH_USE >* ACE_Stream<>::stream_head_\fC [private]\fR
.PP
Pointer to the head of the stream.
.PP
.SS template<ACE_SYNCH_DECL> \fBACE_Module\fR< ACE_SYNCH_USE >* ACE_Stream<>::stream_tail_\fC [private]\fR
.PP
Pointer to the tail of the stream.
.PP
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|