Lines Matching refs:fObj
79 SkAutoTCallVProc(T* obj): fObj(obj) {}
80 ~SkAutoTCallVProc() { if (fObj) P(fObj); }
82 operator T*() const { return fObj; }
83 T* operator->() const { SkASSERT(fObj); return fObj; }
85 T* detach() { T* obj = fObj; fObj = NULL; return obj; }
87 if (fObj != obj) {
88 if (fObj) {
89 P(fObj);
91 fObj = obj;
95 T* fObj;
108 SkAutoTCallIProc(T* obj): fObj(obj) {}
109 ~SkAutoTCallIProc() { if (fObj) P(fObj); }
111 operator T*() const { return fObj; }
112 T* operator->() const { SkASSERT(fObj); return fObj; }
114 T* detach() { T* obj = fObj; fObj = NULL; return obj; }
116 T* fObj;
131 SkAutoTDelete(T* obj = NULL) : fObj(obj) {}
132 ~SkAutoTDelete() { SkDELETE(fObj); }
134 T* get() const { return fObj; }
135 operator T*() const { return fObj; }
136 T& operator*() const { SkASSERT(fObj); return *fObj; }
137 T* operator->() const { SkASSERT(fObj); return fObj; }
140 if (fObj != obj) {
141 SkDELETE(fObj);
142 fObj = obj;
150 SkDELETE(fObj);
151 fObj = NULL;
160 T* obj = fObj;
161 fObj = NULL;
166 SkTSwap(fObj, that->fObj);
170 T* fObj;
176 SkAutoTDestroy(T* obj = NULL) : fObj(obj) {}
178 if (fObj) {
179 fObj->~T();
183 T* get() const { return fObj; }
184 T& operator*() const { SkASSERT(fObj); return *fObj; }
185 T* operator->() const { SkASSERT(fObj); return fObj; }
188 T* fObj;