ACE  6.3.3
Public Member Functions | List of all members
ACE_Write_Guard< ACE_LOCK > Class Template Reference

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

#include <Guard_T.h>

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

Public Member Functions

 ACE_Write_Guard (ACE_LOCK &m)
 Implicitly and automatically acquire a write lock. More...
 
 ACE_Write_Guard (ACE_LOCK &m, bool block)
 
int acquire_write (void)
 Explicitly acquire the write lock. More...
 
int acquire (void)
 Explicitly acquire the write lock. More...
 
int tryacquire_write (void)
 Conditionally acquire the write lock (i.e., won't block). More...
 
int tryacquire (void)
 Conditionally acquire the write 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_Write_Guard< ACE_LOCK >

This class is similar to class ACE_Guard, though it acquires/releases a write 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_Write_Guard< ACE_LOCK >::ACE_Write_Guard ( ACE_LOCK &  m)
inline

Implicitly and automatically acquire a write lock.

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

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

Member Function Documentation

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

Explicitly acquire the write lock.

template<class ACE_LOCK >
int ACE_Write_Guard< ACE_LOCK >::acquire_write ( void  )
inline

Explicitly acquire the write lock.

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

Dump the state of an object.

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

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

template<class ACE_LOCK >
int ACE_Write_Guard< ACE_LOCK >::tryacquire_write ( void  )
inline

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


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