Conversion utilities for going between Teuchos::RefCountPtr and boost::shared_ptr.
[Teuchos Memory Management Utilities]


Classes

class  Teuchos::DeallocBoostSharedPtr< T >
 Teuchos::RefCountPtr Deallocator class that wraps a boost::shared_ptr More...
class  Teuchos::RefCountPtrDeleter< T >
 boost::shared_ptr deleter class that wraps a Teuchos::RefCountPtr. More...

Functions

template<class T>
RefCountPtr< T > Teuchos::rcp (const boost::shared_ptr< T > &sptr)
 Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RefCountPtr object.
template<class T>
boost::shared_ptr< T > Teuchos::shared_pointer (const RefCountPtr< T > &rcp)
 Conversion function that takes in a Teuchos::RefCountPtr object and spits out a boost::shared_ptr object.

Detailed Description

The smart pointer classes Teuchos::RefCountPtr and boost::shared_ptr are easily compatible. The two templated conversion functions Teuchos::rcp( const boost::shared_ptr<T> & ) and Teuchos::shared_pointer( const RefCountPtr<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:


Function Documentation

template<class T>
Teuchos::RefCountPtr< T > Teuchos::rcp const boost::shared_ptr< T > &  sptr  ) 
 

Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RefCountPtr object.

If the input boost::shared_ptr already wraps a Teuchos::RefCountPtr object, then that Teuchos::RefCountPtr object will be copied and returned.

This function is not complicated, just look at its defintion below.

Examples:
example/RefCountPtr/cxx_main.cpp, FancyOutputting_test.cpp, ParameterList/cxx_main.cpp, and test/RefCountPtr/cxx_main.cpp.

Definition at line 37 of file Teuchos_RefCountPtrBoostSharedPtrConversions.hpp.

template<class T>
boost::shared_ptr< T > Teuchos::shared_pointer const RefCountPtr< T > &  rcp  ) 
 

Conversion function that takes in a Teuchos::RefCountPtr object and spits out a boost::shared_ptr object.

If the input Teuchos::RefCountPtr 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.

Examples:
test/RefCountPtr/cxx_main.cpp.

Definition at line 51 of file Teuchos_RefCountPtrBoostSharedPtrConversions.hpp.


Generated on Thu Sep 18 12:30:31 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1