• Home
  • Raw
  • Download

Lines Matching refs:m_ptr

65     ref() : m_ptr(nullptr) { print_default_created(this); track_default_created((ref_tag*) this); }  in ref()
68 ref(T *ptr) : m_ptr(ptr) { in ref()
69 if (m_ptr) ((Object *) m_ptr)->incRef(); in ref()
71 print_created(this, "from pointer", m_ptr); track_created((ref_tag*) this, "from pointer"); in ref()
76 ref(const ref &r) : m_ptr(r.m_ptr) { in ref()
77 if (m_ptr) in ref()
78 ((Object *) m_ptr)->incRef(); in ref()
80 print_copy_created(this, "with pointer", m_ptr); track_copy_created((ref_tag*) this); in ref()
84 ref(ref &&r) : m_ptr(r.m_ptr) { in ref()
85 r.m_ptr = nullptr; in ref()
87 print_move_created(this, "with pointer", m_ptr); track_move_created((ref_tag*) this); in ref()
92 if (m_ptr) in ~ref()
93 ((Object *) m_ptr)->decRef(); in ~ref()
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; } in get_ptr()
170 const T* get_ptr() const { return m_ptr; } in get_ptr()
172 T *m_ptr;