|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Go to the documentation of this file.
43 #ifndef TEUCHOS_PTR_HPP
44 #define TEUCHOS_PTR_HPP
54 namespace PtrPrivateUtilityPack {
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
159 return ptr_implicit_cast<const T>(*
this);
163 template<
class T>
inline
167 rcp_.access_private_node().assert_valid_ptr(*
this);
175 template<
class T>
inline
181 #endif // TEUCHOS_DEBUG
191 << TypeNameTraits<RCP<T> >::name() <<
"{"
192 <<
"ptr="<<(
const void*)(p.get())
198 #endif // TEUCHOS_PTR_HPP
Reference-counted pointer class and non-member templated function implementations.
RawPointerConversionTraits< Container >::Ptr_t getRawPtr(const Container &c)
void debug_assert_valid_ptr() const
T * operator->() const
Pointer (->) access to members of underlying object.
Default traits class that just returns typeid(T).name().
std::ostream & operator<<(std::ostream &os, BigUInt< n > a)
#define TEUCHOSCORE_LIB_DLL_EXPORT
Smart reference counting pointer class for automatic garbage collection.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
Ptr< const T > getConst() const
Return a Ptr<const T> version of *this.
Ptr< T > & operator=(const Ptr< T > &ptr)
Shallow copy of the underlying pointer.
TEUCHOSCORE_LIB_DLL_EXPORT void throw_null(const std::string &type_name)
Ptr(ENull null_in=null)
Default construct to NULL.
bool is_null() const
Return true if the wrapped raw pointer is NULL, else return false.
const Ptr< T > & assert_not_null() const
Throws std::logic_error if this->get()==NULL, otherwise returns reference to *this.
T & operator*() const
Dereference the underlying object.
const Ptr< T > ptr() const
Return a copy of *this.
T * get() const
Get the raw C++ pointer to the underlying object.
T * getRawPtr() const
Get the raw C++ pointer to the underlying object.