SourcePro 11.1 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Base class for smart-pointer classes. More...
#include <rw/pointer/RWTPointer.h>
Public Types | |
typedef Body | BodyType |
Public Member Functions | |
~RWTPointer (void) | |
void | validate (void) const |
bool | isValid (void) const |
bool | operator== (const RWTPointer< Body > &second) const |
bool | operator!= (const RWTPointer< Body > &second) const |
bool | operator== (const Body *ptr) const |
bool | operator!= (const Body *ptr) const |
void | swapWith (RWTPointer< Body > &second) |
Protected Member Functions | |
RWTPointer (void) | |
RWTPointer (RWStaticCtor) | |
RWTPointer (Body *bodyP) | |
RWTPointer (const RWTPointer< Body > &second) | |
Body * | get (void) const |
RWTPointer< Body > & | operator= (Body *ptr) |
This is an base class for the smart-pointer classes in the Smart Pointer package.
typedef Body RWTPointer< Body >::BodyType |
The type of the body.
Reimplemented in RWTCountedPointer< Body >, RWTCountingPointer< Body, Counter >, RWTOnlyPointer< Body >, RWTCountedPointer< RWBodyBase >, RWTCountingPointer< RWTFactory1< Result, Key, Arg1 >, RWAtomicCounter >, RWTCountingPointer< RWTFactory0< Result, Key >, RWAtomicCounter >, RWTCountingPointer< RWTFactory2< Result, Key, Arg1, Arg2 >, RWAtomicCounter >, RWTCountingPointer< RWHttpRequestBody, RWAtomicCounter >, RWTCountingPointer< T, RWAtomicCounter >, RWTCountingPointer< RWHttpClientManager, RWAtomicCounter >, RWTOnlyPointer< RWTMaskedCallbackList2< RWMutexLock, const RWRunnable &, RWExecutionState > >, and RWTOnlyPointer< RWTHRxmsg >.
RWTPointer< Body >::~RWTPointer | ( | void | ) |
Destructor. Throws no exceptions.
RWTPointer< Body >::RWTPointer | ( | void | ) | [protected] |
Constructs a handle instance with a pointer value of rwnil. Throws no exceptions.
RWTPointer< Body >::RWTPointer | ( | RWStaticCtor | ) | [protected] |
Constructor for static pointers that may be used before constructed. Throws no exceptions.
RWTPointer< Body >::RWTPointer | ( | Body * | bodyP | ) | [protected] |
Constructs a handle instance that points to the specified body. Throws no exceptions.
RWTPointer< Body >::RWTPointer | ( | const RWTPointer< Body > & | second | ) | [protected] |
Constructs a handle instance that points to the same body as the second. Throws no exceptions.
Body* RWTPointer< Body >::get | ( | void | ) | const [protected] |
Retrieves the handle's pointer value without validating it. Throws no exceptions.
bool RWTPointer< Body >::isValid | ( | void | ) | const |
Returns true
if pointer is non-nil (rwnil); otherwise returns false
. Throws no exceptions.
bool RWTPointer< Body >::operator!= | ( | const Body * | ptr | ) | const |
Tests to see if this instance points to a different body than the argument. Throws no exceptions.
bool RWTPointer< Body >::operator!= | ( | const RWTPointer< Body > & | second | ) | const |
Tests to see if this instance points to a different body than the second instance points to. Throws no exceptions.
RWTPointer<Body>& RWTPointer< Body >::operator= | ( | Body * | ptr | ) | [protected] |
Assigns a new pointer value to the handle. The parameter is Body*
. Throws no exceptions.
Reimplemented in RWTCountedPointer< Body >, RWTCountingPointer< Body, Counter >, RWTOnlyPointer< Body >, RWTCountedPointer< RWBodyBase >, RWTCountingPointer< RWTFactory1< Result, Key, Arg1 >, RWAtomicCounter >, RWTCountingPointer< RWTFactory0< Result, Key >, RWAtomicCounter >, RWTCountingPointer< RWTFactory2< Result, Key, Arg1, Arg2 >, RWAtomicCounter >, RWTCountingPointer< RWHttpRequestBody, RWAtomicCounter >, RWTCountingPointer< T, RWAtomicCounter >, RWTCountingPointer< RWHttpClientManager, RWAtomicCounter >, RWTOnlyPointer< RWTMaskedCallbackList2< RWMutexLock, const RWRunnable &, RWExecutionState > >, and RWTOnlyPointer< RWTHRxmsg >.
bool RWTPointer< Body >::operator== | ( | const Body * | ptr | ) | const |
Tests to see if this instance points to the same body as the argument. Throws no exceptions.
bool RWTPointer< Body >::operator== | ( | const RWTPointer< Body > & | second | ) | const |
Tests to see if this instance points to the same body as the second instance. Throws no exceptions.
void RWTPointer< Body >::swapWith | ( | RWTPointer< Body > & | second | ) |
Swap bodies, if any, with another handle. Throws no exceptions.
void RWTPointer< Body >::validate | ( | void | ) | const |
Check if the pointer is valid, throwing an RWTHRInvalidPointer exception if the pointer is rwnil. Throws an RWTHRInvalidPointer exception.
© 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.