Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Synch_Options Class Reference

Contains the values of options used to determine the synchronous and asynchronous behavior. More...

`#include <Synch_Options.h>`

Collaboration diagram for ACE_Synch_Options:

[legend]
List of all members.

## Public Types
enum | { USE_REACTOR = 01, USE_TIMEOUT = 02 }
| Note that these flags can be bit-wise "or'd" together if both options are desired. 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. More...
| ~ACE_Synch_Options (void)
| Default dtor. More...
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. More...
int | operator[] (u_long option) const
| Get method for determining which options are enabled. More...
void | operator= (u_long option)
| Set method for enabling certain options. More...
const void * | arg (void) const
| Returns the "magic cookie" argument. More...
void | arg (const void *)
| Set the "magic cookie" argument. More...
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. More...
void | timeout (const ACE_Time_Value &tv)
| Set the <Time_Value>. More...
const ACE_Time_Value * | time_value (void) const
| Returns the address of the timeout <Time_Value> if (*this)[USE_TIMEOUT] is true, else 0. More...
void | dump (void) const
| Dump the state of an object. More...
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Static Public Attributes
ACE_Synch_Options | defaults
| This is the default setting for options, which will block synchronously. More...
ACE_Synch_Options | synch
| This is the default synchronous setting. More...
ACE_Synch_Options | asynch
| This is the default asynchronous setting. More...
## Private Attributes
u_long | options_
| Keeps track of the enabled options. More...
ACE_Time_Value | timeout_
| Amount of time to wait for timeouts. More...
const void * | arg_
| "Magic cookie" always passed in as an argument to the ACE_Reactor's <schedule_timer> method. More...

## Detailed Description

Contains the values of options used to determine the synchronous and asynchronous behavior.

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)`

## Member Enumeration Documentation

anonymous enum

  | Note that these flags can be bit-wise "or'd" together if both options are desired. Enumeration values:
  USE_REACTOR | Use the Reactor.
  USE_TIMEOUT | Interprete the Time_Value.

## Constructor & Destructor Documentation

ACE_Synch_Options::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_INLINE ACE_Synch_Options::~ACE_Synch_Options | ( | void |  | ) |

| Default dtor.

## Member Function Documentation

void ACE_Synch_Options::arg | ( | const void * | a | ) |

| Set the "magic cookie" argument.

const void * ACE_Synch_Options::arg | ( | void |  | ) | const

| Returns the "magic cookie" argument.

void ACE_Synch_Options::dump | ( | void |  | ) | const

| Dump the state of an object.

void ACE_Synch_Options::operator= | ( | u_long | option | ) |

| Set method for enabling certain options.

int ACE_Synch_Options::operator[] | ( | u_long | option | ) | const

| Get method for determining which options are enabled.

void ACE_Synch_Options::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.

const ACE_Time_Value * ACE_Synch_Options::time_value | ( | void |  | ) | const

| 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...

void ACE_Synch_Options::timeout | ( | const ACE_Time_Value & | tv | ) |

| Set the <Time_Value>.

const ACE_Time_Value & ACE_Synch_Options::timeout | ( | void |  | ) | const

| Returns a reference to the <Time_Value>. This value only makes sense if (*this)[USE_TIMEOUT] is true.

## Member Data Documentation

ACE_Synch_Options::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

const void* ACE_Synch_Options::arg_`[private]`

| "Magic cookie" always passed in as an argument to the ACE_Reactor's <schedule_timer> method. Used to communicate values for asynchronous programming.

ACE_Synch_Options ACE_Synch_Options::asynch`[static]`

| This is the default asynchronous setting.

ACE_Synch_Options ACE_Synch_Options::defaults`[static]`

| This is the default setting for options, which will block synchronously.

u_long ACE_Synch_Options::options_`[private]`

| Keeps track of the enabled options.

ACE_Synch_Options ACE_Synch_Options::synch`[static]`

| This is the default synchronous setting.

ACE_Time_Value ACE_Synch_Options::timeout_`[private]`

| Amount of time to wait for timeouts.

The documentation for this class was generated from the following files:

- Synch_Options.h
- Synch_Options.cpp
- Synch_Options.i