SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
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) |
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.
RWTCounter< Mutex >::RWTCounter | ( | unsigned | initCount = 0 |
) | [inline] |
Constructs a default instance (initializes the reference count). Throws no exceptions.
RWTCounter< Mutex >::RWTCounter | ( | RWStaticCtor | ) | [inline] |
Constructs a static instance (does not initialize the reference count). Throws no exceptions.
RWTCounter< Mutex >::RWTCounter | ( | const RWTCounter< Mutex > & | second | ) | [inline] |
Does not copy the internal count. This method is provided as a convenience to derived classes.
RWTCounter< Mutex > & RWTCounter< Mutex >::operator= | ( | const RWTCounter< Mutex > & | second | ) | [inline] |
Does not assign the internal count. This method is provided as a convenience to derived classes.
© 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.