Vaucanson  1.4.1
simple_dump.hxx
1 // simple_dump.hxx: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_TOOLS_SIMPLE_DUMP_HXX
18 # define VCSN_TOOLS_SIMPLE_DUMP_HXX
19 
20 # include <string>
21 # include <vaucanson/tools/io.hh>
22 # include <vaucanson/tools/simple_format.hh>
23 # include <vaucanson/automata/concept/automata_base.hh>
24 # include <vaucanson/automata/concept/transducer_base.hh>
25 
26 namespace vcsn {
27 
28  namespace tools {
29 
30  template <class S, class Auto, class Converter>
31  void simple_dump(const AutomataBase<S>&,
32  std::ostream& o,
33  const Auto& a,
34  const Converter& conv)
35  {
36  o << automaton_saver(a, conv, tools::simple());
37  }
38 
39  template <typename Auto, typename Converter>
40  void simple_dump(std::ostream& o, const Auto& a, const Converter& conv)
41  {
42  simple_dump(a.structure(), o, a, conv);
43  }
44 
45  } // tools
46 
47 } // vcsn
48 
49 #endif // ! VCSN_TOOLS_SIMPLE_DUMP_HXX