Does not inherit
#include rwsf/core/HandleBase.h
rwsf::HandleBase is the base class for handle classes. Each time an instance of this class is bound to an instance of rwsf::BodyBase class, it increments the reference count maintained by that body. Each time an instance of this class detaches from a body instance, it decrements the body's reference count, until the last handle detaches, reaching zero, whereupon it deletes the body instance.
The reference counting relieves clients of the burden of keeping track of when it is safe to delete a body instance.
When a handle is copy-constructed, the new handle attaches to the same body as the original. When one handle is assigned to another handle, the handle on the left side detaches from its current body and attaches to the body pointed to by the handle on the right side.
bool isValid(void) const;
Returns true if this handle points to a valid body instance, and false otherwise.
BodyBase & body(void) const;
Gets a reference for the body instance, if any; otherwise, throws an rwsf::Exception exception.
bool operator!=(const HandleBase & second) const;
Returns true if the handle points to different body instance, if any, than pointed to by a second handle, and otherwise false. Throws no exceptions.
bool operator==(const HandleBase & second) const;
Returns true if the handle points to the same body instance, if any, as pointed to by a second handle, and false otherwise. Two empty handles are equal. Throws no exceptions.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.