00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
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   } 
00104 } 
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