20 #ifndef INCLUDED_RTL_REF_HXX 21 #define INCLUDED_RTL_REF_HXX 36 template <
class reference_type>
41 reference_type * m_pBody;
71 : m_pBody (handle.m_pBody)
77 #ifdef LIBO_INTERNAL_ONLY 81 : m_pBody (handle.m_pBody)
83 handle.m_pBody =
nullptr;
99 SAL_CALL
set (reference_type * pBody)
103 reference_type *
const pOld = m_pBody;
117 return set( handle.m_pBody );
120 #ifdef LIBO_INTERNAL_ONLY 132 m_pBody = handle.m_pBody;
133 handle.m_pBody =
nullptr;
140 Reference<reference_type> &
157 reference_type *
const pOld = m_pBody;
169 reference_type * SAL_CALL
get()
const 179 assert(m_pBody != NULL);
188 assert(m_pBody != NULL);
195 bool SAL_CALL
is()
const 197 return (m_pBody != NULL);
200 #if defined LIBO_INTERNAL_ONLY 203 explicit operator bool()
const 211 bool SAL_CALL
operator== (
const reference_type * pBody)
const 213 return (m_pBody == pBody);
222 return (m_pBody == handle.m_pBody);
231 return (m_pBody != handle.m_pBody);
238 SAL_CALL operator< (const Reference<reference_type> & handle)
const 240 return (m_pBody < handle.m_pBody);
249 return (m_pBody > handle.m_pBody);
255 #if defined LIBO_INTERNAL_ONLY 269 {
return std::size_t(s.
get()); }
reference_type * operator->() const
Probably most common used: handle->someBodyOp().
Definition: ref.hxx:177
Reference(reference_type *pBody, __sal_NoAcquire)
Constructor...
Definition: ref.hxx:54
bool operator>(const Reference< reference_type > &handle) const
Needed to place References into STL collection.
Definition: ref.hxx:247
Reference()
Constructor...
Definition: ref.hxx:47
Reference< reference_type > & operator=(const Reference< reference_type > &handle)
Assignment.
Definition: ref.hxx:115
#define COVERITY_NOEXCEPT_FALSE
To markup destructors that coverity warns might throw exceptions which won't throw in practice...
Definition: types.h:355
bool operator==(const reference_type *pBody) const
Returns True if this points to pBody.
Definition: ref.hxx:211
reference_type & operator*() const
Allows (*handle).someBodyOp().
Definition: ref.hxx:186
bool operator!=(const Reference< reference_type > &handle) const
Needed to place References into STL collection.
Definition: ref.hxx:229
Reference< reference_type > & clear()
Unbind the body from this handle.
Definition: ref.hxx:153
__sal_NoAcquire
Definition: types.h:370
Template reference class for reference type.
Definition: ref.hxx:37
Definition: bootstrap.hxx:29
~Reference() COVERITY_NOEXCEPT_FALSE
Destructor...
Definition: ref.hxx:89
Reference(reference_type *pBody)
Constructor...
Definition: ref.hxx:61
Reference(const Reference< reference_type > &handle)
Copy constructor...
Definition: ref.hxx:70
bool is() const
Returns True if the handle does point to a valid body.
Definition: ref.hxx:195
reference_type * get() const
Get the body.
Definition: ref.hxx:169