- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# escaper.hh

Go to the documentation of this file.

    00001 // escaper.hh: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2004, 2005, 2006 The Vaucanson Group.
    00006 //
    00007 // This program is free software; you can redistribute it and/or
    00008 // modify it under the terms of the GNU General Public License
    00009 // as published by the Free Software Foundation; either version 2
    00010 // of the License, or (at your option) any later version.
    00011 //
    00012 // The complete GNU General Public Licence Notice can be found as the
    00013 // `COPYING' file in the root directory.
    00014 //
    00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
    00016 //
    00017 #ifndef VCSN_MISC_ESCAPER_HH
    00018 # define VCSN_MISC_ESCAPER_HH
    00019
    00028 # include <set>
    00029
    00030 # include <vaucanson/misc/iomanip.hh>
    00031
    00032 namespace vcsn
    00033 {
    00034   namespace misc
    00035   {
    00036
    00058     template <class T>
    00059     struct escaper : public iomanip< escaper<T> >
    00060     {
    00061         explicit
    00062         escaper (const T& w);
    00063         std::ostream& operator () (std::ostream& ostr) const;
    00064       protected:
    00065         const T& w_;
    00066     };
    00067
    00074     template <class T>
    00075     escaper<T>
    00076     make_escaper (const T& w);
    00077
    00087     struct setesc : public iomanip<setesc>
    00088     {
    00089         setesc (const std::set<char>& s);
    00090         std::ostream& operator () (std::ostream& ostr) const;
    00091       protected:
    00092         const std::set<char>& s_;
    00093     };
    00094
    00101     std::set<char>& getesc (std::ostream& ostr);
    00102
    00103   } // End of namespace misc.
    00104 } // End of namespace vcsn.
    00105
    00106 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
    00107 #  include <vaucanson/misc/escaper.hxx>
    00108 # endif // VCSN_USE_INTERFACE_ONLY
    00109
    00110 #endif // ! VCSN_MISC_ESCAPER_HH