00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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 }
00055
00056 }
00057
00058 #endif // ! VCSN_TOOLS_DOT_DUMP_HXX