SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Base class for smart-pointer classes. More...
#include <rw/pointer/RWTPointer.h>
Public Types | |
typedef Body | BodyType |
Public Member Functions | |
~RWTPointer (void) | |
bool | isValid (void) const |
bool | operator!= (const RWTPointer< Body > &second) const |
bool | operator!= (const Body *ptr) const |
bool | operator== (const RWTPointer< Body > &second) const |
bool | operator== (const Body *ptr) const |
void | swapWith (RWTPointer< Body > &second) |
void | validate (void) const |
Protected Member Functions | |
RWTPointer (void) | |
RWTPointer (RWStaticCtor) | |
RWTPointer (Body *bodyP) | |
RWTPointer (const RWTPointer< Body > &second) | |
Body * | get (void) const |
RWTPointer< Body > & | operator= (Body *ptr) |
Base class for the smart-pointer classes in the Smart Pointer package.
typedef Body RWTPointer< Body >::BodyType |
The type of the body.
RWTPointer< Body >::~RWTPointer | ( | void | ) |
Destructor. Throws no exceptions.
|
protected |
Constructs a handle instance with a pointer value of rwnil. Throws no exceptions.
|
protected |
Constructor for static pointers that may be used before constructed. Throws no exceptions.
|
protected |
Constructs a handle instance that points to the specified body. Throws no exceptions.
|
protected |
Constructs a handle instance that points to the same body as second. Throws no exceptions.
|
protected |
Retrieves the handle's pointer value without validating it. Throws no exceptions.
|
inline |
Returns true
if the pointer is non-nil (rwnil), otherwise returns false
. 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.
bool RWTPointer< Body >::operator!= | ( | const Body * | ptr | ) | const |
Tests to see if this instance points to a different body than ptr. Throws no exceptions.
|
protected |
Assigns a new pointer value to the handle. The parameter ptr is Body*
. Throws no exceptions.
bool RWTPointer< Body >::operator== | ( | const RWTPointer< Body > & | second | ) | const |
Tests to see if this instance points to the same body that the second instance points to. Throws no exceptions.
bool RWTPointer< Body >::operator== | ( | const Body * | ptr | ) | const |
Tests to see if this instance points to the same body as ptr. Throws no exceptions.
void RWTPointer< Body >::swapWith | ( | RWTPointer< Body > & | second | ) |
Swap bodies, if any, pointed to by this and second. Throws no exceptions.
|
inline |
Check if the pointer is valid. Throws an RWTHRInvalidPointer exception if the pointer is rwnil.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |