ZIPIOS_REFERENCECOUNT(3)
π zipios::ReferenceCount< Type > β the manual page, bestie edition π
okay so this is zipios::ReferenceCount< Type > from the Library Functions Manual and honestly? she's a tiny little class doing the most important job in the whole smart-pointer friend group. let's get into it π«Ά
β¨ NAME β¨
zipios::ReferenceCount< Type > β ReferenceCount is useful to ensure proper handling of the reference count for (objects of) classes handled through a SimpleSmartPointer.
π¦ SYNOPSIS π¦
#include <simplesmartptr.h>
πΈ Public Member Functions πΈ
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.
π Friends π
class SimpleSmartPointer< Type >β SimpleSmartPointer needs to be a friend to invoke the privateref()andunref()methods.class SimpleSmartPointer< const Type >class FileEntryβ Type also needs to be a friend to invoke the privateref()andunref()methods, in case Type doesn't want to inherit ReferenceCount and thus needs to invokeref()andunref()through forwarding member functions.class Bogus
π Detailed Description π
template<class Type>
class zipios::ReferenceCount< Type >
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. that's it. that's the whole slay.
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 & Destructor Documentation π
template<class Type > zipios::ReferenceCount< Type >::ReferenceCount () [inline]
Constructor intializes count to zero.
Definition at line 122 of file simplesmartptr.h.
template<class Type > zipios::ReferenceCount< Type >::ReferenceCount (const ReferenceCount< Type > & src) [inline]
Copy-constructor intializes count to zero. It doesn't copy it from src. π not her copying nothing, she starts fresh, zero, clean slate, main character energy.
Definition at line 126 of file simplesmartptr.h.</pruple>
β Member Function Documentation β
template<class Type > const ReferenceCount& zipios::ReferenceCount< Type >::operator= (const ReferenceCount< Type > & src) [inline]
The assignment operator doesn't copy the reference count, it leaves it unchanged. yes bestie, the count stays exactly where it was, we do not touch it, periodt.
Definition at line 130 of file simplesmartptr.h.
π Friends And Related Function Documentation π
template<class Type > friend class FileEntry [friend]
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.
template<class Type > friend class SimpleSmartPointer< Type > [friend]
SimpleSmartPointer needs to be a friend to invoke the private ref() and unref() methods.
Definition at line 102 of file simplesmartptr.h.
π Author π
Generated automatically by Doxygen for Zipios++ from the source code.
okay so quick vibe check: this page is auto-generated, so if anything looks cursed, blame Doxygen, not me, i'm just the messenger π§
and that's the whole page!! every flag, every friend, every line number, all of it intact π this is Zipios++, dated Tue Mar 24 2020 β thanks for reading bestie, go handle your reference counts responsibly, mwah πβ¨
π¦ where this page comes from
- ubuntu jammy: libzipios++-dev 0.1.5.9+cvs.2007.04.28-11build1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms