ACE 8.0.0
|
This class is the primary abstraction for the ASX framework. It is moduled after System V Stream. More...
#include <Stream.h>
Public Types | |
enum | { M_DELETE = 3 } |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Protected Attributes | |
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * | stream_head_ |
Pointer to the head of the stream. | |
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * | stream_tail_ |
Pointer to the tail of the stream. | |
ACE_Stream< ACE_SYNCH_USE, TIME_POLICY > * | linked_us_ |
Pointer to an adjoining linked stream. | |
ACE_SYNCH_MUTEX_T | lock_ |
Protect the stream against race conditions. | |
ACE_Condition_Attributes_T< TIME_POLICY > | cond_attr_ |
Attributes to initialize condition with. | |
ACE_SYNCH_CONDITION_T | final_close_ |
Use to tell all threads waiting on the close that we are done. | |
Private Member Functions | |
int | unlink_i () |
int | link_i (ACE_Stream< ACE_SYNCH_USE, TIME_POLICY > &) |
int | push_module (ACE_Module< ACE_SYNCH_USE, TIME_POLICY > *, ACE_Module< ACE_SYNCH_USE, TIME_POLICY > *=0, ACE_Module< ACE_SYNCH_USE, TIME_POLICY > *=0) |
Must a new module onto the Stream. | |
Friends | |
class | ACE_Stream_Iterator< ACE_SYNCH_USE, TIME_POLICY > |
This class is the primary abstraction for the ASX framework. It is moduled after System V Stream.
A Stream consists of a stack of ACE_Modules
, each of which contains two ACE_Tasks
. 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 ACE_Stream destructor calls <close>, which won't be overridden properly unless you call it in a subclass destructor.
Enumerator | |
---|---|
M_DELETE | Indicates that |
ACE_Stream< ACE_SYNCH_DECL, TIME_POLICY >::ACE_Stream | ( | void * | arg = 0, |
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * | head = 0, | ||
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * | tail = 0 ) |
Create a Stream consisting of head and tail as the Stream head and Stream tail, respectively. If these are 0 then the ACE_Stream_Head and ACE_Stream_Tail are used, respectively. arg is the value past in to the <open> methods of the tasks.
|
virtual |
Close down the stream and release all the resources.
|
virtual |
Close down the stream and release all the resources.
|
virtual |
Send control message down the stream.
|
virtual |
Dump the state of an object.
|
virtual |
Find a particular ACE_Module.
|
virtual |
Read the message mb that is stored in the stream head. Wait for upto timeout amount of absolute time for the operation to complete (or block forever if timeout == 0).
|
inlinevirtual |
Return current stream head.
|
virtual |
Insert a new module mod below the named module prev_name.
|
virtual |
Create a pipe between two Streams.
|
private |
Actually perform the linking of two Streams (must be called with locks held).
|
virtual |
Create a Stream consisting of head and tail as the Stream head and Stream tail, respectively. If these are 0 then the ACE_Stream_Head and ACE_Stream_Tail are used, respectively. arg is the value past in to the open()
methods of the tasks.
|
virtual |
Remove the mod right below the Stream head and close it down.
are invoked to cleanup the tasks.
|
virtual |
Add a new module mod right below the Stream head. The open()
hook methods of the ACE_Tasks
in this ACE_Module are invoked to initialize the tasks.
|
private |
Must a new module onto the Stream.
|
virtual |
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).
|
virtual |
Remove the named module mod from the stream. This bypasses the strict LIFO ordering of push
and pop
.
|
virtual |
Replace the named module replace_name with a new module mod.
|
inlinevirtual |
Return current stream tail.
|
virtual |
Return the top module on the stream (right below the stream head).
|
virtual |
Remove a pipe formed between two Streams.
|
private |
Actually perform the unlinking of two Streams (must be called with locks held).
|
inlinevirtual |
Synchronize with the final close of the stream.
|
friend |
ACE_Stream< ACE_SYNCH_DECL, TIME_POLICY >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
protected |
Attributes to initialize condition with.
|
protected |
Use to tell all threads waiting on the close that we are done.
|
protected |
Pointer to an adjoining linked stream.
|
mutableprotected |
Protect the stream against race conditions.
|
protected |
Pointer to the head of the stream.
|
protected |
Pointer to the tail of the stream.