AFIO  v2.00 late alpha
afio_v2_xxx::native_handle_type Struct Reference

A native handle type used for wrapping file descriptors, process ids or HANDLEs. Unmanaged, wrap in a handle object to manage. More...

#include "native_handle_type.hpp"

Classes

struct  disposition_base
 The type of handle. More...
 

Public Types

using disposition = quickcpplib::_xxx ::bitfield::bitfield< disposition_base >
 

Public Member Functions

constexpr native_handle_type () noexcept
 Constructs a default instance.
 
constexpr native_handle_type (disposition _behaviour, int _fd) noexcept
 Construct from a POSIX file descriptor.
 
constexpr native_handle_type (disposition _behaviour, win::handle _h) noexcept
 Construct from a Windows HANDLE.
 
constexpr native_handle_type (const native_handle_type &)=default
 Copy construct.
 
constexpr native_handle_type (native_handle_type &&o) noexcept
 Move construct.
 
constexpr native_handle_typeoperator= (const native_handle_type &)=default
 Copy assign.
 
constexpr native_handle_typeoperator= (native_handle_type &&o) noexcept
 Move assign.
 
void swap (native_handle_type &o) noexcept
 Swaps with another instance.
 
constexpr operator bool () const noexcept
 True if valid.
 
constexpr bool operator! () const noexcept
 True if invalid.
 
constexpr bool is_valid () const noexcept
 True if the handle is valid.
 
constexpr bool is_readable () const noexcept
 True if the handle is readable.
 
constexpr bool is_writable () const noexcept
 True if the handle is writable.
 
constexpr bool is_append_only () const noexcept
 True if the handle is append only.
 
constexpr bool is_overlapped () const noexcept
 True if overlapped.
 
constexpr bool is_seekable () const noexcept
 True if seekable.
 
constexpr bool requires_aligned_io () const noexcept
 True if requires aligned i/o.
 
constexpr bool is_regular () const noexcept
 True if a regular file or device.
 
constexpr bool is_directory () const noexcept
 True if a directory.
 
constexpr bool is_symlink () const noexcept
 True if a symlink.
 
constexpr bool is_multiplexer () const noexcept
 True if a multiplexer like BSD kqueues, Linux epoll or Windows IOCP.
 
constexpr bool is_process () const noexcept
 True if a process.
 
constexpr bool is_section () const noexcept
 True if a memory section.
 

Public Attributes

disposition behaviour
 
union {
   intptr_t   _init {-1}
 
   int   fd
 A POSIX file descriptor.
 
   int   pid
 A POSIX process identifier.
 
   win::handle   h
 A Windows HANDLE.
 
}; 
 The behaviour of the handle.
 

Detailed Description

A native handle type used for wrapping file descriptors, process ids or HANDLEs. Unmanaged, wrap in a handle object to manage.


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