ACE  6.2.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ACE_Read_Guard< ACE_LOCK > 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 <Guard_T.h>

Inheritance diagram for ACE_Read_Guard< ACE_LOCK >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Read_Guard< ACE_LOCK >:
Collaboration graph
[legend]

Public Member Functions

 ACE_Read_Guard (ACE_LOCK &m)
 Implicitly and automatically acquire a read lock. More...
 
 ACE_Read_Guard (ACE_LOCK &m, bool block)
 
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...
 
- Public Member Functions inherited from ACE_Guard< ACE_LOCK >
 ACE_Guard (ACE_LOCK &l)
 
 ACE_Guard (ACE_LOCK &l, bool block)
 
 ACE_Guard (ACE_LOCK &l, bool block, int become_owner)
 
 ~ACE_Guard (void)
 Implicitly release the lock. More...
 
int acquire (void)
 Explicitly acquire the lock. More...
 
int tryacquire (void)
 Conditionally acquire the lock (i.e., won't block). More...
 
int release (void)
 Explicitly release the lock, but only if it is held! More...
 
void disown (void)
 
bool locked (void) const
 
int remove (void)
 Explicitly remove the lock. More...
 
void dump (void) const
 Dump the state of an object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ACE_Guard< ACE_LOCK >
 ACE_Guard (ACE_LOCK *lock)
 Helper, meant for subclass only. More...
 
- Protected Attributes inherited from ACE_Guard< ACE_LOCK >
ACE_LOCK * lock_
 Pointer to the ACE_LOCK we're guarding. More...
 
int owner_
 Keeps track of whether we acquired the lock or failed. 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).

Warning
See important "WARNING" in comments at top of ACE_Guard.

Constructor & Destructor Documentation

template<class ACE_LOCK >
ACE_Read_Guard< ACE_LOCK >::ACE_Read_Guard ( ACE_LOCK &  m)
inline

Implicitly and automatically acquire a read lock.

template<class ACE_LOCK >
ACE_Read_Guard< ACE_LOCK >::ACE_Read_Guard ( ACE_LOCK &  m,
bool  block 
)
inline

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

Member Function Documentation

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

Explicitly acquire the read lock.

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

Explicitly acquire the read lock.

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

Dump the state of an object.

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

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

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

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


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