My Project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | Friends
RefCounter Class Reference

This class implements implements a refernce counter which we can use as a public base of objects managed by @CountedRefPtr. More...

#include <countedref.h>

Public Types

typedef short count_type
 Name numerical type for enumbering. More...
 

Public Member Functions

 RefCounter (...)
 Any Constructor resets the counter. More...
 
 ~RefCounter ()
 Destructor. More...
 

Private Attributes

count_type ref
 Number of references. More...
 

Friends

template<class , bool , bool , class >
class CountedRefPtr
 Allow our smart pointer to access internals. More...
 

Detailed Description

This class implements implements a refernce counter which we can use as a public base of objects managed by @CountedRefPtr.

Definition at line 112 of file countedref.h.

Member Typedef Documentation

◆ count_type

typedef short RefCounter::count_type

Name numerical type for enumbering.

Definition at line 116 of file countedref.h.

Constructor & Destructor Documentation

◆ RefCounter()

RefCounter::RefCounter (   ...)
inline

Any Constructor resets the counter.

Definition at line 122 of file countedref.h.

122: ref(0) {}
count_type ref
Number of references.
Definition: countedref.h:129

◆ ~RefCounter()

RefCounter::~RefCounter ( )
inline

Destructor.

Definition at line 125 of file countedref.h.

125{ assume(ref == 0); }
#define assume(x)
Definition: mod2.h:389

Friends And Related Function Documentation

◆ CountedRefPtr

template<class , bool , bool , class >
friend class CountedRefPtr
friend

Allow our smart pointer to access internals.

Definition at line 119 of file countedref.h.

Field Documentation

◆ ref

count_type RefCounter::ref
private

Number of references.

Definition at line 129 of file countedref.h.


The documentation for this class was generated from the following file: