Lines Matching defs:m_ptr

65     ref() : m_ptr(nullptr) { print_default_created(this); track_default_created((ref_tag*) this); }
68 ref(T *ptr) : m_ptr(ptr) {
69 if (m_ptr) ((Object *) m_ptr)->incRef();
71 print_created(this, "from pointer", m_ptr); track_created((ref_tag*) this, "from pointer");
76 ref(const ref &r) : m_ptr(r.m_ptr) {
77 if (m_ptr)
78 ((Object *) m_ptr)->incRef();
80 print_copy_created(this, "with pointer", m_ptr); track_copy_created((ref_tag*) this);
84 ref(ref &&r) : m_ptr(r.m_ptr) {
85 r.m_ptr = nullptr;
87 print_move_created(this, "with pointer", m_ptr); track_move_created((ref_tag*) this);
92 if (m_ptr)
93 ((Object *) m_ptr)->decRef();
100 print_move_assigned(this, "pointer", r.m_ptr); track_move_assigned((ref_tag*) this);
104 if (m_ptr)
105 ((Object *) m_ptr)->decRef();
106 m_ptr = r.m_ptr;
107 r.m_ptr = nullptr;
113 print_copy_assigned(this, "pointer", r.m_ptr); track_copy_assigned((ref_tag*) this);
115 if (m_ptr == r.m_ptr)
117 if (m_ptr)
118 ((Object *) m_ptr)->decRef();
119 m_ptr = r.m_ptr;
120 if (m_ptr)
121 ((Object *) m_ptr)->incRef();
129 if (m_ptr == ptr)
131 if (m_ptr)
132 ((Object *) m_ptr)->decRef();
133 m_ptr = ptr;
134 if (m_ptr)
135 ((Object *) m_ptr)->incRef();
140 bool operator==(const ref &r) const { return m_ptr == r.m_ptr; }
143 bool operator!=(const ref &r) const { return m_ptr != r.m_ptr; }
146 bool operator==(const T* ptr) const { return m_ptr == ptr; }
149 bool operator!=(const T* ptr) const { return m_ptr != ptr; }
152 T* operator->() { return m_ptr; }
155 const T* operator->() const { return m_ptr; }
158 T& operator*() { return *m_ptr; }
161 const T& operator*() const { return *m_ptr; }
164 operator T* () { return m_ptr; }
167 T* get_ptr() { return m_ptr; }
170 const T* get_ptr() const { return m_ptr; }
172 T *m_ptr;