Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
comet::auto_handle_wrap_t< C_, H, INVALID_HANDLE_, ERROR_POLICY > Class Template Reference
[Com type wrappers., Com type wrappers.]
#include <comet/handle.h>
Inheritance diagram for comet::auto_handle_wrap_t< C_, H, INVALID_HANDLE_, ERROR_POLICY >:


Public Types | |
| typedef const C_ & | ref |
| A reference to a handle. | |
Public Member Functions | |
| auto_handle_wrap_t () throw () | |
| default constructor. | |
| auto_handle_wrap_t (const impl::auto_attach_t< typename policy_base::value_type > &handle) throw () | |
| auto_handle_wrap_t (auto_handle_wrap_t &rhs) throw () | |
| auto_handle_wrap_t (policy_base &rhs) throw () | |
| ~auto_handle_wrap_t () throw () | |
| template<typename EP> auto_handle_wrap_t< C_, H, INVALID_HANDLE_, EP > & | operator= (auto_handle_wrap_t< C_, H, INVALID_HANDLE_, EP > &rhs) throw () |
| Assignment from similar handles. | |
| C_ & | operator= (const impl::auto_attach_t< value_type > &handle) |
| Assign by auto_attach. | |
| bool | close () throw () |
| Closes the currently held handle (if any). | |
Accessor methods | |
| policy_base::value_type * | out () throw () |
| Fitter method. | |
| policy_base::value_type | get () const throw () |
| policy_base::value_type | in () const throw () |
| policy_base::value_type * | inout () throw () |
Static Public Member Functions | |
| const C_ & | create_const_reference (const value_type &val) |
| C_ & | create_reference (value_type &val) |
| bool | destroy_reference (value_type H) |
| Destroy a reference. | |
Protected Types | |
|
typedef handle_policy_base_t< H, INVALID_HANDLE_ > | policy_base |
Protected Member Functions | |
| void | set_handle (value_type h) throw () |
Static Protected Member Functions | |
| bool | destroy_ (value_type h) |
| Call destroy_handle. | |
| bool | destroy_handle (value_type h) |
| Destroy the handle passed in. | |
| bool | expect_nonzero (BOOL value) |
Detailed Description
template<typename C_, typename H, long INVALID_HANDLE_, typename ERROR_POLICY>
class comet::auto_handle_wrap_t< C_, H, INVALID_HANDLE_, ERROR_POLICY >
Wrapper for a Win32 API/GDI HANDLE. Behaves similarly to an auto_ptr in that it implements single-reference, reference counting, with reference-transferring assignment and copy-construction.
Constructor & Destructor Documentation
|
||||||||||
|
Assign by auto_attach. |
|
||||||||||
|
Non-const copy constructor - takes control of the reference.
|
|
||||||||||
|
Non-const copy constructor - takes control of the reference.
|
|
|||||||||
|
Destructor - closes the handle. |
Member Function Documentation
|
||||||||||
|
Destroy the handle passed in. Must be implemented by the parent class. |
|
||||||||||||||
|
Assignment from similar handles. Typically, there might be a different error policy. |
|
|||||||||
|
Fitter method. Used when calling a function that take a HANDLE* argument.
auto_handle read_pipe, write_pipe; CreatePipe(read_pipe.out(), write_pipe.out(), 0, 0)); |
The documentation for this class was generated from the following file: