00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <vaucanson/config/system.hh>
00019
00020 #if not defined (VCSN_XML_TOOLS_HH) and VCSN_INCLUDE_XML()
00021 # define VCSN_XML_TOOLS_HH
00022
00023 # ifndef VCSN_USE_XML
00024 # error Vaucanson XML support is disabled.
00025 # endif
00026
00037 # include <xercesc/dom/DOM.hpp>
00038 # include <xercesc/framework/MemBufFormatTarget.hpp>
00039 # include <xercesc/util/XMLString.hpp>
00040 # include <xercesc/util/PlatformUtils.hpp>
00041
00042 # include <vaucanson/design_pattern/element.hh>
00043 # include <vaucanson/misc/usual_macros.hh>
00044 # include <vaucanson/boolean_automaton.hh>
00045 # include <vaucanson/z_automaton.hh>
00046 # include <vaucanson/z_max_plus_automaton.hh>
00047 # include <vaucanson/z_min_plus_automaton.hh>
00048 # include <vaucanson/r_automaton.hh>
00049 # include <vaucanson/fmp_transducer.hh>
00050 # include <vaucanson/boolean_transducer.hh>
00051
00052 # include <vaucanson/algebra/concept/monoid_base.hh>
00053 # include <vaucanson/automata/concept/transducer_base.hh>
00054
00055 # include <vaucanson/xml/strings.hh>
00056
00057 namespace vcsn
00058 {
00059 namespace xml
00060 {
00061
00062 namespace tools
00063 {
00064
00065 template <class S>
00066 const char* get_monoid_type(const S&);
00067
00068 template <class S>
00069 const char* get_semiring_operations(const S&);
00070
00071 template <class S, class T>
00072 const char* get_semiring_set(const S&, const T&);
00073
00074 template <class S, class T, class U>
00075 void add_label(xercesc::DOMElement*, const Element<S, T>&, const U&);
00076
00077 template <class M>
00078 xercesc::DOMElement* create_monoid(const M& monoid,
00079 xercesc::DOMDocument* doc,
00080 xercesc::DOMElement* elt);
00081 template <class A>
00082 void create_alphabet(const A& alphabet, xercesc::DOMDocument* doc,
00083 xercesc::DOMElement* root);
00084 template <class A, class S>
00085 xercesc::DOMElement* create_semiring(const A& aut,
00086 const S& semiring,
00087 xercesc::DOMDocument* doc,
00088 xercesc::DOMElement* elt);
00089
00090 template <class T>
00091 typename T::series_set_elt_t get_series(xercesc::DOMElement*, T&);
00092
00093 template <class U, class V>
00094 void insert_letter(Element<vcsn::algebra::AlphabetSet<U>, V>&,
00095 const std::string&);
00096
00097 template <class U>
00098 void ensure_monoid_type(const xercesc::DOMElement*, const U&);
00099
00100 template <class T, class U>
00101 void ensure_semiring_type(const xercesc::DOMElement*, const T&,
00102 const U&);
00103
00104 template <class OStream>
00105 void print_document(xercesc::DOMElement*, OStream&);
00106
00107 }
00108
00109 }
00110
00111 }
00112
00113 # ifndef VCSN_USE_INTERFACE_ONLY
00114 # include <vaucanson/xml/tools.hxx>
00115 # endif // VCSN_USE_INTERFACE_ONLY
00116
00117 #endif // ! VCSN_XML_TOOLS_HH && VCSN_INCLUDE_XML()