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

Revision 358, 43.7 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>XMLUri.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>XMLUri.hpp</h1><a href="XMLUri_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
4500002 <font class="comment"> * Copyright 2001-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"> * $Id: XMLUri.hpp,v 1.18 2004/09/08 13:56:25 peiyongz Exp $</font>
6200019 <font class="comment"> * $Log: XMLUri.hpp,v $</font>
6300020 <font class="comment"> * Revision 1.18  2004/09/08 13:56:25  peiyongz</font>
6400021 <font class="comment"> * Apache License Version 2.0</font>
6500022 <font class="comment"> *</font>
6600023 <font class="comment"> * Revision 1.17  2004/05/25 18:11:47  peiyongz</font>
6700024 <font class="comment"> * normalizeURI() added</font>
6800025 <font class="comment"> *</font>
6900026 <font class="comment"> * Revision 1.16  2004/01/12 22:01:02  cargilld</font>
7000027 <font class="comment"> * Minor performance change for handling reserved and unreserved characters.</font>
7100028 <font class="comment"> *</font>
7200029 <font class="comment"> * Revision 1.15  2003/12/17 00:18:35  cargilld</font>
7300030 <font class="comment"> * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.</font>
7400031 <font class="comment"> *</font>
7500032 <font class="comment"> * Revision 1.14  2003/12/11 22:21:25  neilg</font>
7600033 <font class="comment"> * fixes for the URI implementation to take registry names into account; much thanks to Michael Glavassevich</font>
7700034 <font class="comment"> *</font>
7800035 <font class="comment"> * Revision 1.13  2003/12/02 17:50:21  neilg</font>
7900036 <font class="comment"> * additional fix for bug 25118; once again, thanks to Jeroen Whitmond</font>
8000037 <font class="comment"> *</font>
8100038 <font class="comment"> * Revision 1.12  2003/10/01 00:20:41  knoaman</font>
8200039 <font class="comment"> * Add a static method to check whether a given string is a valid URI.</font>
8300040 <font class="comment"> *</font>
8400041 <font class="comment"> * Revision 1.11  2003/09/25 22:23:25  peiyongz</font>
8500042 <font class="comment"> * Implementation of Serialization/Deserialization</font>
8600043 <font class="comment"> *</font>
8700044 <font class="comment"> * Revision 1.10  2003/07/25 10:15:16  gareth</font>
8800045 <font class="comment"> * Patch by Michael Glavassevich</font>
8900046 <font class="comment"> *</font>
9000047 <font class="comment"> * The patch fixes Bugzilla #19787, #20006, #20009, #20010 and #20287, and</font>
9100048 <font class="comment"> * several other issues. A summary of the changes is listed below:</font>
9200049 <font class="comment"> *</font>
9300050 <font class="comment"> * 1. Added '[' and ']' to reserved characters as per RFC 2732.</font>
9400051 <font class="comment"> * 2. '[' and ']' added in RFC 2732, are not allowed in path segments, but</font>
9500052 <font class="comment"> * may appear in the opaque part.</font>
9600053 <font class="comment"> * 3. No URI can begin with a ':'.</font>
9700054 <font class="comment"> * 4. URI has no scheme if ':' occurs in a URI after '?' or '#', it's part of</font>
9800055 <font class="comment"> * the query string or fragment.</font>
9900056 <font class="comment"> * 5. Whitespace (even escaped as %20) is not permitted in the authority</font>
10000057 <font class="comment"> * portion of a URI.</font>
10100058 <font class="comment"> * 6. IPv4 addresses must match 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "."</font>
10200059 <font class="comment"> * 1*3DIGIT. Since RFC 2732.</font>
10300060 <font class="comment"> * 7. IPv4 addresses are 32-bit, therefore no segment may be larger than 255.</font>
10400061 <font class="comment"> * This isn't expressed by the grammar.</font>
10500062 <font class="comment"> * 8. Hostnames cannot end with a '-'.</font>
10600063 <font class="comment"> * 9. Labels in a hostname must be 63 bytes or less [RFC 1034].</font>
10700064 <font class="comment"> * 10. Hostnames may be no longer than 255 bytes [RFC 1034]. (That</font>
10800065 <font class="comment"> * restriction was already there. I just moved it inwards.</font>
10900066 <font class="comment"> * 11. Added support for IPv6 references added in RFC 2732. URIs such as</font>
11000067 <font class="comment"> * http://[::ffff:1.2.3.4] are valid. The BNF in RFC 2373 isn't correct. IPv6</font>
11100068 <font class="comment"> * addresses are read according to section 2.2 of RFC 2373.</font>
11200069 <font class="comment"> *</font>
11300070 <font class="comment"> * Revision 1.9  2003/05/16 06:01:53  knoaman</font>
11400071 <font class="comment"> * Partial implementation of the configurable memory manager.</font>
11500072 <font class="comment"> *</font>
11600073 <font class="comment"> * Revision 1.8  2003/05/15 19:07:46  knoaman</font>
11700074 <font class="comment"> * Partial implementation of the configurable memory manager.</font>
11800075 <font class="comment"> *</font>
11900076 <font class="comment"> * Revision 1.7  2003/01/06 19:43:18  tng</font>
12000077 <font class="comment"> * New feature StandardUriConformant to force strict standard uri conformance.</font>
12100078 <font class="comment"> *</font>
12200079 <font class="comment"> * Revision 1.6  2002/11/21 15:42:39  gareth</font>
12300080 <font class="comment"> * Implemented copy constructor and operator =. Patch by Jennifer Schachter.</font>
12400081 <font class="comment"> *</font>
12500082 <font class="comment"> * Revision 1.5  2002/11/04 15:22:05  tng</font>
12600083 <font class="comment"> * C++ Namespace Support.</font>
12700084 <font class="comment"> *</font>
12800085 <font class="comment"> * Revision 1.4  2002/09/23 18:41:00  tng</font>
12900086 <font class="comment"> * DOM L3: Support baseURI.   Add fURIText to XMLUri.   Added by Gareth Reakes and Thomas Ford.</font>
13000087 <font class="comment"> *</font>
13100088 <font class="comment"> * Revision 1.3  2002/08/23 20:45:24  tng</font>
13200089 <font class="comment"> * .Memory leak fix: XMLUri data not deleted if constructor failed.</font>
13300090 <font class="comment"> *</font>
13400091 <font class="comment"> * Revision 1.2  2002/02/20 18:17:02  tng</font>
13500092 <font class="comment"> * [Bug 5977] Warnings on generating apiDocs.</font>
13600093 <font class="comment"> *</font>
13700094 <font class="comment"> * Revision 1.1.1.1  2002/02/01 22:22:17  peiyongz</font>
13800095 <font class="comment"> * sane_include</font>
13900096 <font class="comment"> *</font>
14000097 <font class="comment"> * Revision 1.3  2001/08/29 19:03:03  peiyongz</font>
14100098 <font class="comment"> * Bugzilla# 2816:on AIX 4.2, xlC 3 r ev.1, Compilation error on inline method</font>
14200099 <font class="comment"> *</font>
14300100 <font class="comment"> * Revision 1.2  2001/08/16 14:09:44  peiyongz</font>
14400101 <font class="comment"> * Removed unused ctors and methods</font>
14500102 <font class="comment"> *</font>
14600103 <font class="comment"> * Revision 1.1  2001/08/10 16:23:41  peiyongz</font>
14700104 <font class="comment"> * XMLUri: creation</font>
14800105 <font class="comment"> *</font>
14900106 <font class="comment"> *</font>
15000107 <font class="comment"> */</font>
15100108
15200109 <font class="preprocessor">#if !defined(XMLURI_HPP)</font>
153<a name="l00110"></a><a class="code" href="XMLUri_8hpp.html#a0">00110</a> <font class="preprocessor"></font><font class="preprocessor">#define XMLURI_HPP</font>
15400111 <font class="preprocessor"></font>
15500112 <font class="preprocessor">#include &lt;<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>&gt;</font>
15600113 <font class="preprocessor">#include &lt;<a class="code" href="XMLString_8hpp.html">xercesc/util/XMLString.hpp</a>&gt;</font>
15700114
15800115 <font class="preprocessor">#include &lt;xercesc/internal/XSerializable.hpp&gt;</font>
15900116 <font class="preprocessor">#include &lt;xercesc/framework/XMLBuffer.hpp&gt;</font>
16000117
16100118 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
16200119
16300120 <font class="comment">/*</font>
16400121 <font class="comment"> * This class is a direct port of Java's URI class, to distinguish</font>
16500122 <font class="comment"> * itself from the XMLURL, we use the name XMLUri instead of</font>
16600123 <font class="comment"> * XMLURI.</font>
16700124 <font class="comment"> *</font>
16800125 <font class="comment"> * TODO: how to relate XMLUri and XMLURL since URL is part of URI.</font>
16900126 <font class="comment"> *</font>
17000127 <font class="comment"> */</font>
17100128
172<a name="l00129"></a><a class="code" href="classXMLUri.html">00129</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> <a class="code" href="classXMLUri.html">XMLUri</a> : <font class="keyword">public</font> XSerializable, <font class="keyword">public</font> <a class="code" href="classXMemory.html">XMemory</a>
17300130 {
17400131 <font class="keyword">public</font>:
17500132
17600133     <font class="comment">// -----------------------------------------------------------------------</font>
17700134     <font class="comment">//  Constructors and Destructor</font>
17800135     <font class="comment">// -----------------------------------------------------------------------</font>
17900136
18000165     <a class="code" href="classXMLUri.html">XMLUri</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    uriSpec,
18100166            <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>);
18200167
18300184     <a class="code" href="classXMLUri.html">XMLUri</a>(<font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>* <font class="keyword">const</font>  baseURI
18400185          , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>   uriSpec
18500186          , <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>);
18600187
18700191     <a class="code" href="classXMLUri.html">XMLUri</a>(<font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>&amp; toCopy);
18800192     <a class="code" href="classXMLUri.html">XMLUri</a>&amp; operator=(<font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>&amp; toAssign);
18900193
19000194     <font class="keyword">virtual</font> ~<a class="code" href="classXMLUri.html">XMLUri</a>();
19100195
19200196     <font class="comment">// -----------------------------------------------------------------------</font>
19300197     <font class="comment">//  Getter methods</font>
19400198     <font class="comment">// -----------------------------------------------------------------------</font>
19500204 <font class="comment"></font>    <font class="keyword">const</font> XMLCh* getUriText() <font class="keyword">const</font>;
19600205
19700211      <font class="keyword">const</font> XMLCh* getScheme() <font class="keyword">const</font>;
19800212
19900218      <font class="keyword">const</font> XMLCh* getUserInfo() <font class="keyword">const</font>;
20000219
20100220
20200226      <font class="keyword">const</font> XMLCh* getHost() <font class="keyword">const</font>;
20300227
20400233      <font class="keywordtype">int</font> getPort() <font class="keyword">const</font>;
20500234     
20600240      <font class="keyword">const</font> XMLCh* getRegBasedAuthority() <font class="keyword">const</font>;
20700241
20800248      <font class="keyword">const</font> XMLCh* getPath() <font class="keyword">const</font>;
20900249
21000257      <font class="keyword">const</font> XMLCh* getQueryString() <font class="keyword">const</font>;
21100258
21200266      <font class="keyword">const</font> XMLCh* getFragment() <font class="keyword">const</font>;
21300267
21400268     <font class="comment">// -----------------------------------------------------------------------</font>
21500269     <font class="comment">//  Setter methods</font>
21600270     <font class="comment">// -----------------------------------------------------------------------</font>
21700271
21800279      <font class="keywordtype">void</font> setScheme(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newScheme);
21900280
22000288      <font class="keywordtype">void</font> setUserInfo(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newUserInfo);
22100289
22200300      <font class="keywordtype">void</font> setHost(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newHost);
22300301
22400311      <font class="keywordtype">void</font> setPort(<font class="keywordtype">int</font> newPort);
22500312     
22600321      <font class="keywordtype">void</font> setRegBasedAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newRegAuth);
22700322
22800343      <font class="keywordtype">void</font> setPath(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newPath);
22900344
23000353      <font class="keywordtype">void</font> setQueryString(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newQueryString);
23100354
23200363      <font class="keywordtype">void</font> setFragment(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> newFragment);
23300364
23400365      <font class="comment">// -----------------------------------------------------------------------</font>
23500366     <font class="comment">//  Miscellaneous methods</font>
23600367     <font class="comment">// -----------------------------------------------------------------------</font>
23700368
23800376     <font class="keyword">static</font> <font class="keywordtype">bool</font> isURIString(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uric);
23900377
24000381     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidURI( <font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>* <font class="keyword">const</font> baseURI
24100382                           , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriStr);
24200386     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidURI( <font class="keywordtype">bool</font> haveBaseURI
24300387                           , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriStr);
24400388
24500389
24600390     <font class="keyword">static</font> <font class="keywordtype">void</font> normalizeURI(<font class="keyword">const</font> XMLCh*     <font class="keyword">const</font> systemURI,
24700391                                    XMLBuffer&amp;       normalizedURI);
24800392
24900393     <font class="comment">/***</font>
25000394 <font class="comment">     * Support for Serialization/De-serialization</font>
25100395 <font class="comment">     ***/</font>
25200396     DECL_XSERIALIZABLE(<a class="code" href="classXMLUri.html">XMLUri</a>)
25300397
25400398     <a class="code" href="classXMLUri.html">XMLUri</a>(<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>);
25500399
25600400 <font class="keyword">private</font>:
25700401
25800402     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh MARK_OR_RESERVED_CHARACTERS[];
25900403     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh RESERVED_CHARACTERS[];
26000404     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh MARK_CHARACTERS[];
26100405     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh SCHEME_CHARACTERS[];
26200406     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh USERINFO_CHARACTERS[];
26300407     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh REG_NAME_CHARACTERS[];
26400408     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh PATH_CHARACTERS[];
26500409
26600410     <font class="comment">//helper method for getUriText</font>
26700411     <font class="keywordtype">void</font> buildFullText();
26800412
26900413     <font class="comment">// -----------------------------------------------------------------------</font>
27000414     <font class="comment">//  Private helper methods</font>
27100415     <font class="comment">// -----------------------------------------------------------------------</font>
27200416
27300422     <font class="keyword">static</font> <font class="keywordtype">bool</font> isReservedCharacter(<font class="keyword">const</font> XMLCh theChar);
27400423     
27500429     <font class="keyword">static</font> <font class="keywordtype">bool</font> isPathCharacter(<font class="keyword">const</font> XMLCh theChar);
27600430
27700436     <font class="keyword">static</font> <font class="keywordtype">bool</font> isUnreservedCharacter(<font class="keyword">const</font> XMLCh theChar);
27800437
27900443     <font class="keyword">static</font> <font class="keywordtype">bool</font> isReservedOrUnreservedCharacter(<font class="keyword">const</font> XMLCh theChar);
28000444
28100452     <font class="keyword">static</font> <font class="keywordtype">bool</font> isConformantSchemeName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> scheme);
28200453
28300459     <font class="keyword">static</font> <font class="keywordtype">void</font> isConformantUserInfo(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> userInfo
28400460         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
28500461     
28600469     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidServerBasedAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> host
28700470                                            , <font class="keyword">const</font> <font class="keywordtype">int</font> hostLen
28800471                                            , <font class="keyword">const</font> <font class="keywordtype">int</font> port
28900472                                            , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> userinfo
29000473                                            , <font class="keyword">const</font> <font class="keywordtype">int</font> userLen);
29100474                                           
29200482     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidServerBasedAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> host
29300483                                            , <font class="keyword">const</font> <font class="keywordtype">int</font> port
29400484                                            , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> userinfo
29500485                                            , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
29600486       
29700494     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidRegistryBasedAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> authority
29800495                                              , <font class="keyword">const</font> <font class="keywordtype">int</font> authLen);
29900496
30000504     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidRegistryBasedAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> authority);
30100505
30200523      <font class="keyword">static</font> <font class="keywordtype">bool</font> isWellFormedAddress(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> addr
30300524          , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
30400525     
30500535      <font class="keyword">static</font> <font class="keywordtype">bool</font> isWellFormedIPv4Address(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> addr, <font class="keyword">const</font> <font class="keywordtype">int</font> length);
30600536     
30700550      <font class="keyword">static</font> <font class="keywordtype">bool</font> isWellFormedIPv6Reference(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> addr, <font class="keyword">const</font> <font class="keywordtype">int</font> length);
30800551     
30900567      <font class="keyword">static</font> <font class="keywordtype">int</font> scanHexSequence (<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> addr, <font class="keywordtype">int</font> index, <font class="keywordtype">int</font> end, <font class="keywordtype">int</font>&amp; counter);
31000568
31100576      <font class="keywordtype">bool</font> isGenericURI();
31200577
31300578     <font class="comment">// -----------------------------------------------------------------------</font>
31400579     <font class="comment">//  Miscellaneous methods</font>
31500580     <font class="comment">// -----------------------------------------------------------------------</font>
31600581
31700587      <font class="keywordtype">void</font> initialize(<font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>&amp; toCopy);
31800588
31900603      <font class="keywordtype">void</font> initialize(<font class="keyword">const</font> <a class="code" href="classXMLUri.html">XMLUri</a>* <font class="keyword">const</font> baseURI
32000604                    , <font class="keyword">const</font> XMLCh*  <font class="keyword">const</font> uriSpec);
32100605
32200612      <font class="keywordtype">void</font> initializeScheme(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriSpec);
32300613
32400621      <font class="keywordtype">void</font> initializeAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriSpec);
32500622
32600629      <font class="keywordtype">void</font> initializePath(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriSpec);
32700630
32800635      <font class="keywordtype">void</font> cleanUp();
32900636
33000637     <font class="keyword">static</font> <font class="keywordtype">bool</font> isConformantSchemeName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> scheme,
33100638                                        <font class="keyword">const</font> <font class="keywordtype">int</font> schemeLen);
33200639     <font class="keyword">static</font> <font class="keywordtype">bool</font> processScheme(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriStr, <font class="keywordtype">int</font>&amp; index);
33300640     <font class="keyword">static</font> <font class="keywordtype">bool</font> processAuthority(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> uriStr, <font class="keyword">const</font> <font class="keywordtype">int</font> authLen);
33400641     <font class="keyword">static</font> <font class="keywordtype">bool</font> isWellFormedAddress(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> addr, <font class="keyword">const</font> <font class="keywordtype">int</font> addrLen);
33500642     <font class="keyword">static</font> <font class="keywordtype">bool</font> processPath(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> pathStr, <font class="keyword">const</font> <font class="keywordtype">int</font> pathStrLen,
33600643                             <font class="keyword">const</font> <font class="keywordtype">bool</font> isSchemePresent);
33700644
33800645     <font class="comment">// -----------------------------------------------------------------------</font>
33900646     <font class="comment">//  Data members</font>
34000647     <font class="comment">//</font>
34100648     <font class="comment">//  for all the data member, we own it,</font>
34200649     <font class="comment">//  responsible for the creation and/or deletion for</font>
34300650     <font class="comment">//  the memory allocated.</font>
34400651     <font class="comment">//</font>
34500652     <font class="comment">// -----------------------------------------------------------------------</font>
34600653     XMLCh*          fScheme;
34700654     XMLCh*          fUserInfo;
34800655     XMLCh*          fHost;
34900656     <font class="keywordtype">int</font>             fPort;
35000657     XMLCh*          fRegAuth;
35100658     XMLCh*          fPath;
35200659     XMLCh*          fQueryString;
35300660     XMLCh*          fFragment;
35400661     XMLCh*          fURIText;
35500662     <a class="code" href="classMemoryManager.html">MemoryManager</a>*  fMemoryManager;
35600663 };
35700664
35800665 <font class="comment">// ---------------------------------------------------------------------------</font>
35900666 <font class="comment">//  XMLUri: Getter methods</font>
36000667 <font class="comment">// ---------------------------------------------------------------------------</font>
361<a name="l00668"></a><a class="code" href="classXMLUri.html#a6">00668</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a6">XMLUri::getScheme</a>()<font class="keyword"> const</font>
36200669 <font class="keyword"></font>{
36300670     <font class="keywordflow">return</font> fScheme;
36400671 }
36500672
366<a name="l00673"></a><a class="code" href="classXMLUri.html#a7">00673</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a7">XMLUri::getUserInfo</a>()<font class="keyword"> const</font>
36700674 <font class="keyword"></font>{
36800675     <font class="keywordflow">return</font> fUserInfo;
36900676 }
37000677
371<a name="l00678"></a><a class="code" href="classXMLUri.html#a8">00678</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a8">XMLUri::getHost</a>()<font class="keyword"> const</font>
37200679 <font class="keyword"></font>{
37300680     <font class="keywordflow">return</font> fHost;
37400681 }
37500682
376<a name="l00683"></a><a class="code" href="classXMLUri.html#a9">00683</a> <font class="keyword">inline</font> <font class="keywordtype">int</font> <a class="code" href="classXMLUri.html#a9">XMLUri::getPort</a>()<font class="keyword"> const</font>
37700684 <font class="keyword"></font>{
37800685     <font class="keywordflow">return</font> fPort;
37900686 }
38000687
381<a name="l00688"></a><a class="code" href="classXMLUri.html#a10">00688</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a10">XMLUri::getRegBasedAuthority</a>()<font class="keyword"> const</font>
38200689 <font class="keyword"></font>{
38300690     <font class="keywordflow">return</font> fRegAuth;
38400691 }
38500692
386<a name="l00693"></a><a class="code" href="classXMLUri.html#a11">00693</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a11">XMLUri::getPath</a>()<font class="keyword"> const</font>
38700694 <font class="keyword"></font>{
38800695     <font class="keywordflow">return</font> fPath;
38900696 }
39000697
391<a name="l00698"></a><a class="code" href="classXMLUri.html#a12">00698</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a12">XMLUri::getQueryString</a>()<font class="keyword"> const</font>
39200699 <font class="keyword"></font>{
39300700     <font class="keywordflow">return</font> fQueryString;
39400701 }
39500702
396<a name="l00703"></a><a class="code" href="classXMLUri.html#a13">00703</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a13">XMLUri::getFragment</a>()<font class="keyword"> const</font>
39700704 <font class="keyword"></font>{
39800705     <font class="keywordflow">return</font> fFragment;
39900706 }
40000707
401<a name="l00708"></a><a class="code" href="classXMLUri.html#a5">00708</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLUri.html#a5">XMLUri::getUriText</a>()<font class="keyword"> const</font>
40200709 <font class="keyword"></font>{
40300710     <font class="comment">//</font>
40400711     <font class="comment">//  Fault it in if not already. Since this is a const method and we</font>
40500712     <font class="comment">//  can't use mutable members due the compilers we have to support,</font>
40600713     <font class="comment">//  we have to cast off the constness.</font>
40700714     <font class="comment">//</font>
40800715     <font class="keywordflow">if</font> (!fURIText)
40900716         ((<a class="code" href="classXMLUri.html">XMLUri</a>*)<font class="keyword">this</font>)-&gt;buildFullText();
41000717
41100718     <font class="keywordflow">return</font> fURIText;
41200719 }
41300720
41400721 <font class="comment">// ---------------------------------------------------------------------------</font>
41500722 <font class="comment">//  XMLUri: Helper methods</font>
41600723 <font class="comment">// ---------------------------------------------------------------------------</font>
41700724 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLUri::isReservedOrUnreservedCharacter(<font class="keyword">const</font> XMLCh theChar)
41800725 {
41900726    <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z519_17">XMLString::isAlphaNum</a>(theChar) ||
42000727            <a class="code" href="classXMLString.html#z515_0">XMLString::indexOf</a>(MARK_OR_RESERVED_CHARACTERS, theChar) != -1);
42100728 }
42200729
42300730 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLUri::isReservedCharacter(<font class="keyword">const</font> XMLCh theChar)
42400731 {
42500732     <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z515_0">XMLString::indexOf</a>(RESERVED_CHARACTERS, theChar) != -1);
42600733 }
42700734
42800735 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLUri::isPathCharacter(<font class="keyword">const</font> XMLCh theChar)
42900736 {
43000737     <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z515_0">XMLString::indexOf</a>(PATH_CHARACTERS, theChar) != -1);
43100738 }
43200739
43300740 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLUri::isUnreservedCharacter(<font class="keyword">const</font> XMLCh theChar)
43400741 {
43500742     <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z519_17">XMLString::isAlphaNum</a>(theChar) ||
43600743             <a class="code" href="classXMLString.html#z515_0">XMLString::indexOf</a>(MARK_CHARACTERS, theChar) != -1);
43700744 }
43800745
43900746 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
44000747
44100748 <font class="preprocessor">#endif</font>
442</pre></div>    </FONT></TD></TR></TABLE><BR>
443</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>
444              Copyright &copy; 1994-2004 The Apache Software Foundation.
445              All Rights Reserved.
446            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.