#include <CSeg.h>
Collaboration diagram for AxPipe::Auto_Seg< T >:
Public Member Functions | |
Auto_Seg (T *p=NULL) | |
Construct with a given CSeg-derived pointer, or NULL if none given. | |
~Auto_Seg () | |
Basically just CSeg::Release(). | |
Auto_Seg< T > & | operator= (T *p) |
Assign a new CSeg-derived pointer, CSeg::Release() the current, if any. | |
Auto_Seg< T > & | operator= (T &rhs) |
Assign a pointer to a CSeg object, CSeg::AddRef() the source first. | |
Auto_Seg< T > & | operator= (Auto_Seg< T > &rhs) |
Assign a Auto_Seg-derived reference. | |
operator T * () | |
Get the CSeg-derived pointer. | |
T * | operator-> () |
Reference the CSeg-derived pointer as a pointer. | |
T * | get () |
Get the referenced CSeg-derived pointer. | |
T * | release () |
Get the reference CSeg-derived pointer, and then clear the reference here. | |
Private Member Functions | |
void | Release () |
Call CSeg::Release() if the pointer is valid. | |
Private Attributes | |
T * | m_p |
The pointer to the CSeg-derived object. |
If you really want auto_ptr-functionality with our reference counted CSeg's, use this class like you would auto_ptr, with some limitations. You can't use auto_ptr, as the proper way to dispose of a CSeg * is not to delete it, but to CSeg::Release() it.
T | A CSeg-based class. |
Definition at line 131 of file CSeg.h.