20 #ifndef INCLUDED_RTL_REF_HXX 21 #define INCLUDED_RTL_REF_HXX 34 template <
class reference_type>
39 reference_type * m_pBody;
69 : m_pBody (handle.m_pBody)
75 #ifdef LIBO_INTERNAL_ONLY 79 : m_pBody (handle.m_pBody)
81 handle.m_pBody =
nullptr;
97 SAL_CALL
set (reference_type * pBody)
101 reference_type *
const pOld = m_pBody;
115 return set( handle.m_pBody );
118 #ifdef LIBO_INTERNAL_ONLY 130 m_pBody = handle.m_pBody;
131 handle.m_pBody =
nullptr;
155 reference_type *
const pOld = m_pBody;
167 reference_type * SAL_CALL
get()
const 177 assert(m_pBody != NULL);
186 assert(m_pBody != NULL);
193 bool SAL_CALL
is()
const 195 return (m_pBody != NULL);
198 #if defined LIBO_INTERNAL_ONLY 201 explicit operator bool()
const 209 bool SAL_CALL
operator== (
const reference_type * pBody)
const 211 return (m_pBody == pBody);
220 return (m_pBody == handle.m_pBody);
229 return (m_pBody != handle.m_pBody);
236 SAL_CALL operator< (const Reference<reference_type> & handle)
const 238 return (m_pBody < handle.m_pBody);
247 return (m_pBody > handle.m_pBody);
Reference(reference_type *pBody, __sal_NoAcquire)
Constructor...
Definition: ref.hxx:52
Reference()
Constructor...
Definition: ref.hxx:45
Template reference class for reference type.
Definition: ref.hxx:35
#define COVERITY_NOEXCEPT_FALSE
To markup destructors that coverity warns might throw exceptions which won't throw in practice...
Definition: types.h:361
reference_type & operator*() const
Allows (*handle).someBodyOp().
Definition: ref.hxx:184
bool operator==(const reference_type *pBody) const
Returns True if this points to pBody.
Definition: ref.hxx:209
reference_type * operator->() const
Probably most common used: handle->someBodyOp().
Definition: ref.hxx:175
bool operator!=(const Reference< reference_type > &handle) const
Needed to place References into STL collection.
Definition: ref.hxx:227
bool operator>(const Reference< reference_type > &handle) const
Needed to place References into STL collection.
Definition: ref.hxx:245
Reference< reference_type > & operator=(const Reference< reference_type > &handle)
Assignment.
Definition: ref.hxx:113
__sal_NoAcquire
Definition: types.h:376
Definition: bootstrap.hxx:29
Reference(reference_type *pBody)
Constructor...
Definition: ref.hxx:59
~Reference() COVERITY_NOEXCEPT_FALSE
Destructor...
Definition: ref.hxx:87
Reference< reference_type > & clear()
Unbind the body from this handle.
Definition: ref.hxx:151
Reference(const Reference< reference_type > &handle)
Copy constructor...
Definition: ref.hxx:68
bool is() const
Returns True if the handle does point to a valid body.
Definition: ref.hxx:193