Loading...
Searching...
No Matches
RefCounter Class Reference

This class implements implements a reference 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.

## Public Member Functions

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

## Private Attributes

count_type | ref
| Number of references.

## Friends

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

## Detailed Description

This class implements implements a reference 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.

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

## ~RefCounter()

RefCounter::~RefCounter | ( |  | ) |

inline

Destructor.

Definition at line 125 of file countedref.h.

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

## Friends And Related Symbol 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:

- Singular/countedref.h