SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Deprecated. Maintains a reference count. More...
#include <rw/pointer/RWTCounter.h>
Public Member Functions | |
RWTCounter (const RWTCounter< Mutex > &second) | |
RWTCounter (RWStaticCtor) | |
RWTCounter (unsigned initCount=0) | |
RWTCounter< Mutex > & | operator= (const RWTCounter< Mutex > &second) |
Public Member Functions inherited from RWTCountingBody< Mutex > | |
~RWTCountingBody (void) | |
unsigned | addReference (void) |
unsigned | references (void) const |
unsigned | removeReference (void) |
Additional Inherited Members | |
Protected Types inherited from RWTCountingBody< Mutex > | |
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 inherited from RWTCountingBody< Mutex > | |
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) |
A class for maintaining a reference count that uses the template type as a lock for atomicity.
Generally, applications will use one of two typedefs provided by the Smart Pointer package. RWSafeCounter is a typedef for RWTCounter and provides thread-safe reference counting. RWUnsafeCounter is a typedef for RWTCounter and can be used for greater efficiency when thread safety is not required.
|
inline |
Constructs a default instance (initializes the reference count). Throws no exceptions.
|
inline |
Constructs a static instance (does not initialize the reference count). Throws no exceptions.
|
inline |
Does not copy the internal count. This method is provided as a convenience to derived classes.
|
inline |
Does not assign the internal count. This method is provided as a convenience to derived classes.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |