Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 3edf0460bd0634d0868f9e30d85505ae > files > 347

xerces-c-manual-1.5.2-1mdk.i586.rpm

<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>XMLException.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>
  <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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <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>
  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-8');" onMouseOver="rolloverOn('side-ext-8');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-8" onLoad="rolloverLoad('side-ext-8','../graphics/ext-8-label-2.jpg','../graphics/ext-8-label-3.jpg');" src="../graphics/ext-8-label-3.jpg" vspace="0" width="120"></A><BR>
  <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>
  <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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <IMG alt="API Docs" border="0" height="12" hspace="0" src="../graphics/api-label-1.jpg" vspace="0" width="120"><BR>

  <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>

  <A href="../schema.html" onMouseOut="rolloverOff('side-schema');" onMouseOver="rolloverOn('side-schema');"><IMG alt="Schema" border="0" height="12" hspace="0" name="side-schema" onLoad="rolloverLoad('side-schema','../graphics/schema-label-2.jpg','../graphics/schema-label-3.jpg');" src="../graphics/schema-label-3.jpg" vspace="0" width="120"></A><BR>
  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <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>

  <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>
  <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration" 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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Releases" 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>
  <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>
  <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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
  <A href="../y2k.html" onMouseOut="rolloverOff('side-y2k');" onMouseOver="rolloverOn('side-y2k');"><IMG alt="Y2K Compliance" border="0" height="12" hspace="0" name="side-y2k" onLoad="rolloverLoad('side-y2k','../graphics/y2k-label-2.jpg','../graphics/y2k-label-3.jpg');" src="../graphics/y2k-label-3.jpg" vspace="0" width="120"></A><BR>
  
  <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>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-50');" onMouseOver="rolloverOn('side-ext-50');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-50" onLoad="rolloverLoad('side-ext-50','../graphics/ext-50-label-2.jpg','../graphics/ext-50-label-3.jpg');" src="../graphics/ext-50-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-52');" onMouseOver="rolloverOn('side-ext-52');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-52" onLoad="rolloverLoad('side-ext-52','../graphics/ext-52-label-2.jpg','../graphics/ext-52-label-3.jpg');" src="../graphics/ext-52-label-3.jpg" vspace="0" width="120"></A><BR>

<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>
    <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">

	    <P>
