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

# dot_dump.hxx

    00001 // dot_dump.hxx: 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, 2005 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_TOOLS_DOT_DUMP_HXX
    00018 # define VCSN_TOOLS_DOT_DUMP_HXX
    00019
    00020 # include <string>
    00021 # include <vaucanson/tools/io.hh>
    00022 # include <vaucanson/tools/dot_format.hh>
    00023 # include <vaucanson/automata/concept/automata_base.hh>
    00024 # include <vaucanson/automata/concept/transducer_base.hh>
    00025
    00026 namespace vcsn {
    00027
    00028   namespace tools {
    00029
    00030     template <class S, class Auto>
    00031     void dot_dump(const AutomataBase<S>&,
    00032                   std::ostream& o,
    00033                   const Auto& a,
    00034                   const std::string& name)
    00035     {
    00036       o << automaton_saver(a, tools::string_out(), tools::dot(name));
    00037     }
    00038
    00039     template <class S, class Auto>
    00040     void dot_dump(const TransducerBase<S>&,
    00041                   std::ostream& o,
    00042                   const Auto& a,
    00043                   const std::string& name)
    00044     {
    00045       o << automaton_saver(a, tools::string_out(), tools::transducer_dot(name));
    00046     }
    00047
    00048     template <typename Auto>
    00049     void dot_dump(std::ostream& o, const Auto& a, const std::string& name)
    00050     {
    00051       dot_dump(a.structure(), o, a, name);
    00052     }
    00053
    00054   } // tools
    00055
    00056 } // vcsn
    00057
    00058 #endif // ! VCSN_TOOLS_DOT_DUMP_HXX