|
itch-mold-replay 1.0
Time-accurate NASDAQ TotalView-ITCH 5.0 replay over MoldUDP64
|
RAII file descriptor wrapper. More...
#include <file_descriptor.h>
Public Member Functions | |
| FileDescriptor ()=default | |
| FileDescriptor (int fd) | |
| Wrap existing descriptor. | |
| FileDescriptor (const std::filesystem::path &path, int flags=O_RDONLY) | |
| Attempt to get descriptor via open() | |
| FileDescriptor (SyscallInvocable auto &&syscall) | |
| Constructor for passing any callable that returns a file descriptor. | |
| FileDescriptor (const FileDescriptor &)=delete | |
| FileDescriptor & | operator= (const FileDescriptor &)=delete |
| FileDescriptor (FileDescriptor &&other) noexcept | |
| FileDescriptor & | operator= (FileDescriptor &&other) noexcept |
| ~FileDescriptor () | |
| int | get () const noexcept |
RAII file descriptor wrapper.
|
default |
|
explicit |
Wrap existing descriptor.
| std::invalid_argument | if negative |
|
explicit |
Attempt to get descriptor via open()
| std::invalid_argument | if path or directory |
| std::system_error | if open() fails |
|
inlineexplicit |
Constructor for passing any callable that returns a file descriptor.
| std::system_error | if the callable returns a negative value. |
SyscallConcept
|
delete |
|
noexcept |
| imr::util::FileDescriptor::~FileDescriptor | ( | ) |
|
delete |
|
noexcept |
|
noexcept |