|
LibSWOC++ 1.5.14
Solid Wall of C++
|
Scoped container for a file descriptor. More...
#include <swoc_file.h>

Public Types | |
| using | self_type = unique_fd |
| Self reference type. | |
Public Member Functions | |
| unique_fd (int fd) | |
| unique_fd (self_type const &)=delete | |
| Non-copyable. | |
| unique_fd (self_type &&that) | |
| ~unique_fd () | |
| Close the file dscriptor. | |
| int | release () |
| operator int () const | |
| Implicitly convert to file descriptor. | |
Protected Attributes | |
| int | _fd = NO_FD |
Scoped container for a file descriptor.
Definition at line 43 of file swoc_file.h.
Self reference type.
Definition at line 44 of file swoc_file.h.
|
inlineexplicit |
Construct with file descriptor.
| fd | File descriptor. |
The instance takes owernship of the file descriptor.
Definition at line 52 of file swoc_file.h.
|
inline |
Move construction.
| that | Source instance. |
Ownership is from from @Wa that to this.
Definition at line 63 of file swoc_file.h.
|
inline |
Close the file dscriptor.
Definition at line 66 of file swoc_file.h.
|
inline |
Implicitly convert to file descriptor.
Definition at line 85 of file swoc_file.h.
|
inline |
Release ownership of the file descriptor.
Definition at line 78 of file swoc_file.h.
|
protected |
Definition at line 88 of file swoc_file.h.