RWBodyBase RWTCountingBody<RWMutexLock>
#include <rw/pointer/RWBodyBase.h>
Base class for body classes. Each time an RWHandleBase instance is bound to an instance of this class, the handle instance increments the reference count inherited by the body instance. Each time a handle instance detaches from an instance of this class, the handle decrements the reference count. If the reference count reaches zero, the handle deletes the body instance. The reference counting relieves clients of the burden of having to keep track of when it is safe to delete a body instance.
See HandlebodyEx1.cpp and HandlebodyEx2.cpp, located in the Examples directory.
RWBodyBase(void);
Default constructor. Constructs a default body instance (reference count starts at zero).
RWBodyBase(RWStaticCtor);
Constructs a static body instance (reference count starts at one, to prevent deletion by handles).
RWBodyBase(const RWBodyBase& second);
Copy constructor.
virtual ~RWBodyBase(void);
Destructor. Throws no exceptions.
RWBodyBase& operator=(const RWBodyBase& second);
Assignment operator. Throws no exceptions.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.