81 static const size_t buff_sz = 512;
93 std::array < char_type, buff_sz > buff;
110 int_type
pbackfail ( int_type )
override;
130 int_type
overflow ( int_type )
override;
140 int sync ( )
override;
A class determining the used file descriptor from prefered (if available) and fallback file descripto...
Definition: fdstream.hpp:176
int get_fd() const
Getter of the chosen file descriptor, either the prefered, or fallback one.
Definition: fdstream.cpp:97
bool is_redirected() const
Getter of the redirected flag informing whether prefered or fallback file descriptor is used.
Definition: fdstream.cpp:101
fdaccessor(int, int)
Constrcutor of the class determining the resulting used descriptor.
Definition: fdstream.cpp:84
Class representing buffered stream designed to work on defined file descriptor instead of usual file ...
Definition: fdstream.hpp:76
int_type pbackfail(int_type) override
Put character back in the case of backup underflow.
Definition: fdstream.cpp:62
fdstreambuf(const fdstreambuf &)=delete
Do not allow to copy construct the fdsreambuf.
int_type underflow() override
Get character on underflow.
Definition: fdstream.cpp:39
int sync() override
Synchronize stream buffer.
Definition: fdstream.cpp:80
~fdstreambuf() override
The destructor of the fdstreambuf.
Definition: fdstream.cpp:25
fdstreambuf(int fileDescriptor)
Constructor of the fdstreambuf.
Definition: fdstream.cpp:20
int_type overflow(int_type) override
Put character on overflow.
Definition: fdstream.cpp:68
fdstreambuf & operator=(const fdstreambuf &)=delete
Do not allow to copy assign the fdsreambuf.
A class implementing an input stream interface, with destination specified by file descriptor.
Definition: fdstream.hpp:259
bool is_redirected() const
Getter of the redirected flag informing whether prefered or fallback file descriptor is used.
Definition: fdstream.cpp:123
~ifdstream() override
A desctructor of the input file descriptor.
ifdstream(int, int=FAIL_FD)
A constructor of the input file descriptor stream with specified prefered and fallback file descripto...
Definition: fdstream.cpp:116
A class implementing an output stream interface, with destination specified by file descriptor.
Definition: fdstream.hpp:217
~ofdstream() override
A desctructor of the output file descriptor.
ofdstream(int fd, int fallback_fd=FAIL_FD)
A constructor of the output file descriptor stream with specified prefered and fallback file descript...
Definition: fdstream.cpp:105
bool is_redirected() const
Getter of the redirected flag informing whether prefered or fallback file descriptor is used.
Definition: fdstream.cpp:112
Definition: sigHandler.cpp:20
const int CLOG_FD
The number of logging stream descriptor. Expected to be 4.
Definition: fdstream.cpp:16
const int FAIL_FD
The number of descriptor when binding to the predefined one fails.
Definition: fdstream.cpp:18
const int CMEASURE_FD
The number of measurement stream descriptor. Expected to be 5.
Definition: fdstream.cpp:13
const int CERR_FD
The number of standard error stream descriptor. Expected to be 2.
Definition: fdstream.cpp:10