68 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ 69 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ 124 if (
next_ ==
this)
return true;
135 template <
typename T>
148 assert(&ptr !=
this);
172 T*
get()
const {
return value_; }
178 template <
typename U>
180 return value_ == ptr.
get();
182 template <
typename U>
184 return value_ != ptr.
get();
188 template <
typename U>
195 if (link_.
depart())
delete value_;
212 template<
typename T>
inline 214 return ptr == x.
get();
217 template<
typename T>
inline 219 return ptr != x.
get();
225 template <
typename T>
233 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ bool operator==(linked_ptr< U > const &ptr) const
Definition: gtest-linked_ptr.h:179
Definition: gtest-port.h:1410
Definition: gmock-actions.h:49
linked_ptr(linked_ptr< U > const &ptr)
Definition: gtest-linked_ptr.h:146
bool operator==(T *p) const
Definition: gtest-linked_ptr.h:176
linked_ptr(linked_ptr const &ptr)
Definition: gtest-linked_ptr.h:147
void copy(linked_ptr< U > const *ptr)
Definition: gtest-linked_ptr.h:203
bool operator==(T *ptr, const linked_ptr< T > &x)
Definition: gtest-linked_ptr.h:213
bool operator!=(T *p) const
Definition: gtest-linked_ptr.h:177
T * operator->() const
Definition: gtest-linked_ptr.h:173
#define GTEST_API_
Definition: gtest-port.h:662
void capture(T *ptr)
Definition: gtest-linked_ptr.h:198
void reset(T *ptr=NULL)
Definition: gtest-linked_ptr.h:168
linked_ptr_internal link_
Definition: gtest-linked_ptr.h:192
~linked_ptr()
Definition: gtest-linked_ptr.h:143
void depart()
Definition: gtest-linked_ptr.h:194
Definition: gtest-linked_ptr.h:136
bool operator!=(linked_ptr< U > const &ptr) const
Definition: gtest-linked_ptr.h:183
linked_ptr & operator=(linked_ptr< U > const &ptr)
Definition: gtest-linked_ptr.h:153
T * value_
Definition: gtest-linked_ptr.h:191
T * get() const
Definition: gtest-linked_ptr.h:172
linked_ptr_internal const * next_
Definition: gtest-linked_ptr.h:132
Definition: InputPrereqs.h:78
Definition: gtest-linked_ptr.h:89
linked_ptr< T > make_linked_ptr(T *ptr)
Definition: gtest-linked_ptr.h:226
linked_ptr(T *ptr=NULL)
Definition: gtest-linked_ptr.h:142
bool depart()
Definition: gtest-linked_ptr.h:121
void join(linked_ptr_internal const *ptr)
Definition: gtest-linked_ptr.h:109
void join_new()
Definition: gtest-linked_ptr.h:92
bool operator!=(T *ptr, const linked_ptr< T > &x)
Definition: gtest-linked_ptr.h:218
T & operator*() const
Definition: gtest-linked_ptr.h:174
linked_ptr & operator=(linked_ptr const &ptr)
Definition: gtest-linked_ptr.h:159
T element_type
Definition: gtest-linked_ptr.h:138
GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex)