43 #ifndef TEUCHOS_PTR_HPP 44 #define TEUCHOS_PTR_HPP 47 #include "Teuchos_PtrDecl.hpp" 54 namespace PtrPrivateUtilityPack {
55 TEUCHOSCORE_LIB_DLL_EXPORT
void throw_null(
const std::string &type_name );
59 template<
class T>
inline 65 template<
class T>
inline 71 template<
class T>
inline 75 ,rcp_(ptr_in.access_rcp())
81 template<
class T2>
inline 85 ,rcp_(ptr_in.access_rcp())
90 template<
class T>
inline 101 template<
class T>
inline 104 debug_assert_not_null();
105 debug_assert_valid_ptr();
110 template<
class T>
inline 113 debug_assert_not_null();
114 debug_assert_valid_ptr();
119 template<
class T>
inline 122 debug_assert_valid_ptr();
127 template<
class T>
inline 134 template<
class T>
inline 143 template<
class T>
inline 149 template<
class T>
inline 156 template<
class T>
inline 163 template<
class T>
inline 167 rcp_.access_private_node().assert_valid_ptr(*
this);
175 template<
class T>
inline 176 Ptr<T>::Ptr(
const RCP<T> &p )
177 : ptr_(p.getRawPtr()), rcp_(p)
181 #endif // TEUCHOS_DEBUG 188 std::ostream& Teuchos::operator<<( std::ostream& out, const Ptr<T>& p )
191 << TypeNameTraits<RCP<T> >::name() <<
"{" 192 <<
"ptr="<<(
const void*)(p.get())
198 #endif // TEUCHOS_PTR_HPP bool is_null(const boost::shared_ptr< T > &p)
Returns true if p.get()==NULL.
T & get(ParameterList &l, const std::string &name)
A shorter name for getParameter().
Ptr< T2 > ptr_implicit_cast(const Ptr< T1 > &p1)
Implicit cast of underlying Ptr type from T1* to T2*.
Ptr(ENull null_in=null)
Default construct to NULL.
Default traits class that just returns typeid(T).name().
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
T * get() const
Get the raw C++ pointer to the underlying object.
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
Reference-counted pointer class and non-member templated function implementations.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...