26 #define OSTREAM_HPP_ 1
164 return this->operator<<(static_cast<unsigned long>(n));
168 return this->operator<<(static_cast<long>(n));
367 : prefix(prefix), color(color) {}
435 template <
class _ForwardIterator>
438 return OS <<
"[<empty>]";
441 for( ; i !=
e ; ++
i) {
447 template <
class _ForwardIterator>
450 return OS <<
"[<empty>]";
453 for( ; i !=
e ; ++
i) {
460 return OS << t.c_str();
465 #endif // OSTREAM_HPP_
size_t indent_lvl
indentation level
static SetWidth setw(size_t w)
IntegerFormat int_fmt
format used to print integer types
OStream & operator<<(int n)
Set precision flag for next item to be written.
OStream & print_container(OStream &OS, _ForwardIterator i, const _ForwardIterator &e)
OStream & operator<<(unsigned int n)
void init_flag_defaults()
initialize all format flags to their default value
FloatFormat float_fmt
format used to print floating point types
OStream & operator<<(char)
size_t width
padding for next write
static SetPrefix setprefix(const char *prefix, Color color)
void init_persistent_flags()
initialize all flags that survive a write operation
bool newline
true iff we are at the beginning of a new line
OStream(FILE *file)
create a new stream with default flags
enum cacao::OStream::@2 align
Alignment to use when padding text.
static SetPrecision setprecision(int p)
Set indent level in stream.
Color prefix_color
color line prefix is printed in
static void set_force_color(int)
force color (0 = disabled, 1 = yes, 0 = no)
static int force_color
force color (0 = disabled, 1 = yes, 0 = no)
const char * prefix
line prefix
Simple stream class for formatted output.
SetPrefix(const char *prefix, Color color)
OStream & operator<<(OStream &OS, const std::string &t)
void set_file(FILE *file)
SetPrecision(int precision)
Set width flag for next item to be written.
bool use_color() const
supports ansi escape codes
Set width flag and fill zero for next item to be written.
OStream & print_ptr_container(OStream &OS, _ForwardIterator i, const _ForwardIterator &e)
void init_transient_flags()
initialize all flags that only apply to one write operation
static SetIndent setindent(size_t i)
static SetZero setz(size_t w)
bool _use_color
supports ansi escape codes
FILE * file
file stream writes to