Lines Matching defs:const

63     // reference count a const pointer.  This really is OK because
64 // const is about logical constness of the object not really about
72 RefCounted(const RefCounted &);
73 RefCounted &operator=(const RefCounted &);
97 void incref() const { ++count; }
101 void decref() const { if (--count <= 0) delete this; }
111 * @attention Do not use "const FooPtr"
112 * To create a reference counting pointer to a const object, use this:
114 * typedef RefCountingPtr<const Foo> ConstFooPtr;
126 /** Convenience aliases for const/non-const versions of T w/ friendship. */
193 RefCountingPtr(const RefCountingPtr &r) { copy(r.data); }
205 RefCountingPtr(const NonConstT &r) { copy(r.data); }
210 // The following pointer access functions are const because they
212 // what is pointed to. This is analagous to a "Foo * const".
215 T *operator->() const { return data; }
218 T &operator*() const { return *data; }
221 T *get() const { return data; }
226 return RefCountingPtr<const T>(*this);
230 const RefCountingPtr &operator=(T *p) { set(p); return *this; }
233 const RefCountingPtr &operator=(const RefCountingPtr &r)
237 const RefCountingPtr &operator=(RefCountingPtr&& r)
249 bool operator!() const { return data == 0; }
252 operator bool() const { return data != 0; }
257 inline bool operator==(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
263 inline bool operator==(const RefCountingPtr<T> &l, const T *r)
269 inline bool operator==(const T *l, const RefCountingPtr<T> &r)
274 inline bool operator!=(const RefCountingPtr<T> &l, const RefCountingPtr<T> &r)
280 inline bool operator!=(const RefCountingPtr<T> &l, const T *r)
286 inline bool operator!=(const T *l, const RefCountingPtr<T> &r)