Referencecount is useful to ensure proper handling of the reference count for (objects of) classes handled through a simplesmartpointer.
#include <simplesmartptr.h>
ReferenceCount ()
Constructor intializes count to zero. ReferenceCount (const ReferenceCount &src)
Copy-constructor intializes count to zero. const ReferenceCount & operator= (const ReferenceCount &src)
The assignment operator doesn't copy the reference count, it leaves it unchanged.
class SimpleSmartPointer< Type >
SimpleSmartPointer needs to be a friend to invoke the private ref() and unref() methods. class SimpleSmartPointer< const Type >
class FileEntry
Type also needs to be a friend to invoke the private ref() and unref() methods, in case Type doesn't want to inherit ReferenceCount and thus needs to invoke ref() and unref() through forwarding member functions. class Bogus
ReferenceCount is useful to ensure proper handling of the reference count for (objects of) classes handled through a SimpleSmartPointer.
Subclassing ReferenceCount is all a class needs to become ready for being handled by SimpleSmartPointer. Another way is to add a ReferenceCount member variable to a class and write two methods 'void ref() const' and 'unsigned int unref() const' that invoke the same methods in the ReferenceCount variable.
Definition at line 99 of file simplesmartptr.h.
Constructor intializes count to zero.
Definition at line 122 of file simplesmartptr.h.
Copy-constructor intializes count to zero. It doesn't copy it from src.
Definition at line 126 of file simplesmartptr.h.
The assignment operator doesn't copy the reference count, it leaves it unchanged.
Definition at line 130 of file simplesmartptr.h.
Type also needs to be a friend to invoke the private ref() and unref() methods, in case Type doesn't want to inherit ReferenceCount and thus needs to invoke ref() and unref() through forwarding member functions.
Definition at line 117 of file simplesmartptr.h.
SimpleSmartPointer needs to be a friend to invoke the private ref() and unref() methods.
Definition at line 102 of file simplesmartptr.h.
Generated automatically by Doxygen for Zipios++ from the source code.