HandleGuard< T > Class Template Reference

#include <PKIFCNGUtils.h>

Inheritance diagram for HandleGuard< T >:

Inheritance graph
[legend]
Collaboration diagram for HandleGuard< T >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T>
class HandleGuard< T >

a base class for scoped opaque CAPI handles

TSP-enforcing: No

Definition at line 175 of file PKIFCNGUtils.h.


Public Member Functions

 HandleGuard (T ptr=0)
virtual ~HandleGuard ()
virtual void clear ()=0
get () const
operator-> () const
 operator const T () const
 operator T ()
T * operator & () const
assign (T ptr)
void reset (T ptr)
release ()

Protected Attributes

m_ptr

Constructor & Destructor Documentation

template<typename T>
HandleGuard< T >::HandleGuard ( ptr = 0  )  [inline, explicit]

Interface: Subsystem

Explicit constructor

Returns:
None

Definition at line 185 of file PKIFCNGUtils.h.

template<typename T>
virtual HandleGuard< T >::~HandleGuard (  )  [inline, virtual]

Interface: Subsystem

Destructor

Returns:
None

Definition at line 196 of file PKIFCNGUtils.h.


Member Function Documentation

template<typename T>
virtual void HandleGuard< T >::clear (  )  [pure virtual]

template<typename T>
T HandleGuard< T >::get (  )  const [inline]

Definition at line 202 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

template<typename T>
T HandleGuard< T >::operator-> (  )  const [inline]

Definition at line 207 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

template<typename T>
HandleGuard< T >::operator const T (  )  const [inline]

Interface: Subsystem

Allow the smart pointers to be passed as arguments where const T & is required

Returns:
None

Definition at line 219 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

template<typename T>
HandleGuard< T >::operator T (  )  [inline]

Definition at line 224 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

template<typename T>
T* HandleGuard< T >::operator & (  )  const [inline]

Definition at line 229 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

template<typename T>
T HandleGuard< T >::assign ( ptr  )  [inline]

Interface: Subsystem

Replace the underlying pointer without cleaning it up. the old pointer is returned and the caller is responsible for cleaning

Returns:
None

Definition at line 242 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.

Referenced by HandleGuard< T >::reset().

template<typename T>
void HandleGuard< T >::reset ( ptr  )  [inline]

Interface: Subsystem

Clean and replace the underlying pointer

Returns:
None

Definition at line 256 of file PKIFCNGUtils.h.

References HandleGuard< T >::assign(), and HandleGuard< T >::clear().

template<typename T>
T HandleGuard< T >::release (  )  [inline]

Interface: Subsystem

Break the association with the underlying pointer. the caller is responsible for freeing it after this

Returns:
None

Definition at line 270 of file PKIFCNGUtils.h.

References HandleGuard< T >::m_ptr.


Member Data Documentation

template<typename T>
T HandleGuard< T >::m_ptr [protected]


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

Generated on Mon Nov 15 11:20:52 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6