<!-- Generated by Doxygen 1.2.4 on Fri Oct 26 10:32:19 2001 -->
<center>
<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>
<hr><h1>XMLException.hpp</h1><a href="XMLException_hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * The Apache Software License, Version 1.1</font>
00003 <font class="comment"> * </font>
00004 <font class="comment"> * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights</font>
00005 <font class="comment"> * reserved.</font>
00006 <font class="comment"> * </font>
00007 <font class="comment"> * Redistribution and use in source and binary forms, with or without</font>
00008 <font class="comment"> * modification, are permitted provided that the following conditions</font>
00009 <font class="comment"> * are met:</font>
00010 <font class="comment"> * </font>
00011 <font class="comment"> * 1. Redistributions of source code must retain the above copyright</font>
00012 <font class="comment"> *    notice, this list of conditions and the following disclaimer. </font>
00013 <font class="comment"> * </font>
00014 <font class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</font>
00015 <font class="comment"> *    notice, this list of conditions and the following disclaimer in</font>
00016 <font class="comment"> *    the documentation and/or other materials provided with the</font>
00017 <font class="comment"> *    distribution.</font>
00018 <font class="comment"> * </font>
00019 <font class="comment"> * 3. The end-user documentation included with the redistribution,</font>
00020 <font class="comment"> *    if any, must include the following acknowledgment:  </font>
00021 <font class="comment"> *       "This product includes software developed by the</font>
00022 <font class="comment"> *        Apache Software Foundation (http://www.apache.org/)."</font>
00023 <font class="comment"> *    Alternately, this acknowledgment may appear in the software itself,</font>
00024 <font class="comment"> *    if and wherever such third-party acknowledgments normally appear.</font>
00025 <font class="comment"> * </font>
00026 <font class="comment"> * 4. The names "Xerces" and "Apache Software Foundation" must</font>
00027 <font class="comment"> *    not be used to endorse or promote products derived from this</font>
00028 <font class="comment"> *    software without prior written permission. For written </font>
00029 <font class="comment"> *    permission, please contact apache\@apache.org.</font>
00030 <font class="comment"> * </font>
00031 <font class="comment"> * 5. Products derived from this software may not be called "Apache",</font>
00032 <font class="comment"> *    nor may "Apache" appear in their name, without prior written</font>
00033 <font class="comment"> *    permission of the Apache Software Foundation.</font>
00034 <font class="comment"> * </font>
00035 <font class="comment"> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font>
00036 <font class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font>
00037 <font class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font>
00038 <font class="comment"> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font>
00039 <font class="comment"> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font>
00040 <font class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font>
00041 <font class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font>
00042 <font class="comment"> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font>
00043 <font class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font>
00044 <font class="comment"> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font>
00045 <font class="comment"> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font>
00046 <font class="comment"> * SUCH DAMAGE.</font>
00047 <font class="comment"> * ====================================================================</font>
00048 <font class="comment"> * </font>
00049 <font class="comment"> * This software consists of voluntary contributions made by many</font>
00050 <font class="comment"> * individuals on behalf of the Apache Software Foundation, and was</font>
00051 <font class="comment"> * originally based on software copyright (c) 1999, International</font>
00052 <font class="comment"> * Business Machines, Inc., http://www.ibm.com .  For more information</font>
00053 <font class="comment"> * on the Apache Software Foundation, please see</font>
00054 <font class="comment"> * &lt;http://www.apache.org/&gt;.</font>
00055 <font class="comment"> */</font>
00056 
00057 <font class="comment">/*</font>
00058 <font class="comment"> * $Id: XMLException.hpp,v 1.5 2000/05/04 02:43:45 aruna1 Exp $</font>
00059 <font class="comment"> */</font>
00060 
00061 <font class="preprocessor">#if !defined(EXCEPTION_HPP)</font>
<a name="l00062"></a><a class="code" href="XMLException_hpp.html#a0">00062</a> <font class="preprocessor"></font><font class="preprocessor">#define EXCEPTION_HPP</font>
00063 <font class="preprocessor"></font>
00064 <font class="preprocessor">#include &lt;<a class="code" href="XercesDefs_hpp.html">util/XercesDefs.hpp</a>&gt;</font>
00065 <font class="preprocessor">#include &lt;util/XMLExceptMsgs.hpp&gt;</font>
00066 <font class="preprocessor">#include &lt;<a class="code" href="XMLUni_hpp.html">util/XMLUni.hpp</a>&gt;</font>
00067 
00068 
00069 <font class="comment">// ---------------------------------------------------------------------------</font>
00070 <font class="comment">//  This is the base class from which all the XML parser exceptions are</font>
00071 <font class="comment">//  derived. The virtual interface is very simple and most of the functionality</font>
00072 <font class="comment">//  is in this class.</font>
00073 <font class="comment">//</font>
00074 <font class="comment">//  Because all derivatives are EXACTLY the same except for the static</font>
00075 <font class="comment">//  string that is used to hold the name of the class, a macro is provided</font>
00076 <font class="comment">//  below via which they are all created.</font>
00077 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00078"></a><a class="code" href="class_XMLException.html">00078</a> <font class="keyword">class </font> <a class="code" href="class_XMLException.html">XMLException</a>
00079 {
00080 <font class="keyword">public</font>:
00081     <font class="comment">// -----------------------------------------------------------------------</font>
00082     <font class="comment">//  Virtual Destructor</font>
00083     <font class="comment">// -----------------------------------------------------------------------</font>
00084     <font class="keyword">virtual</font> <a class="code" href="class_XMLException.html#a0">~XMLException</a>();
00085 
00086 
00087     <font class="comment">// -----------------------------------------------------------------------</font>
00088     <font class="comment">//  The XML exception virtual interface</font>
00089     <font class="comment">// -----------------------------------------------------------------------</font>
00090     <font class="keyword">virtual</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLException.html#a1">getType</a>() <font class="keyword">const</font> = 0;
00091 
00092 
00093     <font class="comment">// -----------------------------------------------------------------------</font>
00094     <font class="comment">//  Getter methods</font>
00095     <font class="comment">// -----------------------------------------------------------------------</font>
00096     XMLExcepts::Codes <a class="code" href="class_XMLException.html#a2">getCode</a>() <font class="keyword">const</font>;
00097     <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLException.html#a3">getMessage</a>() <font class="keyword">const</font>;
00098     <font class="keyword">const</font> <font class="keywordtype">char</font>* <a class="code" href="class_XMLException.html#a4">getSrcFile</a>() <font class="keyword">const</font>;
00099     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="class_XMLException.html#a5">getSrcLine</a>() <font class="keyword">const</font>;
00100 
00101 
00102     <font class="comment">// -----------------------------------------------------------------------</font>
00103     <font class="comment">//  Setter methods</font>
00104     <font class="comment">// -----------------------------------------------------------------------</font>
00105     <font class="keywordtype">void</font> <a class="code" href="class_XMLException.html#a6">setPosition</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> file, <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> line);
00106 
00107 
00108     <font class="comment">// -----------------------------------------------------------------------</font>
00109     <font class="comment">//  Hidden constructors and operators</font>
00110     <font class="comment">//</font>
00111     <font class="comment">//  NOTE:   Technically, these should be protected, since this is a</font>
00112     <font class="comment">//          base class that is never used directly. However, VC++ 6.0 will</font>
00113     <font class="comment">//          fail to catch via a reference to base class if the ctors are</font>
00114     <font class="comment">//          not public!! This seems to have been caused by the install</font>
00115     <font class="comment">//          of IE 5.0.</font>
00116     <font class="comment">// -----------------------------------------------------------------------</font>
00117     <a class="code" href="class_XMLException.html#a7">XMLException</a>();
00118     <a class="code" href="class_XMLException.html#a7">XMLException</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> srcFile, <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> srcLine);
00119     <a class="code" href="class_XMLException.html#a7">XMLException</a>(<font class="keyword">const</font> <a class="code" href="class_XMLException.html">XMLException</a>&amp; toCopy);
00120     <font class="keywordtype">void</font> <a class="code" href="class_XMLException.html#a10">operator=</a>(<font class="keyword">const</font> <a class="code" href="class_XMLException.html">XMLException</a>&amp; toAssign);
00121 
00122 
00123 <font class="keyword">protected</font> :
00124     <font class="comment">// -----------------------------------------------------------------------</font>
00125     <font class="comment">//  Protected methods</font>
00126     <font class="comment">// -----------------------------------------------------------------------</font>
00127     <font class="keywordtype">void</font> loadExceptText
00128     (
00129         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
00130     );
00131     <font class="keywordtype">void</font> loadExceptText
00132     (
00133         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
00134         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text1
00135         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text2 = 0
00136         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text3 = 0
00137         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text4 = 0
00138     );
00139     <font class="keywordtype">void</font> loadExceptText
00140     (
00141         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
00142         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text1
00143         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text2 = 0
00144         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text3 = 0
00145         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text4 = 0
00146     );
00147 
00148 
00149 <font class="keyword">private</font> :
00150     <font class="comment">// -----------------------------------------------------------------------</font>
00151     <font class="comment">//  Data members</font>
00152     <font class="comment">//</font>
00153     <font class="comment">//  fCode</font>
00154     <font class="comment">//      The error code that this exception represents.</font>
00155     <font class="comment">//</font>
00156     <font class="comment">//  fSrcFile</font>
00157     <font class="comment">//  fSrcLine</font>
00158     <font class="comment">//      These are the file and line information from the source where the</font>
00159     <font class="comment">//      exception was thrown from.</font>
00160     <font class="comment">//</font>
00161     <font class="comment">//  fMsg</font>
00162     <font class="comment">//      The loaded message text for this exception.</font>
00163     <font class="comment">// -----------------------------------------------------------------------</font>
00164     XMLExcepts::Codes fCode;
00165     <font class="keywordtype">char</font>*               fSrcFile;
00166     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>        fSrcLine;
00167     XMLCh*              fMsg;
00168 };
00169 
00170 <font class="comment">// ---------------------------------------------------------------------------</font>
00171 <font class="comment">//  XMLException: Getter methods</font>
00172 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00173"></a><a class="code" href="class_XMLException.html#a2">00173</a> <font class="keyword">inline</font> XMLExcepts::Codes <a class="code" href="class_XMLException.html#a2">XMLException::getCode</a>()<font class="keyword"> const</font>
00174 <font class="keyword"></font>{
00175     <font class="keywordflow">return</font> fCode;
00176 }
00177 
<a name="l00178"></a><a class="code" href="class_XMLException.html#a3">00178</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="class_XMLException.html#a3">XMLException::getMessage</a>()<font class="keyword"> const</font>
00179 <font class="keyword"></font>{
00180     <font class="keywordflow">return</font> fMsg;
00181 }
00182 
<a name="l00183"></a><a class="code" href="class_XMLException.html#a4">00183</a> <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font>* <a class="code" href="class_XMLException.html#a4">XMLException::getSrcFile</a>()<font class="keyword"> const</font>
00184 <font class="keyword"></font>{
00185     <font class="keywordflow">if</font> (!fSrcFile)
00186         <font class="keywordflow">return</font> <font class="stringliteral">""</font>;
00187     <font class="keywordflow">return</font> fSrcFile;
00188 }
00189 
<a name="l00190"></a><a class="code" href="class_XMLException.html#a5">00190</a> <font class="keyword">inline</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="class_XMLException.html#a5">XMLException::getSrcLine</a>()<font class="keyword"> const</font>
00191 <font class="keyword"></font>{
00192     <font class="keywordflow">return</font> fSrcLine;
00193 }
00194 
00195 
00196 <font class="comment">// ---------------------------------------------------------------------------</font>
00197 <font class="comment">//  This macro is used to create derived classes. They are all identical</font>
00198 <font class="comment">//  except the name of the exception, so it crazy to type them in over and</font>
00199 <font class="comment">//  over.</font>
00200 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00201"></a><a class="code" href="XMLException_hpp.html#a1">00201</a> <font class="preprocessor">#define MakeXMLException(theType, expKeyword) \</font>
00202 <font class="preprocessor">class expKeyword theType : public XMLException \</font>
00203 <font class="preprocessor">{ \</font>
00204 <font class="preprocessor">public: \</font>
00205 <font class="preprocessor"> \</font>
00206 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
00207 <font class="preprocessor">            , const unsigned int        srcLine \</font>
00208 <font class="preprocessor">            , const XMLExcepts::Codes toThrow) : \</font>
00209 <font class="preprocessor">        XMLException(srcFile, srcLine) \</font>
00210 <font class="preprocessor">    { \</font>
00211 <font class="preprocessor">        loadExceptText(toThrow); \</font>
00212 <font class="preprocessor">    } \</font>
00213 <font class="preprocessor"> \</font>
00214 <font class="preprocessor">    theType(const theType&amp; toCopy) : \</font>
00215 <font class="preprocessor"> \</font>
00216 <font class="preprocessor">        XMLException(toCopy) \</font>
00217 <font class="preprocessor">    { \</font>
00218 <font class="preprocessor">    } \</font>
00219 <font class="preprocessor">  \</font>
00220 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
00221 <font class="preprocessor">            , const unsigned int        srcLine \</font>
00222 <font class="preprocessor">            , const XMLExcepts::Codes toThrow \</font>
00223 <font class="preprocessor">            , const XMLCh* const        text1 \</font>
00224 <font class="preprocessor">            , const XMLCh* const        text2 = 0 \</font>
00225 <font class="preprocessor">            , const XMLCh* const        text3 = 0 \</font>
00226 <font class="preprocessor">            , const XMLCh* const        text4 = 0) : \</font>
00227 <font class="preprocessor">        XMLException(srcFile, srcLine) \</font>
00228 <font class="preprocessor">    { \</font>
00229 <font class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</font>
00230 <font class="preprocessor">    } \</font>
00231 <font class="preprocessor"> \</font>
00232 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
00233 <font class="preprocessor">            , const unsigned int        srcLine \</font>
00234 <font class="preprocessor">            , const XMLExcepts::Codes toThrow \</font>
00235 <font class="preprocessor">            , const char* const         text1 \</font>
00236 <font class="preprocessor">            , const char* const         text2 = 0 \</font>
00237 <font class="preprocessor">            , const char* const         text3 = 0 \</font>
00238 <font class="preprocessor">            , const char* const         text4 = 0) : \</font>
00239 <font class="preprocessor">        XMLException(srcFile, srcLine) \</font>
00240 <font class="preprocessor">    { \</font>
00241 <font class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</font>
00242 <font class="preprocessor">    } \</font>
00243 <font class="preprocessor"> \</font>
00244 <font class="preprocessor">    virtual ~theType() {} \</font>
00245 <font class="preprocessor"> \</font>
00246 <font class="preprocessor">    theType&amp; operator=(const theType&amp; toAssign) \</font>
00247 <font class="preprocessor">    { \</font>
00248 <font class="preprocessor">        XMLException::operator=(toAssign); \</font>
00249 <font class="preprocessor">        return *this; \</font>
00250 <font class="preprocessor">    } \</font>
00251 <font class="preprocessor"> \</font>
00252 <font class="preprocessor">    virtual XMLException* duplicate() const \</font>
00253 <font class="preprocessor">    { \</font>
00254 <font class="preprocessor">        return new theType(*this); \</font>
00255 <font class="preprocessor">    } \</font>
00256 <font class="preprocessor"> \</font>
00257 <font class="preprocessor">    virtual const XMLCh* getType() const \</font>
00258 <font class="preprocessor">    { \</font>
00259 <font class="preprocessor">        return XMLUni::fg##theType##_Name; \</font>
00260 <font class="preprocessor">    } \</font>
00261 <font class="preprocessor"> \</font>
00262 <font class="preprocessor">private : \</font>
00263 <font class="preprocessor">    theType(); \</font>
00264 <font class="preprocessor">};</font>
00265 <font class="preprocessor"></font>
00266 
00267 
00268 <font class="comment">// ---------------------------------------------------------------------------</font>
00269 <font class="comment">//  This macros is used to actually throw an exception. It is used in order</font>
00270 <font class="comment">//  to make sure that source code line/col info is stored correctly, and to</font>
00271 <font class="comment">//  give flexibility for other stuff in the future.</font>
00272 <font class="comment">// ---------------------------------------------------------------------------</font>
<a name="l00273"></a><a class="code" href="XMLException_hpp.html#a2">00273</a> <font class="preprocessor">#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)</font>
00274 <font class="preprocessor"></font>
<a name="l00275"></a><a class="code" href="XMLException_hpp.html#a3">00275</a> <font class="preprocessor">#define ThrowXML1(type,code,p1) throw type(__FILE__, __LINE__, code, p1)</font>
00276 <font class="preprocessor"></font>
<a name="l00277"></a><a class="code" href="XMLException_hpp.html#a4">00277</a> <font class="preprocessor">#define ThrowXML2(type,code,p1,p2) throw type(__FILE__, __LINE__, code, p1, p2)</font>
00278 <font class="preprocessor"></font>
<a name="l00279"></a><a class="code" href="XMLException_hpp.html#a5">00279</a> <font class="preprocessor">#define ThrowXML3(type,code,p1,p2,p3) throw type(__FILE__, __LINE__, code, p1, p2, p3)</font>
00280 <font class="preprocessor"></font>
<a name="l00281"></a><a class="code" href="XMLException_hpp.html#a6">00281</a> <font class="preprocessor">#define ThrowXML4(type,code,p1,p2,p3,p4) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4)</font>
00282 <font class="preprocessor"></font>
00283 <font class="preprocessor">#endif</font>
</font></div></pre>    </FONT></TD></TR></TABLE><BR>
</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"></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
              Copyright &copy; 2000 The Apache Software Foundation.
              All Rights Reserved.
            </I></FONT></TD></TR></TABLE></BODY></HTML>