klee
klee::ReferenceCounter Class Reference

Reference counter to be used as part of a ref-managed struct or class. More...

#include <Ref.h>

Public Member Functions

 ReferenceCounter ()=default
 
 ~ReferenceCounter ()=default
 
 ReferenceCounter (const ReferenceCounter &)
 
unsigned getCount ()
 
ReferenceCounteroperator= (const ReferenceCounter &a)
 
 ReferenceCounter (ReferenceCounter &&r) noexcept=delete
 
ReferenceCounteroperator= (ReferenceCounter &&other) noexcept=delete
 

Private Attributes

unsigned refCount = 0
 Count how often the object has been referenced. More...
 

Friends

template<class T >
class ref
 

Detailed Description

Reference counter to be used as part of a ref-managed struct or class.

Definition at line 46 of file Ref.h.

Constructor & Destructor Documentation

◆ ReferenceCounter() [1/3]

klee::ReferenceCounter::ReferenceCounter ( )
default

◆ ~ReferenceCounter()

klee::ReferenceCounter::~ReferenceCounter ( )
default

◆ ReferenceCounter() [2/3]

klee::ReferenceCounter::ReferenceCounter ( const ReferenceCounter )
inline

Definition at line 60 of file Ref.h.

◆ ReferenceCounter() [3/3]

klee::ReferenceCounter::ReferenceCounter ( ReferenceCounter &&  r)
deletenoexcept

Member Function Documentation

◆ getCount()

unsigned klee::ReferenceCounter::getCount ( )
inline

Returns the number of parallel references of this objects

Returns
number of references on this object

Definition at line 64 of file Ref.h.

References refCount.

◆ operator=() [1/2]

ReferenceCounter & klee::ReferenceCounter::operator= ( const ReferenceCounter a)
inline

Definition at line 67 of file Ref.h.

References refCount.

◆ operator=() [2/2]

ReferenceCounter & klee::ReferenceCounter::operator= ( ReferenceCounter &&  other)
deletenoexcept

Friends And Related Function Documentation

◆ ref

template<class T >
friend class ref
friend

Definition at line 48 of file Ref.h.

Member Data Documentation

◆ refCount

unsigned klee::ReferenceCounter::refCount = 0
private

Count how often the object has been referenced.

Definition at line 51 of file Ref.h.

Referenced by getCount(), and operator=().


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