tools.hh

00001 // tools.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2005, 2006 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 
00018 #ifndef VCSN_XML_TOOLS_HH
00019 # define VCSN_XML_TOOLS_HH
00020 
00031 # include <xercesc/dom/DOM.hpp>
00032 # include <xercesc/framework/MemBufFormatTarget.hpp>
00033 # include <xercesc/util/XMLString.hpp>
00034 # include <xercesc/util/PlatformUtils.hpp>
00035 
00036 # include <vaucanson/design_pattern/element.hh>
00037 # include <vaucanson/misc/usual_macros.hh>
00038 # include <vaucanson/boolean_automaton.hh>
00039 # include <vaucanson/z_automaton.hh>
00040 # include <vaucanson/z_max_plus_automaton.hh>
00041 # include <vaucanson/z_min_plus_automaton.hh>
00042 # include <vaucanson/r_automaton.hh>
00043 # include <vaucanson/fmp_transducer.hh>
00044 # include <vaucanson/boolean_transducer.hh>
00045 
00046 # include <vaucanson/algebra/concept/monoid_base.hh>
00047 # include <vaucanson/automata/concept/transducer_base.hh>
00048 
00049 # include <vaucanson/xml/strings.hh>
00050 
00051 namespace vcsn
00052 {
00053   namespace xml
00054   {
00055 
00056     namespace tools
00057     {
00058 
00059       template <class S>
00060       const char* get_monoid_type(const S&);
00061 
00062       template <class S>
00063       const char* get_semiring_operations(const S&);
00064 
00065       template <class S, class T>
00066       const char* get_semiring_set(const S&, const T&);
00067 
00068       template <class S, class T, class U>
00069       void add_label(xercesc::DOMElement*, const Element<S, T>&, const U&);
00070 
00071       template <class M>
00072       xercesc::DOMElement* create_monoid(const M& monoid,
00073                                          xercesc::DOMDocument* doc,
00074                                          xercesc::DOMElement* elt);
00075       template <class A>
00076       void create_alphabet(const A& alphabet, xercesc::DOMDocument* doc,
00077                            xercesc::DOMElement* root);
00078       template <class A, class S>
00079       xercesc::DOMElement* create_semiring(const A& aut,
00080                                            const S& semiring,
00081                                            xercesc::DOMDocument* doc,
00082                                            xercesc::DOMElement* elt);
00083 
00084       template <class T>
00085       typename T::series_set_elt_t get_series(xercesc::DOMElement*, T&);
00086 
00087       template <class U, class V>
00088       void insert_letter(Element<vcsn::algebra::AlphabetSet<U>, V>&,
00089                          const std::string&);
00090 
00091       template <class U>
00092       void ensure_monoid_type(const xercesc::DOMElement*, const U&);
00093 
00094       template <class T, class U>
00095       void ensure_semiring_type(const xercesc::DOMElement*, const T&,
00096                                 const U&);
00097 
00098       template <class OStream>
00099       void print_document(xercesc::DOMElement*, OStream&);
00100 
00101     } // tools
00102 
00103   } // xml
00104 
00105 } // vcsn
00106 
00107 # ifndef VCSN_USE_INTERFACE_ONLY
00108 #  include <vaucanson/xml/tools.hxx>
00109 # endif // VCSN_USE_INTERFACE_ONLY
00110 
00111 #endif // ! VCSN_XML_TOOLS_HH

Generated on Sat Jul 29 17:13:12 2006 for Vaucanson by  doxygen 1.4.6