$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::util::tracked_ptr< T > Struct Template Reference

#include <mln/util/tracked_ptr.hh>

Public Member Functions

 ~tracked_ptr ()
void clean_ ()
 operator bool () const
bool operator! () const
const T & operator* () const
T & operator* ()
const T * operator-> () const
T * operator-> ()
tracked_ptr< T > & operator= (const tracked_ptr< T > &rhs)
tracked_ptr< T > & operator= (T *ptr)
bool run_ () const
Constructors.
 tracked_ptr ()
 tracked_ptr (T *ptr)
 tracked_ptr (const tracked_ptr< T > &rhs)

Public Attributes

holders_tholders_
T * ptr_

Public Types

typedef std::set< self_t * > holders_t
typedef tracked_ptr< T > self_t

Detailed Description

template<typename T>
struct mln::util::tracked_ptr< T >

Smart pointer for shared data with tracking.

Definition at line 52 of file tracked_ptr.hh.

Constructor & Destructor Documentation

template<typename T>
mln::util::tracked_ptr< T >::tracked_ptr ( )
template<typename T>
mln::util::tracked_ptr< T >::tracked_ptr ( T *  ptr)
template<typename T>
mln::util::tracked_ptr< T >::tracked_ptr ( const tracked_ptr< T > &  rhs)

Copy constructor.

template<typename T>
mln::util::tracked_ptr< T >::~tracked_ptr ( )

Destructor.

Member Function Documentation

template<typename T>
void mln::util::tracked_ptr< T >::clean_ ( )
template<typename T>
mln::util::tracked_ptr< T >::operator bool ( ) const

Coercion towards Boolean (for arithmetical tests).

template<typename T>
bool mln::util::tracked_ptr< T >::operator! ( ) const

Negation (for arithmetical tests).

template<typename T>
const T& mln::util::tracked_ptr< T >::operator* ( ) const

Mimics the behavior of op* for a pointer in the const case.

Invariant
Pointer proxy exists.
template<typename T>
T& mln::util::tracked_ptr< T >::operator* ( )

Mimics the behavior of op* for a pointer in the mutable case.

Invariant
Pointer proxy exists.
template<typename T>
const T* mln::util::tracked_ptr< T >::operator-> ( ) const

Mimics the behavior of op-> for a pointer in the const case.

Invariant
Pointer proxy exists.
template<typename T>
T* mln::util::tracked_ptr< T >::operator-> ( )

Mimics the behavior of op-> for a pointer in the mutable case.

Invariant
Pointer proxy exists.
template<typename T>
tracked_ptr<T>& mln::util::tracked_ptr< T >::operator= ( const tracked_ptr< T > &  rhs)

Assignment.

template<typename T>
tracked_ptr<T>& mln::util::tracked_ptr< T >::operator= ( T *  ptr)

Assignment.

template<typename T>
bool mln::util::tracked_ptr< T >::run_ ( ) const

Member Data Documentation

template<typename T>
holders_t* mln::util::tracked_ptr< T >::holders_

Definition at line 58 of file tracked_ptr.hh.

template<typename T>
T* mln::util::tracked_ptr< T >::ptr_

Definition at line 57 of file tracked_ptr.hh.

Member Typedef Documentation

template<typename T>
typedef std::set<self_t*> mln::util::tracked_ptr< T >::holders_t

Definition at line 55 of file tracked_ptr.hh.

template<typename T>
typedef tracked_ptr<T> mln::util::tracked_ptr< T >::self_t

Definition at line 54 of file tracked_ptr.hh.