10#ifndef TEUCHOS_PTR_HPP 
   11#define TEUCHOS_PTR_HPP 
   14#include "Teuchos_PtrDecl.hpp" 
   21namespace PtrPrivateUtilityPack {
 
   22TEUCHOSCORE_LIB_DLL_EXPORT 
void throw_null( 
const std::string &type_name );
 
   26template<
class T> 
inline 
   32template<
class T> 
inline 
   38template<
class T> 
inline 
   48template<
class T2> 
inline 
   57template<
class T> 
inline 
   68template<
class T> 
inline 
   77template<
class T> 
inline 
   86template<
class T> 
inline 
   94template<
class T> 
inline 
  101template<
class T> 
inline 
  110template<
class T> 
inline 
  116template<
class T> 
inline 
  123template<
class T> 
inline 
  130template<
class T> 
inline 
  134  rcp_.access_private_node().assert_valid_ptr(*
this);
 
  142template<
class T> 
inline 
  144  : ptr_(
p.getRawPtr()), rcp_(
p)
 
  159    << 
"ptr="<<(
const void*)(
p.
get()) 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Reference-counted pointer class and non-member templated function implementations.
 
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
 
const Ptr< T > & assert_not_null() const
Throws std::logic_error if this->get()==NULL, otherwise returns reference to *this.
 
Ptr< const T > getConst() const
Return a Ptr<const T> version of *this.
 
T * getRawPtr() const
Get the raw C++ pointer to the underlying object.
 
Ptr< T > & operator=(const Ptr< T > &ptr)
Shallow copy of the underlying pointer.
 
bool is_null() const
Return true if the wrapped raw pointer is NULL, else return false.
 
T * operator->() const
Pointer (->) access to members of underlying object.
 
T & operator*() const
Dereference the underlying object.
 
T * get() const
Get the raw C++ pointer to the underlying object.
 
const Ptr< T > ptr() const
Return a copy of *this.
 
Ptr(ENull null_in=null)
Default construct to NULL.
 
Smart reference counting pointer class for automatic garbage collection.
 
const RCP< T > & debug_assert_valid_ptr() const
Calls assert_valid_ptr() in a debug build.
 
T * get() const
Get the raw C++ pointer to the underlying object.
 
const RCP< T > & debug_assert_not_null() const
Calls assert_not_null() in a debug build.
 
Default traits class that just returns typeid(T).name().
 
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...