Lines Matching defs:scoped_refptr
31 // scoped_refptr<MyFoo> foo = new MyFoo();
37 // scoped_refptr<MyFoo> foo = new MyFoo();
45 // The above examples show how scoped_refptr<T> acts like a pointer to T.
46 // Given two scoped_refptr<T> classes, it is also possible to exchange
50 // scoped_refptr<MyFoo> a = new MyFoo();
51 // scoped_refptr<MyFoo> b;
61 // scoped_refptr<MyFoo> a = new MyFoo();
62 // scoped_refptr<MyFoo> b;
69 class scoped_refptr {
71 scoped_refptr() : ptr_(NULL) {
74 scoped_refptr(T* p) : ptr_(p) {
79 scoped_refptr(const scoped_refptr<T>& r) : ptr_(r.ptr_) {
85 scoped_refptr(const scoped_refptr<U>& r) : ptr_(r.get()) {
90 ~scoped_refptr() {
110 scoped_refptr<T>& operator=(T* p) {
120 scoped_refptr<T>& operator=(const scoped_refptr<T>& r) {
125 scoped_refptr<T>& operator=(const scoped_refptr<U>& r) {
135 void swap(scoped_refptr<T>& r) {