18 #ifndef VCSN_XML_PRINTERS_HH
19 # define VCSN_XML_PRINTERS_HH
35 # include <xercesc/dom/DOM.hpp>
36 # include <xercesc/util/XMLString.hpp>
37 # include <xercesc/util/PlatformUtils.hpp>
50 virtual ~Printer () = 0;
56 template <
typename Auto>
57 class AutPrinter :
public Printer
60 AutPrinter (
const Auto& aut,
const std::string& name =
"");
61 virtual ~AutPrinter ();
64 print (std::ostream& out);
67 typedef typename Auto::hstate_t hstate_t;
68 typedef typename Auto::htransition_t htransition_t;
69 typedef std::map<hstate_t, std::string> map_t;
70 typedef typename Auto::set_t auto_set_t;
71 typedef typename Auto::value_t auto_impl_t;
72 typedef typename Auto::series_set_elt_t series_set_elt_t;
75 create_state(hstate_t s,
76 xercesc::DOMElement* root);
78 create_transition(htransition_t e,
79 xercesc::DOMElement* root);
81 create_initial(hstate_t s,
82 xercesc::DOMElement* root);
84 create_final(hstate_t s,
85 xercesc::DOMElement* root);
88 create_geometry(hstate_t&,
89 xercesc::DOMElement* root);
92 const std::string& name_;
96 xercesc::DOMImplementation* impl_;
97 xercesc::DOMDocument* doc_;
98 xercesc::DOMElement* root_;
104 template <
typename RE>
105 class RegExpPrinter :
public Printer
108 RegExpPrinter (
const RE& regexp,
const std::string& name =
"");
109 virtual ~RegExpPrinter ();
112 print (std::ostream& out);
116 const std::string& name_;
118 xercesc::DOMImplementation* impl_;
119 xercesc::DOMDocument* doc_;
120 xercesc::DOMElement* root_;
125 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
126 # include <vaucanson/xml/printers.hxx>
127 # endif // VCSN_USE_INTERFACE_ONLY
129 #endif // !VCSN_XML_PRINTERS_HH