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 <ostream>
00021 # include <string>
00022 # include <set>
00023 
00024 # include <vaucanson/algebra/implementation/series/rat/exp.hh>
00025 # include <vaucanson/misc/iomanip.hh>
00026 
00027 namespace vcsn
00028 {
00029 
00030   namespace rat
00031   {
00032 
00034     enum print_mode_t
00035       {
00036         MODE_NONE       = 0x0,  
00037         MODE_ADD        = 0x1,  
00038         MODE_MUL        = 0x2,  
00039         MODE_STAR       = 0x4,  
00040         MODE_RWEIGHT    = 0x8,  
00041         MODE_LWEIGHT    = 0x10, 
00042         MODE_WEIGHT     = 0x18, 
00043         MODE_ALL        = 0x1F  
00044       };
00045 
00047     template <class Word, class Weight>
00048     std::ostream&
00049     operator << (std::ostream& ostr, const exp<Word, Weight>& e);
00050 
00052     struct setpm : public misc::iomanip<setpm>
00053     {
00054       setpm (print_mode_t mode);
00055       std::ostream& operator () (std::ostream& ostr) const;
00056     protected:
00057       print_mode_t mode_;
00058     };
00059 
00061     print_mode_t getpm(const std::ostream& ostr);
00062 
00064     struct setzero : public misc::iomanip<setzero>
00065     {
00066       setzero(const std::string& zero);
00067       std::ostream& operator () (std::ostream& ostr) const;
00068     protected:
00069       const std::string& z_;
00070     };
00071 
00073     struct setid : public misc::iomanip<setid>
00074     {
00075       setid(const std::string& id);
00076       std::ostream& operator () (std::ostream& ostr) const;
00077     protected:
00078       const std::string& i_;
00079     };
00080 
00081   } 
00082 
00083 } 
00084 
00085 # ifndef VCSN_USE_INTERFACE_ONLY
00086 #  include <vaucanson/algebra/implementation/series/rat/dump_visitor.hxx>
00087 # endif // VCSN_USE_INTERFACE_ONLY
00088 
00089 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DUMP_VISITOR_HH