55 : indent_spaces(0), opening_char(o), closing_char(c), delta(d), is_line_start(
true)
65 std::cerr <<
"Not all indentations have been closed: " <<
indentation << std::endl;
72 std::string::const_iterator it_end = str.end();
75 bool needToInd =
false;
87 for(std::string::const_iterator it = str.begin(); it != it_end; ++it)
93 if((it + 1) != it_end)
119 if(*(str.begin()) !=
closing_char and it != str.begin())
unsigned int delta
delta indent space
File containing functions and utilities to support the printing of debug messagges.
char closing_char
char that increments the indent space by a delta
Simple pretty print functor.
exceptions managed by PandA
char opening_char
char that increments the indent space by a delta
void write_char(std::ostream &os, const char &c)
Write the current char.
void deindent()
Manually reduce the indenting of the code.
~simple_indent()
destructor
simple_indent(char o, char c, unsigned int d)
constructor
void indent()
Manually increase the indenting of the code.
void operator()(std::ostream &os, const std::string &str)
pretty print functor
#define STD_OPENING_CHAR
STD include.
unsigned int indent_spaces
number of spaces used to indent after a new line print
#define STD_CLOSING_CHAR
Special closing character used to close the current nested level.
size_t indentation
The current indentation for debug messages.
void write_indent(std::ostream &os)
Write the indent spaces.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...