00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00034 #ifndef VCSN_TOOLS_DUMPER_HH
00035 # define VCSN_TOOLS_DUMPER_HH
00036 # ifndef  VCSN_SANITY_CHECK
00037 
00038 #  include <string>
00039 
00040 namespace vcsn
00041 {
00042   namespace tools
00043   {
00045     int string_to_int (const std::string& s);
00046 
00047     struct dumper
00048     {
00050         dumper (int argc, char **argv, int pos = 1);
00051 
00053         void usage (int estatus);
00054 
00055         enum dump_format
00056         {
00057           fmt_error,
00058           fmt_dot,
00059           fmt_fsm,
00060           fmt_simple,
00061           fmt_xml,
00062         };
00063 
00064         enum dump_format dump_format (std::string fmt);
00065 
00066         const char* get_fmt () const;
00067 
00068         void
00069         operator () (std::ostream& o,
00070                      const automaton_t& automaton,
00071                      const std::string& name = "automaton");
00072       private:
00073         enum dump_format fmt_;
00074         int argc_;
00075         char** argv_;
00076     };
00077   }
00078 }
00079 
00080 #  ifndef VCSN_USE_INTERFACE_ONLY
00081 #   include <vaucanson/tools/dumper.hxx>
00082 #  endif // ! VCSN_USE_INTERFACE_ONLY
00083 # endif // ! VCSN_SANITY_CHECK
00084 #endif // ! VCSN_TOOLS_DUMPER_HH && ! VCSN_SANITY_CHECK