it_bus/xml_output_stream.h

00001 #ifndef _IT_BUS_XML_OUTPUT_STREAM_H_
00002 #define _IT_BUS_XML_OUTPUT_STREAM_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/types.h>
00008 #include <it_bus/api_defines.h>
00009 
00010 #include <it_bus/output_stream.h>
00011 
00012 namespace IT_Bus
00013 {
00014     class XMLOutputStreamImpl;
00015 
00040     class IT_BUS_XML_API XMLOutputStream
00041     {
00042       public:
00043 
00081         enum EscapeFlags
00082         {
00083             NO_ESCAPES,
00084             STD_ESCAPES,
00085             ATTR_ESCAPES,
00086             CHAR_ESCAPES, 
00087             ESCAPE_FLAGS_COUNT,
00088             NO_TRANSCODE_OR_ESCAPES,
00089             ASCII_7BIT_NO_ESCAPES,
00090             DEFAULT_ESCAPE = 999 
00091         };
00092 
00099         XMLOutputStream(
00100             OutputStream & output_stream,
00101             bool write_header = true
00102         ) IT_THROW_DECL((IOException));
00103 
00111         XMLOutputStream(
00112             OutputStream & output_stream,
00113             const char * encoding,
00114             bool write_header = true
00115         ) IT_THROW_DECL((IOException));
00116 
00117         ~XMLOutputStream();
00118 
00119         void write(
00120             const Character to_write,
00121             EscapeFlags flags
00122         ) IT_THROW_DECL((IOException));
00123 
00124         void write(
00125             const String& to_write,
00126             EscapeFlags flags
00127         ) IT_THROW_DECL((IOException));
00128 
00129 
00130         void write(
00131             const String& to_write,
00132             size_t length,
00133             EscapeFlags flags
00134         ) IT_THROW_DECL((IOException));
00135 
00136         void write(
00137             const char* to_write,
00138             EscapeFlags flags
00139         ) IT_THROW_DECL((IOException));
00140 
00141 
00142         void write(
00143             const char* to_write,
00144             size_t length,
00145             EscapeFlags flags
00146         ) IT_THROW_DECL((IOException));
00147 
00148         void write_header() IT_THROW_DECL((IOException));
00149         
00150         void
00151         set_encoding(
00152             const String& encoding_name
00153             );
00154         
00155       private:
00156 
00157         XMLOutputStream&
00158         operator=(
00159             const XMLOutputStream & rhs
00160         );
00161 
00162         XMLOutputStream(
00163             const XMLOutputStream & rhs
00164         );
00165 
00166         XMLOutputStreamImpl * m_impl;
00167     };
00168 }
00169 
00170 #endif  

Generated on Thu Sep 7 11:39:08 2006 for Artix by  doxygen 1.4.7