00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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/z_max_plus_automaton_structures.hh>
00039 # include <vaucanson/z_min_plus_automaton_structures.hh>
00040 # include <vaucanson/r_automaton_structures.hh>
00041 # include <vaucanson/fmp_transducer_structures.hh>
00042 # include <vaucanson/boolean_transducer_structures.hh>
00043
00044 # include <vaucanson/algebra/concept/monoid_base.hh>
00045 # include <vaucanson/automata/concept/transducer_base.hh>
00046
00047 # include <vaucanson/xml/strings.hh>
00048
00049 namespace vcsn
00050 {
00051 namespace xml
00052 {
00053
00054 namespace tools
00055 {
00056
00057 template <class S>
00058 const char* get_monoid_type(const S&);
00059
00060 template <class S>
00061 const char* get_semiring_operations(const S&);
00062
00063 template <class S, class T>
00064 const char* get_semiring_set(const S&, const T&);
00065
00066 template <class S, class T, class U>
00067 void add_label(xercesc::DOMElement*, const Element<S, T>&, const U&);
00068
00069 template <class M>
00070 xercesc::DOMElement* create_monoid(const M& monoid,
00071 xercesc::DOMDocument* doc,
00072 xercesc::DOMElement* elt);
00073
00074 template <class A>
00075 void create_alphabet(const A& alphabet, xercesc::DOMDocument* doc,
00076 xercesc::DOMElement* root);
00077
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
00095 template <class T>
00096 typename T::series_set_elt_t get_series(xercesc::DOMElement* node,
00097 T& aut);
00098
00109 template <class U, class V>
00110 void insert_letter(Element<vcsn::algebra::AlphabetSet<U>, V>& a,
00111 const std::string& str);
00112
00122 template <class U>
00123 void ensure_monoid_type(const xercesc::DOMElement* node,
00124 const U& param);
00125
00137 template <class T, class U>
00138 void ensure_semiring_type(const xercesc::DOMElement* node, const T& a,
00139 const U& param);
00140
00151 template <class OStream>
00152 void print_document(xercesc::DOMImplementationLS* impl,
00153 xercesc::DOMElement* node,
00154 OStream& os);
00155 }
00156
00157 }
00158
00159 }
00160
00161 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00162 # include <vaucanson/xml/tools.hxx>
00163 # endif // VCSN_USE_INTERFACE_ONLY
00164
00165 #endif // ! VCSN_XML_TOOLS_HH