Module: Threads Package: Smart Pointer
Base Class
BodyType get() isValid() |
operator!=() operator=() operator==() |
RWTPointer() swapWith() validate() |
~RWTPointer() |
#include <rw/pointer/RWTPointer.h>
This is an abstract base class for the smart-pointer classes in the Smart Pointer package.
typedef Body BodyType;
The type of the body.
~RWTPointer();
Destructor. Throws no exceptions.
bool operator!=(const Body* ptr) const;
Tests to see if this instance points to a different body than the argument. Throws no exceptions.
bool 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 operator==(const Body* ptr) const;
Tests to see if this instance points to the same body as the argument. Throws no exceptions.
bool operator==(const RWTPointer<Body>& second) const;
Tests to see if this instance points to the same body as the second instance. Throws no exceptions.
bool isValid() const;
Returns true if pointer is non-nil (rwnil); otherwise returns false. Throws no exceptions.
void swapWith(RWTPointer<Body>& second);
Swap bodies, if any, with another handle. Throws no exceptions.
void validate() const;
Check if the pointer is valid, throwing an RWTHRInvalidPointer exception if the pointer is rwnil. Throws an RWTHRInvalidPointer exception.
RWTPointer();
Constructs a handle instance with a pointer value of rwnil. Throws no exceptions.
RWTPointer(Body* bodyP);
Constructs a handle instance that points to the specified body. Throws no exceptions.
RWTPointer(RWStaticCtor);
Constructor for static pointers that may be used before constructed. Throws no exceptions.
RWTPointer(const RWTPointer<Body>& second);
Constructs a handle instance that points to the same body as the second. Throws no exceptions.
RWTPointer<Body>& operator=(Body* ptr);
Assigns a new pointer value to the handle. The parameter is Body*. Throws no exceptions.
Body* get() const;
Retrieves the handle's pointer value without validating it. Throws no exceptions.
© 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.