Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# ACE_Token_Invariant_Manager Class Reference

Token Invariants. More...

`#include <Token_Invariants.h>`

Inheritance diagram for ACE_Token_Invariant_Manager:

[legend]
Collaboration diagram for ACE_Token_Invariant_Manager:

[legend]
List of all members.

## Public Member Functions
int | acquired (const ACE_Token_Proxy *proxy)
void | releasing (const ACE_Token_Proxy *proxy)
| Updates internal database.
int | mutex_acquired (const ACE_TCHAR *token_name)
void | mutex_releasing (const ACE_TCHAR *token_name)
| Updates internal database.
int | reader_acquired (const ACE_TCHAR *token_name)
int | writer_acquired (const ACE_TCHAR *token_name)
void | rwlock_releasing (const ACE_TCHAR *token_name)
| Updates internal database.
void | dump (void) const
| Dump the state of the class.
| ACE_Token_Invariant_Manager (void)
| Prevent non-singleton construction.
virtual | ~ACE_Token_Invariant_Manager (void)
| Destruction.
## Static Public Member Functions
ACE_Token_Invariant_Manager * | instance (void)
| Singleton access point.
## Protected Types
typedef ACE_Token_Name | TOKEN_NAME
| This may be changed to a template type.
typedef ACE_Map_Manager< TOKEN_NAME, ACE_Mutex_Invariants *, ACE_Null_Mutex > | MUTEX_COLLECTION
| COLLECTION maintains a mapping from token names to mutexes.
typedef MUTEX_COLLECTION::ITERATOR | MUTEX_COLLECTION_ITERATOR
| Allows iterations through collection.
typedef MUTEX_COLLECTION::ENTRY | MUTEX_COLLECTION_ENTRY
| Allows iterations through collection.
typedef ACE_Map_Manager< TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_Mutex > | RWLOCK_COLLECTION
| COLLECTION maintains a mapping from token names to mutexes.
typedef RWLOCK_COLLECTION::ITERATOR | RWLOCK_COLLECTION_ITERATOR
| Allows iterations through collection.
typedef RWLOCK_COLLECTION::ENTRY | RWLOCK_COLLECTION_ENTRY
| Allows iterations through collection.
## Protected Member Functions
int | get_mutex (const ACE_TCHAR *token_name, ACE_Mutex_Invariants *&inv)
| Return or create.
int | get_rwlock (const ACE_TCHAR *token_name, ACE_RWLock_Invariants *&inv)
| Return or create.
## Protected Attributes
ACE_TOKEN_CONST::MUTEX | lock_
| ACE_Mutex_Token used to lock internal data structures.
MUTEX_COLLECTION | mutex_collection_
| MUTEX_COLLECTION maintains a mapping from token names to mutexes.
RWLOCK_COLLECTION | rwlock_collection_
| MUTEX_COLLECTION maintains a mapping from token names to mutexes.
## Static Protected Attributes
ACE_Token_Invariant_Manager * | instance_ = 0
| Singleton pointer.

## Detailed Description

Token Invariants.

The Token Invariant Manager allows applications to test that invariants are always satisfied. Currently, Token_Invariants can test mutexes and readers/writer locks. Does not test recursive acquisition. Note that this class does not ever clean its database. Until destroyed, it's size will forever increase.

## Member Typedef Documentation

typedef ACE_Map_Manager<TOKEN_NAME, ACE_Mutex_Invariants *, ACE_Null_Mutex> ACE_Token_Invariant_Manager::MUTEX_COLLECTION`[protected]`

| COLLECTION maintains a mapping from token names to mutexes.

typedef MUTEX_COLLECTION::ENTRY ACE_Token_Invariant_Manager::MUTEX_COLLECTION_ENTRY`[protected]`

| Allows iterations through collection. Deprecated: Deprecated typedef. Use MUTEX_COLLECTION::ENTRY trait instead.

