concepts::RCP< T > Class Template Reference

Reference-counting pointer. More...

#include <bf_iddiv.hh>

Public Member Functions

template<class F >
RCP< T > & operator= (const boost::shared_ptr< F > x)
 
RCP< T > & operator= (const RCP< T > x)
 
RCP< T > & operator= (const RCP< T > x)
 
template<class F >
RCP< T > & operator= (const std::shared_ptr< F > x)
 
 RCP ()
 Default constructor. More...
 
 RCP ()
 Default constructor. More...
 
 RCP (boost::shared_ptr< T > &x)
 
template<class F >
 RCP (const boost::shared_ptr< F > &x)
 
template<class F >
 RCP (const std::shared_ptr< F > &x)
 
template<class F , class G >
 RCP (F x, G y)
 Constructor which includes the deleter G. More...
 
template<class F , class G >
 RCP (F x, G y)
 Constructor which includes the deleter G. More...
 
 RCP (std::shared_ptr< T > &x)
 
 RCP (T *x)
 Constructor for a simple pointer, which will be deleted by the RCP. More...
 
 RCP (T *x)
 Constructor for a simple pointer, which will be deleted by the RCP. More...
 

Detailed Description

template<class T>
class concepts::RCP< T >

Reference-counting pointer.

Author
Kersten Schmidt, 2010 Holger Brandsmeier, 2010

Definition at line 15 of file bf_iddiv.hh.

Constructor & Destructor Documentation

◆ RCP() [1/10]

template<class T >
concepts::RCP< T >::RCP ( )
inline

Default constructor.

Definition at line 32 of file sharedPointer_boost.hh.

◆ RCP() [2/10]

template<class T >
concepts::RCP< T >::RCP ( T *  x)
inlineexplicit

Constructor for a simple pointer, which will be deleted by the RCP.

It should be only called with pointer to dynamic variables, e.g.

RCP p(new int(4));

Do NOT use it with pointers to variables in the stack. Do not

int i = 4; RCP p(&i); // <-- DO NOT -- 

Use instead the function makeRCP_weak for weak RCPs, where the pointer is not deleted.

int i = 4; RCP p = makeRCP_weak(&i);

Definition at line 46 of file sharedPointer_boost.hh.

◆ RCP() [3/10]

template<class T >
concepts::RCP< T >::RCP ( boost::shared_ptr< T > &  x)
inline

Definition at line 48 of file sharedPointer_boost.hh.

◆ RCP() [4/10]

template<class T >
template<class F >
concepts::RCP< T >::RCP ( const boost::shared_ptr< F > &  x)
inline

Definition at line 51 of file sharedPointer_boost.hh.

◆ RCP() [5/10]

template<class T >
template<class F , class G >
concepts::RCP< T >::RCP ( x,
y 
)
inline

Constructor which includes the deleter G.

Definition at line 55 of file sharedPointer_boost.hh.

◆ RCP() [6/10]

template<class T >
concepts::RCP< T >::RCP ( )
inline

Default constructor.

Definition at line 32 of file sharedPointer_std.hh.

◆ RCP() [7/10]

template<class T >
concepts::RCP< T >::RCP ( T *  x)
inlineexplicit

Constructor for a simple pointer, which will be deleted by the RCP.

It should be only called with pointer to dynamic variables, e.g.

RCP p(new int(4));

Do NOT use it with pointers to variables in the stack. Do not

int i = 4; RCP p(&i); // <-- DO NOT -- 

Use instead the function makeRCP_weak for weak RCPs, where the pointer is not deleted.

int i = 4; RCP p = makeRCP_weak(&i);

Definition at line 46 of file sharedPointer_std.hh.

◆ RCP() [8/10]

template<class T >
concepts::RCP< T >::RCP ( std::shared_ptr< T > &  x)
inline

Definition at line 48 of file sharedPointer_std.hh.

◆ RCP() [9/10]

template<class T >
template<class F >
concepts::RCP< T >::RCP ( const std::shared_ptr< F > &  x)
inline

Definition at line 51 of file sharedPointer_std.hh.

◆ RCP() [10/10]

template<class T >
template<class F , class G >
concepts::RCP< T >::RCP ( x,
y 
)
inline

Constructor which includes the deleter G.

Definition at line 55 of file sharedPointer_std.hh.

Member Function Documentation

◆ operator=() [1/4]

template<class T >
template<class F >
RCP<T>& concepts::RCP< T >::operator= ( const boost::shared_ptr< F >  x)
inline

Definition at line 64 of file sharedPointer_boost.hh.

◆ operator=() [2/4]

template<class T >
RCP<T>& concepts::RCP< T >::operator= ( const RCP< T >  x)
inline

Definition at line 57 of file sharedPointer_boost.hh.

◆ operator=() [3/4]

template<class T >
RCP<T>& concepts::RCP< T >::operator= ( const RCP< T >  x)
inline

Definition at line 57 of file sharedPointer_std.hh.

◆ operator=() [4/4]

template<class T >
template<class F >
RCP<T>& concepts::RCP< T >::operator= ( const std::shared_ptr< F >  x)
inline

Definition at line 64 of file sharedPointer_std.hh.


The documentation for this class was generated from the following files:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich