tools.hh

Go to the documentation of this file.
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_structures.hh>
00039 # include <vaucanson/z_automaton_structures.hh>
00040 # include <vaucanson/z_max_plus_automaton_structures.hh>
00041 # include <vaucanson/z_min_plus_automaton_structures.hh>
00042 # include <vaucanson/r_automaton_structures.hh>
00043 # include <vaucanson/fmp_transducer_structures.hh>
00044 # include <vaucanson/boolean_transducer_structures.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 
00076       template <class A>
00077       void create_alphabet(const A& alphabet, xercesc::DOMDocument* doc,
00078                            xercesc::DOMElement* root);
00079 
00080       template <class A, class S>
00081       xercesc::DOMElement* create_semiring(const A& aut,
00082                                            const S& semiring,
00083                                            xercesc::DOMDocument* doc,
00084                                            xercesc::DOMElement* elt);
00085 
00097       template <class T>
00098       typename T::series_set_elt_t get_series(xercesc::DOMElement* node,
00099                                               T& aut);
00100 
00111       template <class U, class V>
00112       void insert_letter(Element<vcsn::algebra::AlphabetSet<U>, V>& a,
00113                          const std::string& str);
00114 
00124       template <class U>
00125       void ensure_monoid_type(const xercesc::DOMElement* node,
00126                               const U& param);
00127 
00139       template <class T, class U>
00140       void ensure_semiring_type(const xercesc::DOMElement* node, const T& a,
00141                                 const U& param);
00142 
00153       template <class OStream>
00154       void print_document(xercesc::DOMImplementationLS* impl,
00155                           xercesc::DOMElement* node,
00156                           OStream& os);
00157     } // tools
00158 
00159   } // xml
00160 
00161 } // vcsn
00162 
00163 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00164 #  include <vaucanson/xml/tools.hxx>
00165 # endif // VCSN_USE_INTERFACE_ONLY
00166 
00167 #endif // ! VCSN_XML_TOOLS_HH

Generated on Sun Jul 29 19:35:30 2007 for Vaucanson by  doxygen 1.5.2