ETL  0.04.19
Public Member Functions | Private Attributes | Friends | List of all members
reference_counter Class Reference

Reference counter. More...

#include <ETL/ref_count>

Public Member Functions

 reference_counter (const bool &x=true)
 reference_counter (const reference_counter &x)
 reference_counter (const weak_reference_counter &x)
 ~reference_counter ()
reference_counteroperator= (const reference_counter &rhs)
void detach ()
void reset ()
int count () const
bool unique () const
 operator int () const

Private Attributes

int * counter_

Friends

class weak_reference_counter

Detailed Description

Reference counter.

See Also
weak_reference_counter
Todo:
This needs to be documented

Definition at line 51 of file _ref_count.h.

Constructor & Destructor Documentation

reference_counter::reference_counter ( const bool &  x = true)
inline

Definition at line 58 of file _ref_count.h.

reference_counter::reference_counter ( const reference_counter x)
inline

Definition at line 60 of file _ref_count.h.

References counter_.

reference_counter::reference_counter ( const weak_reference_counter x)
inline

Definition at line 146 of file _ref_count.h.

References counter_.

reference_counter::~reference_counter ( )
inline

Definition at line 65 of file _ref_count.h.

References detach().

Member Function Documentation

reference_counter& reference_counter::operator= ( const reference_counter rhs)
inline

Definition at line 67 of file _ref_count.h.

References counter_, and detach().

void reference_counter::detach ( )
inline

Definition at line 79 of file _ref_count.h.

References counter_.

Referenced by operator=(), reset(), smart_ptr< T, D >::reset(), and ~reference_counter().

void reference_counter::reset ( )
inline

Definition at line 90 of file _ref_count.h.

References counter_, and detach().

int reference_counter::count ( ) const
inline

Definition at line 96 of file _ref_count.h.

References counter_.

Referenced by operator int().

bool reference_counter::unique ( ) const
inline
reference_counter::operator int ( ) const
inline

Definition at line 100 of file _ref_count.h.

References count().

Friends And Related Function Documentation

friend class weak_reference_counter
friend

Definition at line 53 of file _ref_count.h.

Member Data Documentation

int* reference_counter::counter_
private

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