00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_MISC_IOMANIP_HXX
00018 # define VCSN_MISC_IOMANIP_HXX
00019 
00028 # include <vaucanson/misc/iomanip.hh>
00029 
00030 namespace vcsn
00031 {
00032   namespace misc
00033   {
00034 
00035   
00036 
00037 
00038 
00039     template <class Self>
00040     const Self&
00041     iomanip<Self>::self () const
00042     {
00043       return *static_cast<const Self*> (this);
00044     }
00045 
00046     template <class IOM>
00047     std::ostream&
00048     operator<< (std::ostream& ostr, const iomanip<IOM>& m)
00049     {
00050       return m.self () (ostr);
00051     }
00052 
00053   
00054 
00055 
00056 
00057     template <class T>
00058     void
00059     pword_delete (std::ios_base::event ev, std::ios_base &io, int idx)
00060     {
00061       if (ev == std::ios_base::erase_event)
00062         delete static_cast<T*> (io.pword (idx));
00063     }
00064 
00065   } 
00066 } 
00067 
00068 #endif // ! VCSN_MISC_IOMANIP_HXX