Class fill_out_streambuf
Defined in File format.hpp
Inheritance Relationships
Base Type
public std::streambuf
Class Documentation
-
class fill_out_streambuf : public std::streambuf
A streambuf that fills out lines with spaces up until a specified width.
Public Functions
-
inline fill_out_streambuf(std::ostream &os, int width = 80)
Construct a new fill out streambuf object based on ostream os and a width to fill out to of width.
-
inline virtual int_type overflow(int_type ic = traits_type::eof())
The magic happens here. Write out a couple of spaces when the last character to write is a newline to make the line as wide as the requested width.
-
inline std::streambuf *get_upstream() const
Return the upstream streambuf
-
inline int get_line_count() const
Return how many lines have been written
-
inline fill_out_streambuf(std::ostream &os, int width = 80)