18 #ifndef VCSN_XML_BUILDERS_HH
19 # define VCSN_XML_BUILDERS_HH
37 # include <vaucanson/algebra/implementation/monoid/free_monoid.hh>
38 # include <vaucanson/algebra/implementation/series/series.hh>
40 # include <xercesc/sax2/Attributes.hpp>
41 # include <xercesc/util/XMLString.hpp>
42 # include <xercesc/dom/DOM.hpp>
44 # include <vaucanson/xml/handlers_base.hh>
66 typedef typename monoid_t::alphabet_t alphabet_t;
69 void operator () (
const std::string&);
71 alphabet_t& alphabet_;
75 template <
typename T,
typename U,
typename V>
76 class monGenAction<vcsn::
Element<vcsn::algebra::Series<T, U>, V> >
80 typedef typename series_t::set_t::monoid_t monoid_t;
81 typedef typename monoid_t::alphabet_t alphabet_t;
82 typedef typename alphabet_t::letter_t letter_t;
85 void operator () (
const std::string&);
96 template <
typename T,
typename U>
103 const XMLCh* value = 0);
106 start (
const XMLCh*
const uri,
107 const XMLCh*
const localname,
108 const XMLCh*
const qname,
109 const xercesc::Attributes& attrs);
111 end (
const XMLCh*
const uri,
112 const XMLCh*
const localname,
113 const XMLCh*
const qname);
127 template <
typename T,
typename U>
136 start (
const XMLCh*
const uri,
137 const XMLCh*
const localname,
138 const XMLCh*
const qname,
139 const xercesc::Attributes& attrs);
141 end (
const XMLCh*
const uri,
142 const XMLCh*
const localname,
143 const XMLCh*
const qname);
156 template <
typename T>
165 start (
const XMLCh*
const uri,
166 const XMLCh*
const localname,
167 const XMLCh*
const qname,
168 const xercesc::Attributes& attrs);
170 end (
const XMLCh*
const uri,
171 const XMLCh*
const localname,
172 const XMLCh*
const qname);
184 template <
typename T>
192 void start(
const XMLCh*
const uri,
193 const XMLCh*
const localname,
194 const XMLCh*
const qname,
195 const xercesc::Attributes& attrs);
197 void end(
const XMLCh*
const uri,
198 const XMLCh*
const localname,
199 const XMLCh*
const qname);
209 template <
typename T>
210 typename T::monoid_t*
212 const XMLCh*
const localname,
213 const xercesc::Attributes& attrs,
216 template <
typename T>
218 create_monoidh (T& monoid,
219 const xercesc::Attributes& attrs,
220 xercesc::SAX2XMLReader* parser,
223 template <
typename T>
224 typename T::series_set_t::series_rep_t*
225 create_series_representation(T&,
226 const XMLCh*
const localname,
227 const xercesc::Attributes& attrs,
230 template <
typename T>
232 create_series_representationh(T& srep,
233 const xercesc::Attributes& attrs,
234 xercesc::SAX2XMLReader* parser,
243 template <
typename T>
252 start (
const XMLCh*
const uri,
253 const XMLCh*
const localname,
254 const XMLCh*
const qname,
255 const xercesc::Attributes& attrs);
257 end (
const XMLCh*
const uri,
258 const XMLCh*
const localname,
259 const XMLCh*
const qname);
268 template <
typename T>
269 typename T::semiring_t*
271 const XMLCh*
const localname,
272 const xercesc::Attributes& attrs);
274 template <
typename T>
276 create_semiringh (T& semiring,
277 const xercesc::Attributes& attrs,
278 xercesc::SAX2XMLReader* parser,
286 template <
typename T>
292 template <
typename S,
typename T>
294 create_monElmth(xercesc::SAX2XMLReader* parser,
295 RegexpHandler<T>& root,
298 template <
typename T>
300 create_weight(xercesc::SAX2XMLReader* parser,
301 RegexpHandler<T>& root,
303 const xercesc::Attributes& attrs);
311 template <
typename T>
313 check_monoid_consistency (T& param,
314 const XMLCh*
const localname,
315 const xercesc::Attributes& attrs,
318 template <
typename T>
320 check_semiring_consistency (T& param,
321 const XMLCh*
const localname,
322 const xercesc::Attributes& attrs);
330 template <
typename T>
332 create_semiring_node(
const T& semiring,
333 xercesc::DOMDocument* doc,
334 xercesc::DOMElement* root);
336 template <
typename T>
338 create_monoid_node(
const T& monoid,
339 xercesc::DOMDocument* doc,
340 xercesc::DOMElement* root);
342 template <
typename T>
344 create_regexp_node(
const T&,
345 xercesc::DOMDocument* doc,
346 xercesc::DOMElement* root,
347 const char* root_name =
"label");
349 template <
typename T>
351 create_monElmt_node(
const T&,
352 xercesc::DOMDocument* doc,
353 xercesc::DOMElement* root);
355 template <
typename T>
357 create_type_writingData_node(
const T&,
358 xercesc::DOMDocument* doc,
359 xercesc::DOMElement* root);
362 template <
typename T>
372 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
373 # include <vaucanson/xml/builders.hxx>
374 # endif // VCSN_USE_INTERFACE_ONLY || !VCSN_USE_LIB
376 #endif // !VCSN_XML_BUILDERS_HH