43#ifndef TEUCHOS_PTR_HPP
44#define TEUCHOS_PTR_HPP
54namespace PtrPrivateUtilityPack {
59template<
class T>
inline
65template<
class T>
inline
71template<
class T>
inline
81template<
class T2>
inline
90template<
class T>
inline
101template<
class T>
inline
104 debug_assert_not_null();
105 debug_assert_valid_ptr();
110template<
class T>
inline
113 debug_assert_not_null();
114 debug_assert_valid_ptr();
119template<
class T>
inline
122 debug_assert_valid_ptr();
127template<
class T>
inline
134template<
class T>
inline
143template<
class T>
inline
149template<
class T>
inline
156template<
class T>
inline
163template<
class T>
inline
167 rcp_.access_private_node().assert_valid_ptr(*
this);
175template<
class T>
inline
177 : ptr_(
p.getRawPtr()), rcp_(
p)
192 <<
"ptr="<<(
const void*)(
p.get())
#define TEUCHOSCORE_LIB_DLL_EXPORT
Reference-counted pointer class and non-member templated function implementations.
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.
void debug_assert_valid_ptr() const
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.
Concrete serial communicator subclass.
Default traits class that just returns typeid(T).name().
TEUCHOSCORE_LIB_DLL_EXPORT void throw_null(const std::string &type_name)
std::ostream & operator<<(std::ostream &os, BigUInt< n > a)