20#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SAFE_OFSTREAM_HH
21#define PALUDIS_GUARD_PALUDIS_UTIL_SAFE_OFSTREAM_HH 1
25#include <paludis/util/fs_path-fwd.hh>
27#include <paludis/util/stream_holder.hh>
60 overflow(int_type c)
override;
63 xsputn(
const char * s, std::streamsize num)
override;
69 SafeOFStreamBuf(
const int f,
const bool buffer);
70 ~SafeOFStreamBuf()
override;
74 void write_buffered();
96 SafeOFStreamBase(
const int fd,
const bool buffer);
109 protected SafeOFStreamBase,
110 public StreamHolder<std::ostream>
119 SafeOFStream(
const int fd,
const bool buffer);
120 SafeOFStream(
const FSPath &,
const int open_flags,
const bool buffer);
121 ~SafeOFStream()
noexcept(
false);
136 SafeOFStreamError(
const std::string &)
noexcept;
SafeOFStreamBuf buf
Our buffer.
Definition safe_ofstream.hh:90
Definition safe_ofstream.hh:54
int fd
Our file descriptor.
Definition safe_ofstream.hh:77
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24