Inheritance diagram for escaper:
Public Member Functions | |
escaper (const T &w) | |
std::ostream & | operator() (std::ostream &ostr) const |
Protected Attributes | |
const T & | w_ |
It is often desirable when printing words to escape some particular characters. As an example, when printing a rational expression, the word "foo+bar" (where '+' is a letter from the alphabet) should be printed "foo\+bar".
This manipulator allow an user to do so. When used on a stream using an << operator, the argument of type T held by this manipulator is displayed as if its << operator had been called, but with some characters escaped.
By default the escaped characters are those returned by vcsn::tools::usual_escaped_characters(). You may control those characters using the utility::setesc manipulator.
Definition at line 57 of file escaper.hh.