| ACE 8.0.1
    | 
Abstract representation of ACE tokens. More...
#include <Local_Tokens.h>


| Public Types | |
| enum | TOKEN_TYPES { MUTEX , RWLOCK } | 
| typedef ACE_Unbounded_Stack< ACE_TPQ_Entry * > | OWNER_STACK | 
| Stack of owners. | |
| Public Member Functions | |
| ACE_Tokens () | |
| Null constructor. | |
| virtual | ~ACE_Tokens ()=default | 
| Destructor. | |
| virtual int | acquire (ACE_TPQ_Entry *caller, int ignore_deadlock, int notify)=0 | 
| No implementation. | |
| virtual int | tryacquire (ACE_TPQ_Entry *caller)=0 | 
| No implementation. | |
| virtual int | renew (ACE_TPQ_Entry *caller, int requeue_position)=0 | 
| No implementation. | |
| virtual int | release (ACE_TPQ_Entry *caller)=0 | 
| No implementation. | |
| void | make_owner (ACE_TPQ_Entry *caller) | 
| void | remove (ACE_TPQ_Entry *caller) | 
| Remove the caller from the waiter list. | |
| virtual int | owners (OWNER_STACK &o, const ACE_TCHAR *id)=0 | 
| virtual int | is_waiting_for (const ACE_TCHAR *id)=0 | 
| Returns 1 if id is waiting for this token. 0 otherwise. | |
| virtual int | is_owner (const ACE_TCHAR *id)=0 | 
| Returns 1 if id is an owner of this token. 0 otherwise. | |
| virtual ACE_Token_Proxy_Queue * | waiters () | 
| Return the queue of waiters. | |
| virtual int | no_of_waiters () | 
| const ACE_TCHAR * | owner_id () | 
| The current owner. | |
| const ACE_TCHAR * | name () | 
| Token name. | |
| void | inc_reference () | 
| int | dec_reference () | 
| void | dump () const | 
| Dump the state of the class. | |
| virtual int | type () const =0 | 
| void | visit (int v) | 
| Mark or unmark the token as visited. | |
| int | visited () | 
| Check if the token has been visited. | |
| ACE_TPQ_Entry * | owner () | 
| All the data of the current owner. | |
| Protected Attributes | |
| int | visited_ | 
| For the deadlock detection algorithm. | |
| int | reference_count_ | 
| Reference count. | |
| ACE_Token_Proxy_Queue | waiters_ | 
| List of client's owning and waiting the token. | |
| ACE_TCHAR | token_name_ [ACE_MAXTOKENNAMELEN] | 
| Name of token. | |
Abstract representation of ACE tokens.
Not a public interface. Currently, I don't see a reason for providing an abstract interface at this level of the library. As of yet, no one uses ACE_Tokens derivatives through this abstract interface except for ACE_Token_Manager. It only uses the statistical methods which are shared by all Tokens. For that reason, it still makes since to have a common base class. However, acquire, renew, and release do not need to have matching interfaces throughout all Tokens. To add a new type of token (e.g. semaphore), this class must be subtyped to define the new semantics. See ACE_Token_Manager for details.
Stack of owners.
| ACE_Tokens::ACE_Tokens | ( | ) | 
Null constructor.
| 
 | virtualdefault | 
Destructor.
| 
 | pure virtual | 
No implementation.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| 
 | inline | 
| void ACE_Tokens::dump | ( | ) | const | 
Dump the state of the class.
| 
 | inline | 
Returns 1 if id is an owner of this token. 0 otherwise.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
Returns 1 if id is waiting for this token. 0 otherwise.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| void ACE_Tokens::make_owner | ( | ACE_TPQ_Entry * | caller | ) | 
Move the caller to the front of the waiter list. This is for use with remote mutexes and shadow mutexes.
| 
 | inline | 
Token name.
| 
 | virtual | 
Return the number of proxies that are currently waiting to get the token.
| 
 | inline | 
All the data of the current owner.
| 
 | inline | 
The current owner.
| 
 | pure virtual | 
Returns a stack of the current owners. Returns -1 on error, 0 on success. If id is non-zero, returns 1 if id is an owner.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| 
 | pure virtual | 
No implementation.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| 
 | inline | 
Remove the caller from the waiter list.
| 
 | pure virtual | 
No implementation.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| 
 | pure virtual | 
No implementation.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
Provides a manual RTTI mechanism. This method is used only by ACE_Token_Request so that the type of a token can be sent to a remote Token Server.
Implemented in ACE_Mutex_Token, and ACE_RW_Token.
| 
 | inline | 
Check if the token has been visited.
| 
 | virtual | 
Return the queue of waiters.
| 
 | protected | 
Reference count.
| 
 | protected | 
Name of token.
| 
 | protected | 
For the deadlock detection algorithm.
| 
 | protected | 
List of client's owning and waiting the token.