Logo Search packages:      
Sourcecode: znc version File versions

CSafePtr< T > Class Template Reference

#include <Utils.h>

Inheritance diagram for CSafePtr< T >:


List of all members.

Detailed Description

template<typename T>
class CSafePtr< T >

This class is intended to be created on the stack and hold a pointer which will be deleted upon destruction. It is useful for functions where you need an allocated pointer and have many return paths. It prevents copying to get around the exclusive ownership situation which makes std::auto_ptr invalidate the first pointer on copy. This is intended to be used in simplistic situations such as local variables.

prozac <prozac@rottenboy.com>

Definition at line 431 of file Utils.h.

Public Member Functions

 CSafePtr (T *p)
T & operator* () const
T * operator-> () const

Private Member Functions

 operator T () const

Private Attributes

T * m_pType

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index