- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# dumper.hh

Go to the documentation of this file.

    00001 // dumper.hcc: this file is part of the Vaucanson project.   -*- C++ -*-
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2005, 2006, 2007 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
    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     {
    00051         dumper (int argc, char **argv, int pos = 1);
    00052
    00054         void usage (int estatus);
    00055
    00056         enum dump_format
    00057         {
    00058           fmt_error,
    00059           fmt_dot,
    00060           fmt_fsm,
    00061           fmt_simple,
    00062           fmt_xml,
    00063         };
    00064
    00065         enum dump_format dump_format (std::string fmt);
    00066
    00067         const char* get_fmt () const;
    00068
    00069         void
    00070         operator () (std::ostream& o,
    00071                      const automaton_t& automaton,
    00072                      const std::string& name = "automaton");
    00073       private:
    00074         enum dump_format fmt_;
    00075         int argc_;
    00076         char** argv_;
    00077     };
    00078   }
    00079 }
    00080
    00081 #  ifndef VCSN_USE_INTERFACE_ONLY
    00082 #   include <vaucanson/tools/dumper.hxx>
    00083 #  endif // ! VCSN_USE_INTERFACE_ONLY
    00084 # endif // ! VCSN_SANITY_CHECK
    00085 #endif // ! VCSN_TOOLS_DUMPER_HH && ! VCSN_SANITY_CHECK