Home | History | Annotate | Download | only in stubs

Lines Matching defs:scoped_ptr

40 // from google3/base/scoped_ptr.h
45 // implementation of the scoped_ptr class, and its closely-related brethren,
48 template <class C> class scoped_ptr;
51 // A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T>
53 // That is, scoped_ptr<T> owns the T object that it points to.
54 // Like a T*, a scoped_ptr<T> may hold either NULL or a pointer to a T object.
56 // The size of a scoped_ptr is small:
57 // sizeof(scoped_ptr<C>) == sizeof(C*)
59 class scoped_ptr {
66 // There is no way to create an uninitialized scoped_ptr.
68 explicit scoped_ptr(C* p = NULL) : ptr_(p) { }
72 ~scoped_ptr() {
101 // These return whether two scoped_ptr refer to the same object, not just to
107 void swap(scoped_ptr& p2) {
127 // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't
130 template <class C2> bool operator==(scoped_ptr<C2> const& p2) const;
131 template <class C2> bool operator!=(scoped_ptr<C2> const& p2) const;
134 scoped_ptr(const scoped_ptr&);
135 void operator=(const scoped_ptr&);
138 // scoped_array<C> is like scoped_ptr<C>, except that the caller must allocate
141 // As with scoped_ptr<C>, a scoped_array<C> either points to an object
229 using internal::scoped_ptr;