The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CSmartHandle Class Reference
[Smart Pointer]

Collaboration diagram for CSmartHandle:

List of all members.


Detailed Description

A smart pointer to a HANDLE. Calls CloseServiceHandle() on any SC_HANDLE that the it owns when the CSmartHandle goes out of scope to in scope based designs.


Public Member Functions

 CSmartHandle ()
 Construct a CSmartHandle that doesn't, currently, own a HANDLE.
 CSmartHandle (SC_HANDLE handle)
 Construct a CSmartHandle that takes ownership of the supplied HANDLE.
 ~CSmartHandle ()
CSmartHandleoperator= (SC_HANDLE handle)
SC_HANDLE Get () const
 Access the handle.
void Attach (SC_HANDLE handle)
 Take ownership of the supplied HANDLE.
SC_HANDLE Detach ()
 No longer manage ownership of the HANDLE and return it.
void Close ()
 Close any handle that is managed by this CSmartHandle.
bool IsValid () const
 Returns true if the CSmartHandle currently has ownership of a HANDLE.


Constructor & Destructor Documentation

CSmartHandle (  ) 

Construct a CSmartHandle that doesn't, currently, own a HANDLE.

CSmartHandle ( SC_HANDLE  handle  )  [explicit]

Construct a CSmartHandle that takes ownership of the supplied HANDLE.

~CSmartHandle (  ) 


Member Function Documentation

CSmartHandle & operator= ( SC_HANDLE  handle  ) 

SC_HANDLE Get (  )  const

Access the handle.

void Attach ( SC_HANDLE  handle  ) 

Take ownership of the supplied HANDLE.

SC_HANDLE Detach (  ) 

No longer manage ownership of the HANDLE and return it.

void Close (  ) 

Close any handle that is managed by this CSmartHandle.

bool IsValid (  )  const

Returns true if the CSmartHandle currently has ownership of a HANDLE.


Generated on Sun Sep 12 19:10:00 2021 for The Server Framework - v7.4 by doxygen 1.5.3