63class FdStream final :
public std::iostream {
64 class Buffer final :
public std::streambuf {
65 static constexpr std::size_t BUFFER_SIZE = 8192;
66 std::variant<int, FILE *> source;
67 std::array<char, BUFFER_SIZE> inputBuffer{};
68 std::array<char, BUFFER_SIZE> outputBuffer{};
69 int stdioReadError = 0;
70 bool stdioOutputPending =
false;
72 std::size_t readStdio(FILE *file);
75 int_type underflow()
override;
76 int_type overflow(int_type c)
override;
80 explicit Buffer(
int fd);
81 explicit Buffer(FILE *file);
85 explicit FdStream(
int fd);
86 explicit FdStream(FILE *file);
89 FdStream(
const FdStream &) =
delete;
90 FdStream &operator=(
const FdStream &) =
delete;
91 FdStream(FdStream &&) =
delete;
92 FdStream &operator=(FdStream &&) =
delete;
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13