Go to the documentation of this file.
39 #ifndef BLOCXX_REFERENCE_HPP_
40 #define BLOCXX_REFERENCE_HPP_
41 #include "blocxx/BLOCXX_config.h"
52 #if !defined(__GNUC__) || __GNUC__ > 2 // because of a gcc 2.95 ICE
70 Reference<T>&
operator= (
const Reference<T>& arg);
72 void swap(Reference<T>& arg);
84 #if !defined(__GNUC__) || __GNUC__ > 2 // causes gcc 2.95 to ICE
86 template <
class U>
friend class Reference;
101 : ReferenceBase(), m_pObj(ptr)
107 : ReferenceBase(arg), m_pObj(arg.m_pObj)
114 : ReferenceBase(arg),
130 typedef char type_must_be_complete[
sizeof(T)];
161 #ifdef BLOCXX_CHECK_NULL_REFERENCES
162 ReferenceHelpers::checkNull(
this);
163 ReferenceHelpers::checkNull(m_pObj);
172 #ifdef BLOCXX_CHECK_NULL_REFERENCES
173 ReferenceHelpers::checkNull(
this);
174 ReferenceHelpers::checkNull(m_pObj);
189 return (m_pObj == 0);
198 rval.m_pObj =
dynamic_cast<U*
>(m_pObj);
201 rval.useRefCountOf(*
this);
215 template <
class T,
class U>
218 return a.getPtr() == b.getPtr();
221 template <
class T,
class U>
224 return a.getPtr() != b.getPtr();
227 #if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
232 return a.getPtr() != b.getPtr();
235 template <
class T,
class U>
237 inline bool operator<(
const Reference<T>& a,
const Reference<U>& b)
239 return a.getPtr() < b.getPtr();
244 #endif // BLOCXX_REFERENCE_HPP_
bool operator<(const Array< T > &x, const Array< T > &y)
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
void swap(ReferenceBase &arg)
void useRefCountOf(const ReferenceBase &arg)
bool isNull() const BLOCXX_DEPRECATED
Reference< U > cast_to() const
void swap(Reference< T > &arg)
bool operator==(const Array< T > &x, const Array< T > &y)
void useRefCountOf(const Reference< U > &)
Reference< T > & operator=(const Reference< T > &arg)