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

# ACE_Read_Guard Class Template Reference

This class is similar to class <ACE_Guard>, though it acquires/releases a read lock automatically (naturally, the <ACE_LOCK> it is instantiated with must support the appropriate API). More...

`#include <Synch_T.h>`

Inheritance diagram for ACE_Read_Guard:

[legend]
Collaboration diagram for ACE_Read_Guard:

[legend]
List of all members.

## Public Methods
| ACE_Read_Guard (ACE_LOCK &m)
| Implicitly and automatically acquire a read lock. More...
| ACE_Read_Guard (ACE_LOCK &m, int block)
| Implicitly and automatically acquire (or try to acquire) a read lock. More...
int | acquire_read (void)
| Explicitly acquire the read lock. More...
int | acquire (void)
| Explicitly acquire the read lock. More...
int | tryacquire_read (void)
| Conditionally acquire the read lock (i.e., won't block). More...
int | tryacquire (void)
| Conditionally acquire the read lock (i.e., won't block). More...
void | dump (void) const
| Dump the state of an object. More...

## Detailed Description

### template<class ACE_LOCK>
class ACE_Read_Guard< ACE_LOCK >

This class is similar to class <ACE_Guard>, though it acquires/releases a read lock automatically (naturally, the <ACE_LOCK> it is instantiated with must support the appropriate API).

## Constructor & Destructor Documentation

template<class ACE_LOCK>
ACE_INLINE ACE_Read_Guard< ACE_LOCK >::ACE_Read_Guard | ( | ACE_LOCK & | m | ) |

| Implicitly and automatically acquire a read lock.

template<class ACE_LOCK>
ACE_INLINE ACE_Read_Guard< ACE_LOCK >::ACE_Read_Guard | ( | ACE_LOCK & | m,
|  | int | block
| ) |

| Implicitly and automatically acquire (or try to acquire) a read lock.

## Member Function Documentation

template<class ACE_LOCK>
ACE_INLINE int ACE_Read_Guard< ACE_LOCK >::acquire | ( | void |  | ) |

| Explicitly acquire the read lock. Reimplemented from ACE_Guard.

template<class ACE_LOCK>
ACE_INLINE int ACE_Read_Guard< ACE_LOCK >::acquire_read | ( | void |  | ) |

| Explicitly acquire the read lock.

template<class ACE_LOCK>
void ACE_Read_Guard< ACE_LOCK >::dump | ( | void |  | ) | const

| Dump the state of an object. Reimplemented from ACE_Guard.

template<class ACE_LOCK>
ACE_INLINE int ACE_Read_Guard< ACE_LOCK >::tryacquire | ( | void |  | ) |

| Conditionally acquire the read lock (i.e., won't block). Reimplemented from ACE_Guard.

template<class ACE_LOCK>
ACE_INLINE int ACE_Read_Guard< ACE_LOCK >::tryacquire_read | ( | void |  | ) |

| Conditionally acquire the read lock (i.e., won't block).

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

- Synch_T.h
- Synch_T.cpp
- Synch_T.i