C3D Toolkit
Kernel - 117950, Vision - 2.7.5.29
|
Reference-counted object. More...
#include <reference_item.h>
Public Member Functions | |
virtual MbeRefType | RefType () const |
Registration type (for copying, duplication). | |
Functions for registration of references to geometric object by owners of object. | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
Protected Member Functions | |
MbRefItem () | |
Constructor without parameters. | |
Reference-counted object.
Object counting number of its owners.
Is used as one of parent classes of geometric objects.
If an instance inheriting this class is captured by other object or used in algorithms, then the other object or algorithm has to increase reference counter by one by AddRef() method. When an instance of this class is released by another object (for example, when the SPtr pointer is destructed) or by the using algorithm, the using object or algorithm must call the Release() method to decrease the reference count. Such rule allows you to guarantee the validity of the MbRefItem instance as long as there is at least one of its users.
\~