13 T &operator*() { return *ptr; }
38 ePtr &operator=(ePtr<T> &c)
54 T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; }
55 T* &ptrref() { assert(!ptr); return ptr; }
56 T* operator->() const { assert(ptr); return ptr; }
57 operator T*() const { return this->ptr; }
64 class eMutablePtr: public ePtr<T>
66 /* read doc/iObject about the ePtrHelper */
72 inline ePtrHelper(T1 *obj): m_obj(obj)
80 inline T1* operator->() { return m_obj; }
85 eMutablePtr(): ePtr<T>(0)
89 eMutablePtr(T *c): ePtr<T>(c)
93 eMutablePtr(const eMutablePtr &c): ePtr<T>(c)
97 eMutablePtr &operator=(T *c)
99 ePtr<T>::operator=(c);
104 ePtrHelper<T> operator->() { assert(ptr); return ePtrHelper<T>(ptr); }
106 /* for const objects, we don't need the helper, as they can't */
107 /* be changed outside the program flow. at least this is */
108 /* what the compiler assumes, so in case you're using const */
109 /* eMutablePtrs note that they have to be const. */
110 const T* operator->() const { assert(ptr); return ptr; }