Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress C++ API Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::HandleBase

Group:  Core Design Patterns


Does not inherit

Local Index

Members

Header File

#include rwsf/core/HandleBase.h

Description

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.

Public Member Functions

bool
isValid(void) const;

Protected Member Functions

BodyBase &
body(void) const;

Public Operators

bool
operator!=(const HandleBase & second) const;
bool
operator==(const HandleBase & second) const;


Previous fileTop of DocumentContentsIndex pageNext file

© 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.