DAS  3.0
Das Analysis System
SharedPtr< T >::__SharedCountingPtr

#include <fjcore.hh>

Public Member Functions

 __SharedCountingPtr ()
 
template<class Y >
 __SharedCountingPtr (Y *ptr)
 
 ~__SharedCountingPtr ()
 
T * get () const
 
long use_count () const
 
long operator++ ()
 
long operator-- ()
 
long operator++ (int)
 
long operator-- (int)
 
void set_count (const long &count)
 

Private Attributes

T * _ptr
 
long _count
 

Constructor & Destructor Documentation

◆ __SharedCountingPtr() [1/2]

__SharedCountingPtr ( )
inline
370 : _ptr(NULL), _count(0){}

◆ __SharedCountingPtr() [2/2]

__SharedCountingPtr ( Y *  ptr)
inlineexplicit
371 : _ptr(ptr), _count(1){}

◆ ~__SharedCountingPtr()

~__SharedCountingPtr ( )
inline
372  {
373  if (_ptr!=NULL){ delete _ptr;}
374  }

Member Function Documentation

◆ get()

T* get ( ) const
inline
375 {return _ptr;}

◆ operator++() [1/2]

long operator++ ( )
inline
377 {return ++_count;}

◆ operator++() [2/2]

long operator++ ( int  )
inline
379 {return _count++;}

◆ operator--() [1/2]

long operator-- ( )
inline
378 {return --_count;}

◆ operator--() [2/2]

long operator-- ( int  )
inline
380 {return _count--;}

◆ set_count()

void set_count ( const long &  count)
inline
381  {
382  _count = count;
383  }

◆ use_count()

long use_count ( ) const
inline
376 {return _count;}

Member Data Documentation

◆ _count

long _count
private

the number of references

◆ _ptr

T* _ptr
private

the pointer we're counting the references to


The documentation for this class was generated from the following file:
SharedPtr::__SharedCountingPtr::_count
long _count
the number of references
Definition: fjcore.hh:386
SharedPtr::__SharedCountingPtr::_ptr
T * _ptr
the pointer we're counting the references to
Definition: fjcore.hh:385