Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AxPipe::Auto_Seg< T > Class Template Reference

std::auto_ptr like functionality with CSeg pointers. More...

#include <CSeg.h>

Collaboration diagram for AxPipe::Auto_Seg< T >:

Collaboration graph
List of all members.

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.

Detailed Description

template<class T>
class AxPipe::Auto_Seg< T >

std::auto_ptr like functionality with CSeg pointers.

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.

The documentation for this class was generated from the following file:
Generated on Mon Feb 2 13:19:21 2004 for AxPipe by doxygen 1.3.5