SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Base class for classes that must maintain a reference count. More...
#include <rw/pointer/RWTCountingBody.h>
Public Member Functions | |
~RWTCountingBody (void) | |
unsigned | addReference (void) |
unsigned | references (void) const |
unsigned | removeReference (void) |
Protected Types | |
typedef RWTLockGuard< RWTMonitor< Mutex > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< Mutex > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< Mutex > > | UnlockGuard |
Protected Types inherited from RWTMonitor< Mutex > | |
typedef RWTLockGuard< RWTMonitor< Mutex > > | LockGuard |
typedef RWTTryLockGuard< RWTMonitor< Mutex > > | TryLockGuard |
typedef RWTUnlockGuard< RWTMonitor< Mutex > > | UnlockGuard |
Protected Member Functions | |
RWTCountingBody (const RWTCountingBody< Mutex > &second) | |
RWTCountingBody (RWStaticCtor) | |
RWTCountingBody (unsigned initCount=0) | |
RWTCountingBody< Mutex > & | operator= (const RWTCountingBody< Mutex > &second) |
Protected Member Functions inherited from RWTMonitor< Mutex > | |
RWTMonitor (const RWTMonitor< Mutex > &second) | |
RWTMonitor (RWStaticCtor) | |
RWTMonitor (void) | |
~RWTMonitor (void) | |
void | acquire (void) |
bool | isAcquired (void) const |
RWTMonitor< Mutex > & | monitor (void) const |
Mutex & | mutex (void) |
RWTMonitor< Mutex > & | operator= (const RWTMonitor< Mutex > &) |
void | release (void) |
bool | tryAcquire (void) |
RWTCountingBody is a base class for classes that must maintain a reference count. It can be safely used in a multithreaded environment.
|
protected |
Predefined type for compatible guard.
|
protected |
Predefined type for compatible guard.
|
protected |
Predefined type for compatible guard.
|
inline |
Destructor.
|
inlineprotected |
Constructs a default instance (initializes the reference count). Throws no exceptions.
|
inlineprotected |
Constructs a static instance (does not initialize the reference count). Throws no exceptions.
|
inlineprotected |
Defines a copy constructor that creates a new instance and initializes the reference count. This constructor does not actually create a copy, but allows derived classes to provide a meaningful copy constructor. Throws no exceptions.
unsigned RWTCountingBody< Mutex >::addReference | ( | void | ) |
Increments the reference count and then returns the previous value minus one.
|
inlineprotected |
Defines an assignment operator, allowing derived classes to do assignments. Don't assign the reference count. Throws no exceptions.
unsigned RWTCountingBody< Mutex >::references | ( | void | ) | const |
Queries the current reference count. Throws no exceptions.
unsigned RWTCountingBody< Mutex >::removeReference | ( | void | ) |
Decrements the reference count and then returns the previous value minus one.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |