source: NonGTP/Xerces/xerces/doc/html/apiDocs/XMLFormatter_8hpp-source.html @ 358

Revision 358, 43.6 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>XMLFormatter.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
2  <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
3
4  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
5
6  <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
7  <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
8  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
9  <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
10  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
11  <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
12
13  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
14  <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR> 
15  <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
16  <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR> 
17
18  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> 
19  <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
20
21  <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
22  <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
23
24  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
25
26  <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
27  <A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR> 
28  <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>
29
30  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
31
32  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
33
34  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>
35
36
37<IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
38    <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
39
40            <P>
41<!-- Generated by Doxygen 1.2.14 -->
42<center>
43<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
44<hr><h1>XMLFormatter.hpp</h1><a href="XMLFormatter_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
4500002 <font class="comment"> * Copyright 1999-2000,2004 The Apache Software Foundation.</font>
4600003 <font class="comment"> * </font>
4700004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
4800005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
4900006 <font class="comment"> * You may obtain a copy of the License at</font>
5000007 <font class="comment"> * </font>
5100008 <font class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</font>
5200009 <font class="comment"> * </font>
5300010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
5400011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
5500012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
5600013 <font class="comment"> * See the License for the specific language governing permissions and</font>
5700014 <font class="comment"> * limitations under the License.</font>
5800015 <font class="comment"> */</font>
5900016
6000017 <font class="comment">/*</font>
6100018 <font class="comment"> * $Log: XMLFormatter.hpp,v $</font>
6200019 <font class="comment"> * Revision 1.21  2004/09/08 13:55:59  peiyongz</font>
6300020 <font class="comment"> * Apache License Version 2.0</font>
6400021 <font class="comment"> *</font>
6500022 <font class="comment"> * Revision 1.20  2004/01/29 11:46:29  cargilld</font>
6600023 <font class="comment"> * Code cleanup changes to get rid of various compiler diagnostic messages.</font>
6700024 <font class="comment"> *</font>
6800025 <font class="comment"> * Revision 1.19  2003/12/01 23:23:25  neilg</font>
6900026 <font class="comment"> * fix for bug 25118; thanks to Jeroen Witmond</font>
7000027 <font class="comment"> *</font>
7100028 <font class="comment"> * Revision 1.18  2003/10/10 02:06:09  neilg</font>
7200029 <font class="comment"> * fix for bug 21780; thanks to David Cargill</font>
7300030 <font class="comment"> *</font>
7400031 <font class="comment"> * Revision 1.17  2003/09/22 08:50:04  gareth</font>
7500032 <font class="comment"> * doc fix</font>
7600033 <font class="comment"> *</font>
7700034 <font class="comment"> * Revision 1.16  2003/09/08 21:48:36  peiyongz</font>
7800035 <font class="comment"> * Restore pre2.3 constructors</font>
7900036 <font class="comment"> *</font>
8000037 <font class="comment"> * Revision 1.15  2003/05/30 16:11:43  gareth</font>
8100038 <font class="comment"> * Fixes so we compile under VC7.1. Patch by Alberto Massari.</font>
8200039 <font class="comment"> *</font>
8300040 <font class="comment"> * Revision 1.14  2003/05/16 21:36:55  knoaman</font>
8400041 <font class="comment"> * Memory manager implementation: Modify constructors to pass in the memory manager.</font>
8500042 <font class="comment"> *</font>
8600043 <font class="comment"> * Revision 1.13  2003/05/15 18:26:07  knoaman</font>
8700044 <font class="comment"> * Partial implementation of the configurable memory manager.</font>
8800045 <font class="comment"> *</font>
8900046 <font class="comment"> * Revision 1.12  2003/03/17 03:19:52  peiyongz</font>
9000047 <font class="comment"> * Bug#18051 memory leakage in XMLFormatter</font>
9100048 <font class="comment"> *</font>
9200049 <font class="comment"> * Revision 1.11  2003/03/16 06:00:43  peiyongz</font>
9300050 <font class="comment"> * Bug#17983 Formatter does not escape control characters</font>
9400051 <font class="comment"> *</font>
9500052 <font class="comment"> * Revision 1.10  2003/03/11 12:58:36  tng</font>
9600053 <font class="comment"> * Fix compilation error on AIX.</font>
9700054 <font class="comment"> *</font>
9800055 <font class="comment"> * Revision 1.9  2003/03/07 21:42:37  tng</font>
9900056 <font class="comment"> * [Bug 17589] Refactoring ... .  Patch from Jacques Legare.</font>
10000057 <font class="comment"> *</font>
10100058 <font class="comment"> * Revision 1.8  2003/03/07 18:08:10  tng</font>
10200059 <font class="comment"> * Return a reference instead of void for operator=</font>
10300060 <font class="comment"> *</font>
10400061 <font class="comment"> * Revision 1.7  2003/01/31 00:30:48  jberry</font>
10500062 <font class="comment"> * Syntax error in declaration</font>
10600063 <font class="comment"> *</font>
10700064 <font class="comment"> * Revision 1.6  2003/01/28 18:32:33  peiyongz</font>
10800065 <font class="comment"> * Bug#13694: Allow Xerces to write the BOM to XML files</font>
10900066 <font class="comment"> *</font>
11000067 <font class="comment"> * Revision 1.5  2003/01/24 20:20:22  tng</font>
11100068 <font class="comment"> * Add method flush to XMLFormatTarget</font>
11200069 <font class="comment"> *</font>
11300070 <font class="comment"> * Revision 1.4  2002/11/04 15:00:21  tng</font>
11400071 <font class="comment"> * C++ Namespace Support.</font>
11500072 <font class="comment"> *</font>
11600073 <font class="comment"> * Revision 1.3  2002/07/30 16:29:16  tng</font>
11700074 <font class="comment"> * [Bug 8550] No explanation of XMLFormatter escape options.</font>
11800075 <font class="comment"> *</font>
11900076 <font class="comment"> * Revision 1.2  2002/06/21 19:31:23  peiyongz</font>
12000077 <font class="comment"> * getTranscoder() added;</font>
12100078 <font class="comment"> *</font>
12200079 <font class="comment"> * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz</font>
12300080 <font class="comment"> * sane_include</font>
12400081 <font class="comment"> *</font>
12500082 <font class="comment"> * Revision 1.7  2000/10/17 19:25:38  andyh</font>
12600083 <font class="comment"> * XMLFormatTarget, removed version of writeChars with no length.  Can not be</font>
12700084 <font class="comment"> * safely used, and obscured other errors.</font>
12800085 <font class="comment"> *</font>
12900086 <font class="comment"> * Revision 1.6  2000/10/10 23:54:58  andyh</font>
13000087 <font class="comment"> * XMLFormatter patch, contributed by Bill Schindler.  Fix problems with</font>
13100088 <font class="comment"> * output to multi-byte encodings.</font>
13200089 <font class="comment"> *</font>
13300090 <font class="comment"> * Revision 1.5  2000/04/07 01:01:56  roddey</font>
13400091 <font class="comment"> * Fixed an error message so that it indicated the correct radix for the rep</font>
13500092 <font class="comment"> * token. Get all of the basic output formatting functionality in place for</font>
13600093 <font class="comment"> * at least ICU and Win32 transcoders.</font>
13700094 <font class="comment"> *</font>
13800095 <font class="comment"> * Revision 1.4  2000/04/06 23:50:38  roddey</font>
13900096 <font class="comment"> * Now the low level formatter handles doing char refs for</font>
14000097 <font class="comment"> * unrepresentable chars (in addition to the replacement char style</font>
14100098 <font class="comment"> * already done.)</font>
14200099 <font class="comment"> *</font>
14300100 <font class="comment"> * Revision 1.3  2000/04/06 19:09:21  roddey</font>
14400101 <font class="comment"> * Some more improvements to output formatting. Now it will correctly</font>
14500102 <font class="comment"> * handle doing the 'replacement char' style of dealing with chars</font>
14600103 <font class="comment"> * that are unrepresentable.</font>
14700104 <font class="comment"> *</font>
14800105 <font class="comment"> * Revision 1.2  2000/04/05 00:20:16  roddey</font>
14900106 <font class="comment"> * More updates for the low level formatted output support</font>
15000107 <font class="comment"> *</font>
15100108 <font class="comment"> * Revision 1.1  2000/03/28 19:43:17  roddey</font>
15200109 <font class="comment"> * Fixes for signed/unsigned warnings. New work for two way transcoding</font>
15300110 <font class="comment"> * stuff.</font>
15400111 <font class="comment"> *</font>
15500112 <font class="comment"> */</font>
15600113
15700114 <font class="preprocessor">#if !defined(XMLFORMATTER_HPP)</font>
158<a name="l00115"></a><a class="code" href="XMLFormatter_8hpp.html#a0">00115</a> <font class="preprocessor"></font><font class="preprocessor">#define XMLFORMATTER_HPP</font>
15900116 <font class="preprocessor"></font>
16000117 <font class="preprocessor">#include &lt;<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>&gt;</font>
16100118
16200119 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
16300120
164<a name="l00121"></a><a class="code" href="XMLFormatter_8hpp.html#a1">00121</a> <font class="keyword">class </font><a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>;
16500122 <font class="keyword">class </font><a class="code" href="classXMLTranscoder.html">XMLTranscoder</a>;
16600123
167<a name="l00133"></a><a class="code" href="classXMLFormatter.html">00133</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a9"></a> <a class="code" href="classXMLFormatter.html">XMLFormatter</a> : <font class="keyword">public</font> <a class="code" href="classXMemory.html">XMemory</a>
16800134 {
16900135 <font class="keyword">public</font>:
17000136     <font class="comment">// -----------------------------------------------------------------------</font>
17100137     <font class="comment">//  Class types</font>
17200138     <font class="comment">// -----------------------------------------------------------------------</font>
173<a name="l00216"></a><a class="code" href="classXMLFormatter.html#z279_0">00216</a> <font class="comment"></font>    <font class="keyword">enum</font> EscapeFlags
17400217     {
17500218         NoEscapes
17600219         , StdEscapes
17700220         , AttrEscapes
17800221         , CharEscapes
17900222
18000223         <font class="comment">// Special values, don't use directly</font>
18100224         , EscapeFlags_Count
18200225         , DefaultEscape     = 999
18300226     };
18400227
185<a name="l00244"></a><a class="code" href="classXMLFormatter.html#z279_1">00244</a>     <font class="keyword">enum</font> UnRepFlags
18600245     {
18700246         UnRep_Fail
18800247         , UnRep_CharRef
18900248         , UnRep_Replace
19000249
19100250         , DefaultUnRep      = 999
19200251     };
19300253
19400254
19500255     <font class="comment">// -----------------------------------------------------------------------</font>
19600256     <font class="comment">//  Constructors and Destructor</font>
19700257     <font class="comment">// -----------------------------------------------------------------------</font>
19800269 <font class="comment"></font>    <a class="code" href="classXMLFormatter.html">XMLFormatter</a>
19900270     (
20000271         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>            outEncoding
20100272         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>            docVersion
20200273         ,       <a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>* <font class="keyword">const</font>  target
20300274         , <font class="keyword">const</font> EscapeFlags             escapeFlags = NoEscapes
20400275         , <font class="keyword">const</font> UnRepFlags              unrepFlags = UnRep_Fail
20500276         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
20600277     );
20700278
20800279     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>
20900280     (
21000281         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>             outEncoding
21100282         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>             docVersion
21200283         ,       <a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>* <font class="keyword">const</font>  target
21300284         , <font class="keyword">const</font> EscapeFlags             escapeFlags = NoEscapes
21400285         , <font class="keyword">const</font> UnRepFlags              unrepFlags = UnRep_Fail
21500286         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
21600287     );
21700288
21800289     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>
21900290     (
22000291         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>            outEncoding
22100292         ,       <a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>* <font class="keyword">const</font>  target
22200293         , <font class="keyword">const</font> EscapeFlags             escapeFlags = NoEscapes
22300294         , <font class="keyword">const</font> UnRepFlags              unrepFlags = UnRep_Fail
22400295         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
22500296     );
22600297
22700298     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>
22800299     (
22900300         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>             outEncoding
23000301         ,       <a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>* <font class="keyword">const</font>  target
23100302         , <font class="keyword">const</font> EscapeFlags             escapeFlags = NoEscapes
23200303         , <font class="keyword">const</font> UnRepFlags              unrepFlags = UnRep_Fail
23300304         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
23400305     );
23500306     
23600307     ~<a class="code" href="classXMLFormatter.html">XMLFormatter</a>();
23700309
23800310
23900311     <font class="comment">// -----------------------------------------------------------------------</font>
24000312     <font class="comment">//  Formatting methods</font>
24100313     <font class="comment">// -----------------------------------------------------------------------</font>
24200323 <font class="comment"></font>    <font class="keywordtype">void</font> formatBuf
24300324     (
24400325         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toFormat
24500326         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
24600327         , <font class="keyword">const</font> EscapeFlags     escapeFlags = DefaultEscape
24700328         , <font class="keyword">const</font> UnRepFlags      unrepFlags = DefaultUnRep
24800329     );
24900330
25000334     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <font class="keyword">operator</font>&lt;&lt;
25100335     (
25200336         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toFormat
25300337     );
25400338
25500339     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <font class="keyword">operator</font>&lt;&lt;
25600340     (
25700341         <font class="keyword">const</font>   XMLCh           toFormat
25800342     );
25900343
26000344     <font class="keywordtype">void</font> writeBOM(<font class="keyword">const</font> <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>* <font class="keyword">const</font> toFormat
26100345                 , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>   count);
26200346
26300348
26400349     <font class="comment">// -----------------------------------------------------------------------</font>
26500350     <font class="comment">//  Getter methods</font>
26600351     <font class="comment">// -----------------------------------------------------------------------</font>
26700358 <font class="comment"></font>    <font class="keyword">const</font> XMLCh* getEncodingName() <font class="keyword">const</font>;
26800359
26900363     <font class="keyword">inline</font> <font class="keyword">const</font> <a class="code" href="classXMLTranscoder.html">XMLTranscoder</a>*   getTranscoder() <font class="keyword">const</font>;
27000364
27100366
27200367     <font class="comment">// -----------------------------------------------------------------------</font>
27300368     <font class="comment">//  Setter methods</font>
27400369     <font class="comment">// -----------------------------------------------------------------------</font>
27500375 <font class="comment"></font>    <font class="keywordtype">void</font> setEscapeFlags
27600376     (
27700377         <font class="keyword">const</font>   EscapeFlags     newFlags
27800378     );
27900379
28000383     <font class="keywordtype">void</font> setUnRepFlags
28100384     (
28200385         <font class="keyword">const</font>   UnRepFlags      newFlags
28300386     );
28400387
28500392     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <font class="keyword">operator</font>&lt;&lt;
28600393     (
28700394         <font class="keyword">const</font>   EscapeFlags     newFlags
28800395     );
28900396
29000401     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <font class="keyword">operator</font>&lt;&lt;
29100402     (
29200403         <font class="keyword">const</font>   UnRepFlags      newFlags
29300404     );
29400406
29500407
29600408 <font class="keyword">private</font> :
29700409     <font class="comment">// -----------------------------------------------------------------------</font>
29800410     <font class="comment">//  Unimplemented constructors and operators</font>
29900411     <font class="comment">// -----------------------------------------------------------------------</font>
30000412     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>();
30100413     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>(<font class="keyword">const</font> <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp;);
30200414     <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; operator=(<font class="keyword">const</font> <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp;);
30300415
30400416
30500417     <font class="comment">// -----------------------------------------------------------------------</font>
30600418     <font class="comment">//  Private class constants</font>
30700419     <font class="comment">// -----------------------------------------------------------------------</font>
30800420     <font class="keyword">enum</font> Constants
30900421     {
31000422         kTmpBufSize     = 16 * 1024
31100423     };
31200424
31300425
31400426     <font class="comment">// -----------------------------------------------------------------------</font>
31500427     <font class="comment">//  Private helper methods</font>
31600428     <font class="comment">// -----------------------------------------------------------------------</font>
31700429     <font class="keyword">const</font> <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>* getCharRef(<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> &amp; count,
31800430                               <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*      &amp;ref,
31900431                               <font class="keyword">const</font> XMLCh *  stdRef); 
32000432 
32100433     <font class="keywordtype">void</font> writeCharRef(<font class="keyword">const</font> XMLCh &amp;toWrite);
32200434     <font class="keywordtype">void</font> writeCharRef(<font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> toWrite);
32300435
32400436     <font class="keywordtype">bool</font> inEscapeList(<font class="keyword">const</font> <a class="code" href="classXMLFormatter.html#z279_0">XMLFormatter::EscapeFlags</a> escStyle
32500437                     , <font class="keyword">const</font> XMLCh                     toCheck);
32600438                               
32700439
32800440     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> handleUnEscapedChars(<font class="keyword">const</font> XMLCh *                  srcPtr,
32900441                                       <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>             count,
33000442                                       <font class="keyword">const</font> UnRepFlags               unrepFlags);
33100443
33200444     <font class="keywordtype">void</font> specialFormat
33300445     (
33400446         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toFormat
33500447         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
33600448         , <font class="keyword">const</font> EscapeFlags     escapeFlags
33700449     );
33800450
33900451
34000452     <font class="comment">// -----------------------------------------------------------------------</font>
34100453     <font class="comment">//  Private, non-virtual methods</font>
34200454     <font class="comment">//</font>
34300455     <font class="comment">//  fEscapeFlags</font>
34400456     <font class="comment">//      The escape flags we were told to use in formatting. These are</font>
34500457     <font class="comment">//      defaults set in the ctor, which can be overridden on a particular</font>
34600458     <font class="comment">//      call.</font>
34700459     <font class="comment">//</font>
34800460     <font class="comment">//  fOutEncoding</font>
34900461     <font class="comment">//      This the name of the output encoding. Saved mainly for meaningful</font>
35000462     <font class="comment">//      error messages.</font>
35100463     <font class="comment">//</font>
35200464     <font class="comment">//  fTarget</font>
35300465     <font class="comment">//      This is the target object for the formatting operation.</font>
35400466     <font class="comment">//</font>
35500467     <font class="comment">//  fUnRepFlags</font>
35600468     <font class="comment">//      The unrepresentable flags that indicate how to react when a</font>
35700469     <font class="comment">//      character cannot be represented in the target encoding.</font>
35800470     <font class="comment">//</font>
35900471     <font class="comment">//  fXCoder</font>
36000472     <font class="comment">//      This the transcoder that we will use. It is created using the</font>
36100473     <font class="comment">//      encoding name we were told to use.</font>
36200474     <font class="comment">//</font>
36300475     <font class="comment">//  fTmpBuf</font>
36400476     <font class="comment">//      An output buffer that we use to transcode chars into before we</font>
36500477     <font class="comment">//      send them off to be output.</font>
36600478     <font class="comment">//</font>
36700479     <font class="comment">//  fAposRef</font>
36800480     <font class="comment">//  fAmpRef</font>
36900481     <font class="comment">//  fGTRef</font>
37000482     <font class="comment">//  fLTRef</font>
37100483     <font class="comment">//  fQuoteRef</font>
37200484     <font class="comment">//      These are character refs for the standard char refs, in the</font>
37300485     <font class="comment">//      output encoding. They are faulted in as required, by transcoding</font>
37400486     <font class="comment">//      them from fixed Unicode versions.</font>
37500487     <font class="comment">//</font>
37600488     <font class="comment">//  fIsXML11</font>
37700489     <font class="comment">//      for performance reason, we do not store the actual version string</font>
37800490     <font class="comment">//      and do the string comparison again and again.</font>
37900491     <font class="comment">//</font>
38000492     <font class="comment">// -----------------------------------------------------------------------</font>
38100493     EscapeFlags                 fEscapeFlags;
38200494     XMLCh*                      fOutEncoding;
38300495     <a class="code" href="classXMLFormatTarget.html">XMLFormatTarget</a>*            fTarget;
38400496     UnRepFlags                  fUnRepFlags;
38500497     <a class="code" href="classXMLTranscoder.html">XMLTranscoder</a>*              fXCoder;
38600498     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>                     fTmpBuf[kTmpBufSize + 4];
38700499     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*                    fAposRef;
38800500     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>                fAposLen;
38900501     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*                    fAmpRef;
39000502     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>                fAmpLen;
39100503     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*                    fGTRef;
39200504     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>                fGTLen;
39300505     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*                    fLTRef;
39400506     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>                fLTLen;
39500507     <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>*                    fQuoteRef;
39600508     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>                fQuoteLen;
39700509     <font class="keywordtype">bool</font>                        fIsXML11;
39800510     <a class="code" href="classMemoryManager.html">MemoryManager</a>*              fMemoryManager;
39900511 };
40000512
40100513
402<a name="l00514"></a><a class="code" href="classXMLFormatTarget.html">00514</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a9"></a> XMLFormatTarget : <font class="keyword">public</font> <a class="code" href="classXMemory.html">XMemory</a>
40300515 {
40400516 <font class="keyword">public</font>:
40500517     <font class="comment">// -----------------------------------------------------------------------</font>
40600518     <font class="comment">//  Constructors and Destructor</font>
40700519     <font class="comment">// -----------------------------------------------------------------------</font>
408<a name="l00520"></a><a class="code" href="classXMLFormatTarget.html#a0">00520</a>     <font class="keyword">virtual</font> ~XMLFormatTarget() {}
40900521
41000522
41100523     <font class="comment">// -----------------------------------------------------------------------</font>
41200524     <font class="comment">//  Virtual interface</font>
41300525     <font class="comment">// -----------------------------------------------------------------------</font>
41400526     <font class="keyword">virtual</font> <font class="keywordtype">void</font> writeChars
41500527     (
41600528           <font class="keyword">const</font> <a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>* <font class="keyword">const</font>      toWrite
41700529         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>        count
41800530         ,       <a class="code" href="classXMLFormatter.html">XMLFormatter</a>* <font class="keyword">const</font> formatter
41900531     ) = 0;
42000532
421<a name="l00533"></a><a class="code" href="classXMLFormatTarget.html#a2">00533</a>     <font class="keyword">virtual</font> <font class="keywordtype">void</font> flush() {};
42200534
42300535
42400536 <font class="keyword">protected</font> :
42500537     <font class="comment">// -----------------------------------------------------------------------</font>
42600538     <font class="comment">//  Hidden constructors and operators</font>
42700539     <font class="comment">// -----------------------------------------------------------------------</font>
428<a name="l00540"></a><a class="code" href="classXMLFormatTarget.html#b0">00540</a>     <a class="code" href="XMLFormatter_8hpp.html#a1">XMLFormatTarget</a>() {};
42900541
43000542 <font class="keyword">private</font>:
43100543     <font class="comment">// -----------------------------------------------------------------------</font>
43200544     <font class="comment">//  Unimplemented constructors and operators</font>
43300545     <font class="comment">// -----------------------------------------------------------------------</font>
43400546     <a class="code" href="XMLFormatter_8hpp.html#a1">XMLFormatTarget</a>(<font class="keyword">const</font> XMLFormatTarget&amp;);
43500547     XMLFormatTarget&amp; operator=(<font class="keyword">const</font> XMLFormatTarget&amp;);
43600548 };
43700549
43800550
43900551 <font class="comment">// ---------------------------------------------------------------------------</font>
44000552 <font class="comment">//  XMLFormatter: Getter methods</font>
44100553 <font class="comment">// ---------------------------------------------------------------------------</font>
442<a name="l00554"></a><a class="code" href="classXMLFormatter.html#z282_0">00554</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLFormatter.html#z282_0">XMLFormatter::getEncodingName</a>()<font class="keyword"> const</font>
44300555 <font class="keyword"></font>{
44400556     <font class="keywordflow">return</font> fOutEncoding;
44500557 }
44600558
447<a name="l00559"></a><a class="code" href="classXMLFormatter.html#z282_1">00559</a> <font class="keyword">inline</font> <font class="keyword">const</font> <a class="code" href="classXMLTranscoder.html">XMLTranscoder</a>* <a class="code" href="classXMLFormatter.html#z282_1">XMLFormatter::getTranscoder</a>()<font class="keyword"> const</font>
44800560 <font class="keyword"></font>{
44900561     <font class="keywordflow">return</font> fXCoder;
45000562 }
45100563
45200564 <font class="comment">// ---------------------------------------------------------------------------</font>
45300565 <font class="comment">//  XMLFormatter: Setter methods</font>
45400566 <font class="comment">// ---------------------------------------------------------------------------</font>
455<a name="l00567"></a><a class="code" href="classXMLFormatter.html#z283_0">00567</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classXMLFormatter.html#z283_0">XMLFormatter::setEscapeFlags</a>(<font class="keyword">const</font> EscapeFlags newFlags)
45600568 {
45700569     fEscapeFlags = newFlags;
45800570 }
45900571
460<a name="l00572"></a><a class="code" href="classXMLFormatter.html#z283_1">00572</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classXMLFormatter.html#z283_1">XMLFormatter::setUnRepFlags</a>(<font class="keyword">const</font> UnRepFlags newFlags)
46100573 {
46200574     fUnRepFlags = newFlags;
46300575 }
46400576
46500577
466<a name="l00578"></a><a class="code" href="classXMLFormatter.html#z283_2">00578</a> <font class="keyword">inline</font> <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <a class="code" href="classXMLFormatter.html#z281_1">XMLFormatter::operator&lt;&lt;</a>(<font class="keyword">const</font> EscapeFlags newFlags)
46700579 {
46800580     fEscapeFlags = newFlags;
46900581     <font class="keywordflow">return</font> *<font class="keyword">this</font>;
47000582 }
47100583
472<a name="l00584"></a><a class="code" href="classXMLFormatter.html#z283_3">00584</a> <font class="keyword">inline</font> <a class="code" href="classXMLFormatter.html">XMLFormatter</a>&amp; <a class="code" href="classXMLFormatter.html#z281_1">XMLFormatter::operator&lt;&lt;</a>(<font class="keyword">const</font> UnRepFlags newFlags)
47300585 {
47400586     fUnRepFlags = newFlags;
47500587     <font class="keywordflow">return</font> *<font class="keyword">this</font>;
47600588 }
47700589
47800590 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
47900591
48000592 <font class="preprocessor">#endif</font>
481</pre></div>    </FONT></TD></TR></TABLE><BR>
482</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
483              Copyright &copy; 1994-2004 The Apache Software Foundation.
484              All Rights Reserved.
485            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.