00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DUMP_VISITOR_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DUMP_VISITOR_HH
00019 
00020 # include <iostream>
00021 # include <string>
00022 # include <set>
00023 # include <boost/shared_ptr.hpp>
00024 
00025 # include <vaucanson/algebra/implementation/series/rat/exp.hh>
00026 # include <vaucanson/algebra/implementation/monoid/monoid_rep.hh>
00027 # include <vaucanson/algebra/implementation/series/series_rep.hh>
00028 # include <vaucanson/misc/iomanip.hh>
00029 # include <vaucanson/misc/usual_macros.hh>
00030 
00031 namespace vcsn
00032 {
00033 
00034   namespace rat
00035   {
00036 
00038     enum print_mode_t
00039       {
00040         MODE_NONE       = 0x0,  
00041         MODE_ADD        = 0x1,  
00042         MODE_MUL        = 0x2,  
00043         MODE_STAR       = 0x4,  
00044         MODE_RWEIGHT    = 0x8,  
00045         MODE_LWEIGHT    = 0x10, 
00046         MODE_WEIGHT     = 0x18, 
00047         MODE_ALL        = 0x1F  
00048       };
00049 
00051 
00052 
00053 
00054 
00056     struct setpm : public misc::iomanip<setpm>
00057     {
00058       setpm (print_mode_t mode);
00059       std::ostream& operator () (std::ostream& ostr) const;
00060     protected:
00061       print_mode_t mode_;
00062     };
00063 
00065     print_mode_t getpm(const std::ostream& ostr);
00066 
00068     struct setzero : public misc::iomanip<setzero>
00069     {
00070       setzero(const std::string& zero);
00071       std::ostream& operator () (std::ostream& ostr) const;
00072     protected:
00073       const std::string& z_;
00074     };
00075 
00077     struct setid : public misc::iomanip<setid>
00078     {
00079       setid(const std::string& id);
00080       std::ostream& operator () (std::ostream& ostr) const;
00081     protected:
00082       const std::string& i_;
00083     };
00084 
00085   } 
00086 
00087 } 
00088 
00089 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00090 #  include <vaucanson/algebra/implementation/series/rat/dump_visitor.hxx>
00091 # endif // VCSN_USE_INTERFACE_ONLY
00092 
00093 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DUMP_VISITOR_HH