|
CGAL 6.2 - IO Streams
|
#include <CGAL/IO/Indenting_ostream.h>
RAII helper class for temporarily installing an indenting streambuf on a stream.
This class automatically restores the original streambuf when it goes out of scope. It provides a convenient way to add indentation to output streams within a specific scope.
| StreamT | The stream type (e.g., std::ostream, std::wostream) |
Public Types | |
| using | char_type = typename StreamT::char_type |
| Character type. | |
| using | traits_type = typename StreamT::traits_type |
| Character traits type. | |
| using | streambuf_type = Basic_indenting_streambuf< char_type, traits_type > |
| Type of the indenting streambuf. | |
| using | wrapped_streambuf_type = std::basic_streambuf< char_type, traits_type > |
| Type of the wrapped streambuf. | |
| using | string = std::basic_string< char_type > |
| String type matching character type. | |
Public Member Functions | |
| Basic_indenting_stream_guard (StreamT &stream, const string &indent_string) | |
| constructs and installs an indenting streambuf on the given stream. | |
| Basic_indenting_stream_guard (StreamT &stream, int spaces_per_level=2) | |
| constructs and installs an indenting streambuf on the given stream | |
| ~Basic_indenting_stream_guard () | |
| Destructor - restores the original streambuf. | |
|
explicit |
constructs and installs an indenting streambuf on the given stream.
| stream | The stream to modify |
| indent_string | The indentation string to use |
| CGAL::IO::Basic_indenting_stream_guard< StreamT >::Basic_indenting_stream_guard | ( | StreamT & | stream, |
| int | spaces_per_level = 2 |
||
| ) |
constructs and installs an indenting streambuf on the given stream
| stream | The stream to modify |
| spaces_per_level | Number of indentation spaces |