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>


Public Member Functions | |
| ACE_Write_Guard (ACE_LOCK &m) | |
| Implicitly and automatically acquire a write lock. | |
| ACE_Write_Guard (ACE_LOCK &m, bool block) | |
| int | acquire_write (void) |
| Explicitly acquire the write lock. | |
| int | acquire (void) |
| Explicitly acquire the write lock. | |
| int | tryacquire_write (void) |
| Conditionally acquire the write lock (i.e., won't block). | |
| int | tryacquire (void) |
| Conditionally acquire the write lock (i.e., won't block). | |
| void | dump (void) const |
| Dump the state of an object. | |
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).
Definition at line 119 of file Guard_T.h.
| ACE_Write_Guard< ACE_LOCK >::ACE_Write_Guard | ( | ACE_LOCK & | m | ) | [inline] |
Implicitly and automatically acquire a write lock.
Definition at line 87 of file Guard_T.inl.
: ACE_Guard<ACE_LOCK> (&m) { this->acquire_write (); }
| 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.
Definition at line 118 of file Guard_T.inl.
: ACE_Guard<ACE_LOCK> (&m) { if (block) this->acquire_write (); else this->tryacquire_write (); }
| int ACE_Write_Guard< ACE_LOCK >::acquire | ( | void | ) | [inline] |
Explicitly acquire the write lock.
Reimplemented from ACE_Guard< ACE_LOCK >.
Definition at line 100 of file Guard_T.inl.
| int ACE_Write_Guard< ACE_LOCK >::acquire_write | ( | void | ) | [inline] |
Explicitly acquire the write lock.
Definition at line 94 of file Guard_T.inl.
| void ACE_Write_Guard< ACE_LOCK >::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented from ACE_Guard< ACE_LOCK >.
Definition at line 42 of file Guard_T.cpp.
{
#if defined (ACE_HAS_DUMP)
// ACE_TRACE ("ACE_Write_Guard<ACE_LOCK>::dump");
ACE_Guard<ACE_LOCK>::dump ();
#endif /* ACE_HAS_DUMP */
}
| int ACE_Write_Guard< ACE_LOCK >::tryacquire | ( | void | ) | [inline] |
Conditionally acquire the write lock (i.e., won't block).
Reimplemented from ACE_Guard< ACE_LOCK >.
Definition at line 112 of file Guard_T.inl.
| int ACE_Write_Guard< ACE_LOCK >::tryacquire_write | ( | void | ) | [inline] |
Conditionally acquire the write lock (i.e., won't block).
Definition at line 106 of file Guard_T.inl.
1.7.0