00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef VCSN_XML_XML_HH
00019 # define VCSN_XML_XML_HH
00020
00031 # include <string>
00032 # include <iostream>
00033
00034
00035
00036 namespace vcsn
00037 {
00038 namespace tools
00039 {
00040 template <typename Auto, typename T, typename Format>
00041 struct automaton_saver_;
00042
00043 template <typename RE, typename T, typename Format>
00044 struct regexp_saver_;
00045
00046 template <typename Auto, typename T, typename Format>
00047 struct automaton_loader_;
00048
00049 template <typename RE, typename T, typename Format>
00050 struct regexp_loader_;
00051 }
00052
00053 namespace xml
00054 {
00055
00056 class XML
00057 {
00058 public:
00059 XML(const std::string& name = "");
00060 XML(const XML& old);
00061 ~XML();
00062
00066 template <typename Auto, typename T, typename Format, typename Conv>
00067 void operator()(std::ostream& out,
00068 const vcsn::tools::automaton_saver_<Auto, T, Format>& s,
00069 const Conv& conv) const;
00070
00074 template <typename RE, typename T, typename Format, typename Conv>
00075 void operator()(std::ostream& out,
00076 const vcsn::tools::regexp_saver_<RE, T, Format>& s,
00077 const Conv& conv) const;
00078
00082 template <typename Auto, typename T, typename Format>
00083 void operator()(std::istream& in, vcsn::tools::automaton_loader_<Auto, T, Format>& l, bool check = true);
00084
00088 template <typename RE, typename T, typename Format>
00089 void operator()(std::istream& in, vcsn::tools::regexp_loader_<RE, T, Format>& l, bool check = true);
00090
00091
00096 static int inst_;
00097 protected:
00098 const std::string name_;
00099 };
00100 }
00101 }
00102
00103 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00104 # include <vaucanson/xml/XML.hxx>
00105 # endif // VCSN_USE_INTERFACE_ONLY
00106
00107 #endif // ! VCSN_XML_XML_HH