Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWTCountingBody<Mutex>

Module:  Threads   Package:  Smart Pointer


RWTCountingBody<Mutex> RWTMonitor<Mutex>

Local Index

Members

Header File

#include <rw/pointer/RWTCountingBody.h>

Description

RWTCountingBody<Mutex> is a base class for classes that must maintain a reference count. It can be safely used in a multithreaded environment, when parameterized with a non-null mutex. If multithread safety is not an issue, use a null mutex as the template type.

Example

Protected Member Typedefs

typedef RWTLockGuard<RWTMonitor<Mutex> >       LockGuard;
typedef RWTUnlockGuard<RWTMonitor<Mutex> >     UnlockGuard;
typedef RWTTryLockGuard<RWTMonitor<Mutex> >    TryLockGuard;

Public Destructor

~RWTCountingBody();

Public Member Functions

unsigned
addReference();
unsigned
references() const;
unsigned
removeReference();

Protected Constructors

RWTCountingBody(RWStaticCtor);
RWTCountingBody(const RWTCountingBody<Mutex>& second);
RWTCountingBody(unsigned initCount = 0);

Protected Member Operator

RWTCountingBody<Mutex>&
operator=(const RWTCountingBody<Mutex>& second);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.