dump_visitor.hh

00001 // dump_visitor.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2001, 2002, 2003, 2004 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_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 utility::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 utility::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 utility::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   } // End of namespace rat.
00082 
00083 } // End of namespace vcsn.
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

Generated on Fri Jul 28 12:18:31 2006 for Vaucanson by  doxygen 1.4.6