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

RWTCountingPointer <Body,Counter=RWSafeCounter>

Module:  Threads   Package:  Smart Pointer


RWTCountingPointer<Body,Counter=RWSafeCounter> RWTPointer<Body>

Local Index

Members

Header File

#include <rw/pointer/RWTCountingPointer.h>

Description

Defines a reference-counted pointer that provides reference counting semantics for types that do not directly support reference counting. Body, the first template parameter, can be any type. For the second template parameter, Counter, you will generally use one of two typedefs provided by the Smart Pointer package. RWSafeCounter, the default, 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 in situations where thread-safety is not required.

Example

Public Constructors

RWTCountingPointer(Body* bodyP=rwnil);
RWTCountingPointer(RWStaticCtor);
RWTCountingPointer(const RWTCountingPointer<Body, Counter>& second);

Public Destructor

~RWTCountingPointer(); 

Public Member Operators

Body* 
operator->() const; 
Body&
operator*() const;
RWTCountingPointer<Body,Counter>& 
operator=(Body* bodyP);
RWTCountingPointer<Body,Counter>& 
operator=(const RWTCountingPointer<Body,Counter>& second);

See Also

RWTCounter, RWSafeCounter, RWUnsafeCounter



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.