|
paludis Version 3.0.2
The one true package mangler
|
#include <safe_ofstream.hh>
Public Member Functions | |
| void | write_buffered () |
Public Attributes | |
| int | fd |
| Our file descriptor. | |
Protected Member Functions | |
| int_type | overflow (int_type c) override |
| std::streamsize | xsputn (const char *s, std::streamsize num) override |
Basic operations | |
| SafeOFStreamBuf (const int f, const bool buffer) | |
Output stream buffer class that can be opened via an FD, and that doesn't do retarded things when given a non-file.
See TCppSL Ch. 13.13 for what we're doing here. The buffer code is based upon the "io/outbuf2.hpp" example in section 13.13.3.