00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_XML_XERCES_STREAM_HH
00018 # define VCSN_XML_XERCES_STREAM_HH
00019 
00029 # include <ostream>
00030 # include <xercesc/framework/XMLFormatter.hpp>
00031 
00032 XERCES_CPP_NAMESPACE_BEGIN
00033 
00034 template<class Ostream>
00035 class XMLPARSER_EXPORT XMLXercesStream : public XMLFormatTarget
00036 {
00037   public:
00038 
00041     XMLXercesStream(std::ostream& os) : os_(os) {};
00042     ~XMLXercesStream() {};
00044 
00048     virtual void writeChars (const XMLByte* const toWrite,
00049                              const unsigned int,
00050                              XMLFormatter* const);
00051 
00052     virtual void flush() {};
00053 
00054   private:
00058     XMLXercesStream(const XMLXercesStream&);
00059     XMLXercesStream& operator=(const XMLXercesStream&);
00060 
00061     Ostream&    os_;
00062 };
00063 
00064 XERCES_CPP_NAMESPACE_END
00065 
00066 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00067 #  include <vaucanson/xml/xml_xerces_stream.hxx>
00068 # endif // !VCSN_USE_INTERFACE_ONLY || VCSN_USE_LIB
00069 
00070 #endif // ! VCSN_XML_XERCES_STREAM_HH