All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions
asio::windows::basic_handle< HandleService > Class Template Reference

Provides Windows handle functionality. More...

#include <basic_handle.hpp>

Inheritance diagram for asio::windows::basic_handle< HandleService >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef basic_handle
< HandleService > 
lowest_layer_type
 A basic_handle is always the lowest layer.
typedef HandleService::native_type native_type
 The native representation of a handle.

Public Member Functions

void assign (const native_type &native_handle)
 Assign an existing native handle to the handle.
asio::error_code assign (const native_type &native_handle, asio::error_code &ec)
 Assign an existing native handle to the handle.
 basic_handle (asio::io_service &io_service)
 Construct a basic_handle without opening it.
 basic_handle (asio::io_service &io_service, const native_type &native_handle)
 Construct a basic_handle on an existing native handle.
void cancel ()
 Cancel all asynchronous operations associated with the handle.
asio::error_code cancel (asio::error_code &ec)
 Cancel all asynchronous operations associated with the handle.
void close ()
 Close the handle.
asio::error_code close (asio::error_code &ec)
 Close the handle.
bool is_open () const
 Determine whether the handle is open.
lowest_layer_typelowest_layer ()
 Get a reference to the lowest layer.
native_type native ()
 Get the native handle representation.

Protected Member Functions

 ~basic_handle ()
 Protected destructor to prevent deletion through this type.

Detailed Description

template<typename HandleService>
class asio::windows::basic_handle< HandleService >

Provides Windows handle functionality.

The windows::basic_handle class template provides the ability to wrap a Windows handle.

Thread Safety
Distinct objects: Safe.
Shared objects: Unsafe.

Definition at line 41 of file basic_handle.hpp.


Member Typedef Documentation

template<typename HandleService >
typedef basic_handle<HandleService> asio::windows::basic_handle< HandleService >::lowest_layer_type

A basic_handle is always the lowest layer.

Definition at line 49 of file basic_handle.hpp.

template<typename HandleService >
typedef HandleService::native_type asio::windows::basic_handle< HandleService >::native_type

The native representation of a handle.

Definition at line 46 of file basic_handle.hpp.


Constructor & Destructor Documentation

template<typename HandleService >
asio::windows::basic_handle< HandleService >::basic_handle ( asio::io_service io_service) [inline, explicit]

Construct a basic_handle without opening it.

This constructor creates a handle without opening it.

Parameters:
io_serviceThe io_service object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.

Definition at line 58 of file basic_handle.hpp.

template<typename HandleService >
asio::windows::basic_handle< HandleService >::basic_handle ( asio::io_service io_service,
const native_type native_handle 
) [inline]

Construct a basic_handle on an existing native handle.

This constructor creates a handle object to hold an existing native handle.

Parameters:
io_serviceThe io_service object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.
native_handleA native handle.
Exceptions:
asio::system_errorThrown on failure.

Definition at line 74 of file basic_handle.hpp.

template<typename HandleService >
asio::windows::basic_handle< HandleService >::~basic_handle ( ) [inline, protected]

Protected destructor to prevent deletion through this type.

Definition at line 201 of file basic_handle.hpp.


Member Function Documentation

template<typename HandleService >
void asio::windows::basic_handle< HandleService >::assign ( const native_type native_handle) [inline]

Assign an existing native handle to the handle.

Definition at line 105 of file basic_handle.hpp.

template<typename HandleService >
asio::error_code asio::windows::basic_handle< HandleService >::assign ( const native_type native_handle,
asio::error_code ec 
) [inline]

Assign an existing native handle to the handle.

Definition at line 120 of file basic_handle.hpp.

template<typename HandleService >
void asio::windows::basic_handle< HandleService >::cancel ( ) [inline]

Cancel all asynchronous operations associated with the handle.

This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the asio::error::operation_aborted error.

Exceptions:
asio::system_errorThrown on failure.

Definition at line 179 of file basic_handle.hpp.

template<typename HandleService >
asio::error_code asio::windows::basic_handle< HandleService >::cancel ( asio::error_code ec) [inline]

Cancel all asynchronous operations associated with the handle.

This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the asio::error::operation_aborted error.

Parameters:
ecSet to indicate what error occurred, if any.

Definition at line 194 of file basic_handle.hpp.

template<typename HandleService >
void asio::windows::basic_handle< HandleService >::close ( ) [inline]

Close the handle.

This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the asio::error::operation_aborted error.

Exceptions:
asio::system_errorThrown on failure.

Definition at line 140 of file basic_handle.hpp.

template<typename HandleService >
asio::error_code asio::windows::basic_handle< HandleService >::close ( asio::error_code ec) [inline]

Close the handle.

This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the asio::error::operation_aborted error.

Parameters:
ecSet to indicate what error occurred, if any.

Definition at line 155 of file basic_handle.hpp.

template<typename HandleService >
bool asio::windows::basic_handle< HandleService >::is_open ( ) const [inline]

Determine whether the handle is open.

Definition at line 127 of file basic_handle.hpp.

template<typename HandleService >
lowest_layer_type& asio::windows::basic_handle< HandleService >::lowest_layer ( ) [inline]

Get a reference to the lowest layer.

This function returns a reference to the lowest layer in a stack of layers. Since a basic_handle cannot contain any further layers, it simply returns a reference to itself.

Returns:
A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.

Definition at line 92 of file basic_handle.hpp.

template<typename HandleService >
native_type asio::windows::basic_handle< HandleService >::native ( ) [inline]

Get the native handle representation.

This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.

Definition at line 166 of file basic_handle.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:41