SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Deprecated. Maintains a reference count. More...
#include <rw/pointer/RWTCounter.h>
Public Member Functions | |
RWTCounter (unsigned initCount=0) | |
RWTCounter (RWStaticCtor) | |
RWTCounter (const RWTCounter< Mutex > &second) | |
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 (unsigned initCount=0) | |
RWTCountingBody (RWStaticCtor) | |
RWTCountingBody (const RWTCountingBody< Mutex > &second) | |
RWTCountingBody< Mutex > & | operator= (const RWTCountingBody< Mutex > &second) |
Protected Member Functions inherited from RWTMonitor< Mutex > | |
RWTMonitor () | |
RWTMonitor (RWStaticCtor) | |
RWTMonitor (const RWTMonitor< Mutex > &second) | |
~RWTMonitor () | |
void | acquire () |
bool | isAcquired () const |
RWTMonitor< Mutex > & | monitor () const |
Mutex & | mutex () |
RWTMonitor< Mutex > & | operator= (const RWTMonitor< Mutex > &) |
void | release () |
bool | tryAcquire () |
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<RWMutexLock> and provides thread-safe reference counting. RWUnsafeCounter is a typedef for RWTCounter<RWNullMutexLock> 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 © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |