![]() |
Classes | |
class | Teuchos::DeallocBoostSharedPtr< T > |
Teuchos::RCP Deallocator class that wraps a boost::shared_ptr More... | |
class | Teuchos::RCPDeleter< T > |
boost::shared_ptr deleter class that wraps a Teuchos::RCP . More... | |
Functions | |
template<class T > | |
RCP< T > | Teuchos::rcp (const boost::shared_ptr< T > &sptr) |
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object. | |
template<class T > | |
boost::shared_ptr< T > | Teuchos::shared_pointer (const RCP< T > &rcp) |
Conversion function that takes in a Teuchos::RCP object and spits out a boost::shared_ptr object. |
Teuchos::RCP
and boost::shared_ptr
are easily compatible. The two templated conversion functions Teuchos::rcp( const boost::shared_ptr<T> & )
and Teuchos::shared_pointer( const RCP<T> & )
have been created for converting back and forth.The following code shows how to convert back and forth between these two smart pointer types:
Teuchos::RCP< T > Teuchos::rcp | ( | const boost::shared_ptr< T > & | sptr | ) | [inline] |
Conversion function that takes in a boost::shared_ptr
object and spits out a Teuchos::RCP
object.
If the input boost::shared_ptr
already wraps a Teuchos::RCP
object, then that Teuchos::RCP
object will be copied and returned.
This function is not complicated, just look at its defintion below.
Definition at line 37 of file Teuchos_RCPBoostSharedPtrConversions.hpp.
boost::shared_ptr< T > Teuchos::shared_pointer | ( | const RCP< T > & | rcp | ) | [inline] |
Conversion function that takes in a Teuchos::RCP
object and spits out a boost::shared_ptr
object.
If the input Teuchos::RCP
already wraps a boost::shared_ptr
object, then that boost::shared_ptr
object will be copied and returned.
This function is not complicated, just look at its defintion below.
Definition at line 51 of file Teuchos_RCPBoostSharedPtrConversions.hpp.