Vaucanson  1.4.1
dot_format.hh
1 // dot_format.hh: 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_DOT_FORMAT_HH
18 # define VCSN_TOOLS_DOT_FORMAT_HH
19 
20 #include <iostream>
21 #include <string>
22 
23 namespace vcsn {
24 
25  namespace tools {
26 
28  void
29  name_escaper(std::ostream&, const std::string&);
30 
31  struct dot
32  {
33  inline dot(const std::string& auto_name = "automaton");
34 
35  template <typename Saver, typename Conv>
36  void operator()(std::ostream& out,
37  const Saver& s,
38  const Conv& conv) const;
39 
40  protected:
41  std::string name_;
42  };
43 
44  struct transducer_dot
45  {
46  inline transducer_dot(const std::string& auto_name = "transducer");
47 
48  template <typename Saver, typename Conv>
49  void operator()(std::ostream& out,
50  const Saver& s,
51  const Conv& conv) const;
52 
53  protected:
54  std::string name_;
55  };
56 
57  } // tools
58 
59 } // vcsn
60 
61 
62 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
63 # include <vaucanson/tools/dot_format.hxx>
64 #endif // VCSN_USE_INTERFACE_ONLY
65 
66 
67 #endif // ! VCSN_TOOLS_DOT_FORMAT_HH