#include <Synch_Options.h>
Collaboration diagram for ACE_Synch_Options:

Public Types | |
| enum | { USE_REACTOR = 01, USE_TIMEOUT = 02 } |
| Options flags for controlling synchronization. More... | |
Public Methods | |
| ACE_Synch_Options (u_long options = 0, const ACE_Time_Value &timeout = ACE_Time_Value::zero, const void *arg = 0) | |
| Initialize the Synch_Options based on parameters. | |
| ~ACE_Synch_Options (void) | |
| Default dtor. | |
| void | set (u_long options = 0, const ACE_Time_Value &timeout = ACE_Time_Value::zero, const void *arg = 0) |
| Initialize the Synch_Options based on parameters. | |
| int | operator[] (u_long option) const |
| Get method for determining which options are enabled. | |
| void | operator= (u_long option) |
| Set method for enabling certain options. | |
| const void* | arg (void) const |
| Returns the "magic cookie" argument. | |
| void | arg (const void *) |
| Set the "magic cookie" argument. | |
| const ACE_Time_Value& | timeout (void) const |
| Returns a reference to the <Time_Value>. This value only makes sense if (*this)[USE_TIMEOUT] is true. | |
| void | timeout (const ACE_Time_Value &tv) |
| Set the <Time_Value>. | |
| const ACE_Time_Value* | time_value (void) const |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Static Public Attributes | |
| ACE_Synch_Options | defaults |
| This is the default setting for options, which will block synchronously. | |
| ACE_Synch_Options | synch |
| This is the default synchronous setting. | |
| ACE_Synch_Options | asynch |
| This is the default asynchronous setting. | |
Private Attributes | |
| u_long | options_ |
| Keeps track of the enabled options. | |
| ACE_Time_Value | timeout_ |
| Amount of time to wait for timeouts. | |
| const void* | arg_ |
Values support the following behavior (TV == "timeout" and UR == "use ACE_Reactor"):
| Parameters | Description | |TV | UR | |-----|----------|------------------------------- | | |NULL | yes | infinite timeout (using ACE_Reactor) | | |time | yes | try asynch transaction for | | the specified time (using ACE_Reactor) | | |0,0 | yes | poll; try, if EWOULDBLOCK, | | then return immediately | | (using ACE_Reactor) | | |NULL | no | block forever (don't use ACE_Reactor) | | |time | no | do a blocking transaction | | for the specified time | | (don't use ACE_Reactor) | | |0,0 | no | poll; but do not initiate a | | nonblocking transaction | | (don't use ACE_Reactor)
|
|
Options flags for controlling synchronization. Note that these flags can be bit-wise "or'd" together if both options are desired. |
|
|
Initialize the Synch_Options based on parameters.
|
|
|
Default dtor.
|
|
|
Set the "magic cookie" argument.
|
|
|
Returns the "magic cookie" argument.
|
|
|
Dump the state of an object.
|
|
|
Set method for enabling certain options.
|
|
|
Get method for determining which options are enabled.
|
|
|
Initialize the Synch_Options based on parameters.
|
|
|
Returns the address of the timeout <Time_Value> if (*this)[USE_TIMEOUT] is true, else 0. This should be used with care, e.g., the timeout pointer should not be stored in a manner that will lead to dangling pointers... |
|
|
Set the <Time_Value>.
|
|
|
Returns a reference to the <Time_Value>. This value only makes sense if (*this)[USE_TIMEOUT] is true.
|
|
|
Declare the dynamic allocation hooks.
|
|
|
"Magic cookie" always passed in as an argument to the ACE_Reactor's <schedule_timer> method. Used to communicate values for asynchronous programming. |
|
|
This is the default asynchronous setting.
|
|
|
This is the default setting for options, which will block synchronously.
|
|
|
Keeps track of the enabled options.
|
|
|
This is the default synchronous setting.
|
|
|
Amount of time to wait for timeouts.
|
1.2.3 written by Dimitri van Heesch,
© 1997-2000