#include <Reverse_Lock_T.h>
Inheritance diagram for ACE_Reverse_Lock< ACE_LOCKING_MECHANISM >:


| Public Types | |
| typedef ACE_LOCKING_MECHANISM | ACE_LOCK | 
| Public Member Functions | |
| ACE_Reverse_Lock (ACE_LOCKING_MECHANISM &lock, ACE_Acquire_Method::METHOD_TYPE acquire_method=ACE_Acquire_Method::ACE_REGULAR) | |
| Constructor. All locking requests will be forwarded to . | |
| virtual | ~ACE_Reverse_Lock (void) | 
| virtual int | acquire (void) | 
| Release the lock. | |
| virtual int | tryacquire (void) | 
| Release the lock. | |
| virtual int | release (void) | 
| Acquire the lock. | |
| virtual int | acquire_read (void) | 
| Release the lock. | |
| virtual int | acquire_write (void) | 
| Release the lock. | |
| virtual int | tryacquire_read (void) | 
| Release the lock. | |
| virtual int | tryacquire_write (void) | 
| Release the lock. | |
| virtual int | tryacquire_write_upgrade (void) | 
| Release the lock. | |
| virtual int | remove (void) | 
| Explicitly destroy the lock. | |
| Private Attributes | |
| ACE_LOCKING_MECHANISM & | lock_ | 
| The concrete locking mechanism that all the methods delegate to. | |
| ACE_Acquire_Method::METHOD_TYPE | acquire_method_ | 
| This indicates what kind of acquire method will be called. | |
This is an interesting adapter class that changes a lock into a reverse lock, i.e., on this class calls on the lock, and on this class calls on the lock. One motivation for this class is when we temporarily want to release a lock (which we have already acquired) but then reacquire it soon after. An alternative design would be to add a Anti_Guard or Reverse_Guard class which would on construction and destruction. However, there are *many* varieties of the Guard class and this design choice would lead to at least 6 new classes. One new ACE_Reverse_Lock class seemed more reasonable.
Definition at line 72 of file Reverse_Lock_T.h.
| 
 | |||||
| 
 Definition at line 76 of file Reverse_Lock_T.h. | 
| 
 | ||||||||||||||||
| Constructor. All locking requests will be forwarded to . 
 Definition at line 11 of file Reverse_Lock_T.inl. 
 00014 : lock_ (lock), 00015 acquire_method_ (acquire_method) 00016 { 00017 } | 
| 
 | ||||||||||
| Destructor. If was not passed in by the user, it will be deleted. Definition at line 19 of file Reverse_Lock_T.cpp. 
 00020 {
00021 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 32 of file Reverse_Lock_T.cpp. 
 00033 {
00034   return this->lock_.release ();
00035 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 58 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00059 {
00060   ACE_NOTSUP_RETURN (-1);
00061 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 65 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00066 {
00067   ACE_NOTSUP_RETURN (-1);
00068 }
 | 
| 
 | ||||||||||
| Acquire the lock. 
 Implements ACE_Lock. Definition at line 46 of file Reverse_Lock_T.cpp. References ACE_Reverse_Lock< ACE_LOCKING_MECHANISM >::acquire_method_. 
 00047 {
00048   if (this->acquire_method_ == ACE_Acquire_Method::ACE_READ)
00049     return this->lock_.acquire_read ();
00050   else if (this->acquire_method_ == ACE_Acquire_Method::ACE_WRITE)
00051     return this->lock_.acquire_write ();
00052   else
00053     return this->lock_.acquire ();
00054 }
 | 
| 
 | ||||||||||
| Explicitly destroy the lock. 
 Implements ACE_Lock. Definition at line 25 of file Reverse_Lock_T.cpp. 
 00026 {
00027   return this->lock_.remove ();
00028 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 39 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00040 {
00041   ACE_NOTSUP_RETURN (-1);
00042 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 72 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00073 {
00074   ACE_NOTSUP_RETURN (-1);
00075 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 79 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00080 {
00081   ACE_NOTSUP_RETURN (-1);
00082 }
 | 
| 
 | ||||||||||
| Release the lock. 
 Implements ACE_Lock. Definition at line 86 of file Reverse_Lock_T.cpp. References ACE_NOTSUP_RETURN. 
 00087 {
00088   ACE_NOTSUP_RETURN (-1);
00089 }
 | 
| 
 | |||||
| This indicates what kind of acquire method will be called. 
 Definition at line 121 of file Reverse_Lock_T.h. Referenced by ACE_Reverse_Lock< ACE_LOCKING_MECHANISM >::release(). | 
| 
 | |||||
| The concrete locking mechanism that all the methods delegate to. 
 Definition at line 118 of file Reverse_Lock_T.h. | 
 1.3.6
 
1.3.6