typedef MUTEX_COLLECTION::ITERATOR ACE_Token_Invariant_Manager::MUTEX_COLLECTION_ITERATOR`[protected]`

| Allows iterations through collection. Deprecated: Deprecated typedef. Use MUTEX_COLLECTION::ITERATOR trait instead.

typedef ACE_Map_Manager<TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_Mutex> ACE_Token_Invariant_Manager::RWLOCK_COLLECTION`[protected]`

| COLLECTION maintains a mapping from token names to mutexes.

typedef RWLOCK_COLLECTION::ENTRY ACE_Token_Invariant_Manager::RWLOCK_COLLECTION_ENTRY`[protected]`

| Allows iterations through collection. Deprecated: Deprecated typedef. Use RWLOCK_COLLECTION::ENTRY trait instead.

typedef RWLOCK_COLLECTION::ITERATOR ACE_Token_Invariant_Manager::RWLOCK_COLLECTION_ITERATOR`[protected]`

| Allows iterations through collection. Deprecated: Deprecated typedef. Use RWLOCK_COLLECTION::ITERATOR trait instead.

typedef ACE_Token_Name ACE_Token_Invariant_Manager::TOKEN_NAME`[protected]`

| This may be changed to a template type.

## Constructor & Destructor Documentation

ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager | ( | void |  | ) |

| Prevent non-singleton construction.

ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager | ( | void |  | ) | `[virtual]`

| Destruction.

## Member Function Documentation

int ACE_Token_Invariant_Manager::acquired | ( | const ACE_Token_Proxy * | proxy | ) |

| Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::dump | ( | void |  | ) | const

| Dump the state of the class.

int ACE_Token_Invariant_Manager::get_mutex | ( | const ACE_TCHAR * | token_name,
|  | ACE_Mutex_Invariants *& | inv
| ) | `[protected]`

| Return or create.

int ACE_Token_Invariant_Manager::get_rwlock | ( | const ACE_TCHAR * | token_name,
|  | ACE_RWLock_Invariants *& | inv
| ) | `[protected]`

| Return or create.

ACE_Token_Invariant_Manager * ACE_Token_Invariant_Manager::instance | ( | void |  | ) | `[static]`

| Singleton access point.

int ACE_Token_Invariant_Manager::mutex_acquired | ( | const ACE_TCHAR * | token_name | ) |

| Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::mutex_releasing | ( | const ACE_TCHAR * | token_name | ) |

| Updates internal database.

int ACE_Token_Invariant_Manager::reader_acquired | ( | const ACE_TCHAR * | token_name | ) |

| Returns 1 on success, 0 when an invariant has been violated and -1 on error.

void ACE_Token_Invariant_Manager::releasing | ( | const ACE_Token_Proxy * | proxy | ) |

| Updates internal database.

void ACE_Token_Invariant_Manager::rwlock_releasing | ( | const ACE_TCHAR * | token_name | ) |

| Updates internal database.

int ACE_Token_Invariant_Manager::writer_acquired | ( | const ACE_TCHAR * | token_name | ) |

| Returns 1 on success, 0 when an invariant has been violated and -1 on error.

## Member Data Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Token_Invariant_Manager * ACE_Token_Invariant_Manager::instance_ = 0`[static, protected]`

| Singleton pointer.

ACE_TOKEN_CONST::MUTEX ACE_Token_Invariant_Manager::lock_`[protected]`

| ACE_Mutex_Token used to lock internal data structures.

MUTEX_COLLECTION ACE_Token_Invariant_Manager::mutex_collection_`[protected]`

| MUTEX_COLLECTION maintains a mapping from token names to mutexes.

RWLOCK_COLLECTION ACE_Token_Invariant_Manager::rwlock_collection_`[protected]`

| MUTEX_COLLECTION maintains a mapping from token names to mutexes.

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

- Token_Invariants.h
- Token_Invariants.cpp