escaper Struct Template Reference

IO Manipulator to escape some characters when displaying them. More...

Inheritance diagram for escaper:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 escaper (const T &w)
std::ostream & operator() (std::ostream &ostr) const
const Self & self () const

Protected Attributes

const T & w_

Detailed Description

template<class T>
struct vcsn::misc::escaper< T >

IO Manipulator to escape some characters when displaying them.

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::misc::usual_escaped_characters (). You may control those characters using the vcsn::misc::setesc manipulator.

See also:
make_escaper (), setesc, getesc (), iomanip, vcsn::misc::usual_escaped_characters ().
Author:
Thomas Claveirole <thomas.claveirole@lrde.epita.fr>

Definition at line 59 of file escaper.hh.


Generated on Wed Jun 13 17:03:36 2007 for Vaucanson by  doxygen 1.5.1