<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Xerces-C++: XMLURL.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="../charter.html" onMouseOut="rolloverOff('side-charter');" onMouseOver="rolloverOn('side-charter');"><IMG alt="Charter" border="0" height="12" hspace="0" name="side-charter" onLoad="rolloverLoad('side-charter','../graphics/charter-label-2.jpg','../graphics/charter-label-3.jpg');" src="../graphics/charter-label-3.jpg" vspace="0" width="120"></A><BR> <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> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><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="http://xml.apache.org/xerces-c/download.cgi" onMouseOut="rolloverOff('side-ext-20');" onMouseOver="rolloverOn('side-ext-20');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-20" onLoad="rolloverLoad('side-ext-20','../graphics/ext-20-label-2.jpg','../graphics/ext-20-label-3.jpg');" src="../graphics/ext-20-label-3.jpg" vspace="0" width="120"></A><BR> <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build Instructions" 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> <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="../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="../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> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-70');" onMouseOver="rolloverOn('side-ext-70');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-70" onLoad="rolloverLoad('side-ext-70','../graphics/ext-70-label-2.jpg','../graphics/ext-70-label-3.jpg');" src="../graphics/ext-70-label-3.jpg" vspace="0" width="120"></A><BR> <IMG alt="Programming" border="0" height="12" hspace="0" src="../graphics/program-label-1.jpg" vspace="0" width="120"><BR> <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> <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><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> <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="../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://svn.apache.org/viewcvs.cgi/xerces/?root=Apache-SVN" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Source Repository" 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> <A href="http://marc.theaimsgroup.com/?l=xerces-c-users" onMouseOut="rolloverOff('side-ext-104');" onMouseOver="rolloverOn('side-ext-104');"><IMG alt="User Mail Archive" border="0" height="12" hspace="0" name="side-ext-104" onLoad="rolloverLoad('side-ext-104','../graphics/ext-104-label-2.jpg','../graphics/ext-104-label-3.jpg');" src="../graphics/ext-104-label-3.jpg" vspace="0" width="120"></A><BR> <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-106');" onMouseOver="rolloverOn('side-ext-106');"><IMG alt="Devel Mail Archive" border="0" height="12" hspace="0" name="side-ext-106" onLoad="rolloverLoad('side-ext-106','../graphics/ext-106-label-2.jpg','../graphics/ext-106-label-3.jpg');" src="../graphics/ext-106-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"> </TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif"> <P> <!-- Generated by Doxygen 1.4.1 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <div class="nav"> <a class="el" href="dir_000000.html">src</a> / <a class="el" href="dir_000001.html">xercesc</a> / <a class="el" href="dir_000003.html">util</a></div> <h1>XMLURL.hpp</h1><a href="XMLURL_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span> 00002 <span class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</span> 00003 <span class="comment"> * </span> 00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> 00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> 00006 <span class="comment"> * You may obtain a copy of the License at</span> 00007 <span class="comment"> * </span> 00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> 00009 <span class="comment"> * </span> 00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> 00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> 00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> 00013 <span class="comment"> * See the License for the specific language governing permissions and</span> 00014 <span class="comment"> * limitations under the License.</span> 00015 <span class="comment"> */</span> 00016 00017 <span class="comment">/*</span> 00018 <span class="comment"> * $Id: XMLURL.hpp 191709 2005-06-21 19:02:38Z cargilld $</span> 00019 <span class="comment"> */</span> 00020 00021 <span class="preprocessor">#if !defined(XMLURL_HPP)</span> <a name="l00022"></a><a class="code" href="XMLURL_8hpp.html#a0">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define XMLURL_HPP</span> 00023 <span class="preprocessor"></span> 00024 <span class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></span> 00025 00026 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_BEGIN</a> 00027 00028 <span class="keyword">class </span><a class="code" href="classBinInputStream.html">BinInputStream</a>; 00029 00030 <span class="comment">//</span> 00031 <span class="comment">// This class supports file, http, and ftp style URLs. All others are</span> 00032 <span class="comment">// rejected</span> 00033 <span class="comment">//</span> <a name="l00034"></a><a class="code" href="classXMLURL.html">00034</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a9"></a> XMLURL : <span class="keyword">public</span> <a class="code" href="classXMemory.html">XMemory</a> 00035 { 00036 <span class="keyword">public</span>: 00037 <span class="comment">// -----------------------------------------------------------------------</span> 00038 <span class="comment">// Class types</span> 00039 <span class="comment">//</span> 00040 <span class="comment">// And they must remain in this order because they are indexes into an</span> 00041 <span class="comment">// array internally!</span> 00042 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00043"></a><a class="code" href="classXMLURL.html#w5">00043</a> <span class="keyword">enum</span> Protocols 00044 { 00045 File 00046 , HTTP 00047 , FTP 00048 00049 , Protocols_Count 00050 , Unknown 00051 }; 00052 00053 00054 <span class="comment">// -----------------------------------------------------------------------</span> 00055 <span class="comment">// Public static methods</span> 00056 <span class="comment">// -----------------------------------------------------------------------</span> 00057 <span class="keyword">static</span> Protocols lookupByName(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> protoName); 00058 <span class="keyword">static</span> <span class="keywordtype">bool</span> parse(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> urlText, XMLURL& xmlURL); 00059 00060 <span class="comment">// -----------------------------------------------------------------------</span> 00061 <span class="comment">// Constructors and Destructor</span> 00062 <span class="comment">// -----------------------------------------------------------------------</span> 00063 XMLURL(<a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager); 00064 XMLURL 00065 ( 00066 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseURL 00067 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> relativeURL 00068 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager 00069 ); 00070 XMLURL 00071 ( 00072 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseURL 00073 , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> relativeURL 00074 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager 00075 ); 00076 XMLURL 00077 ( 00078 <span class="keyword">const</span> XMLURL& baseURL 00079 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> relativeURL 00080 ); 00081 XMLURL 00082 ( 00083 <span class="keyword">const</span> XMLURL& baseURL 00084 , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> relativeURL 00085 ); 00086 XMLURL 00087 ( 00088 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> urlText 00089 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager 00090 ); 00091 XMLURL 00092 ( 00093 <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> urlText 00094 , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> manager = XMLPlatformUtils::fgMemoryManager 00095 ); 00096 XMLURL(<span class="keyword">const</span> XMLURL& toCopy); 00097 <span class="keyword">virtual</span> ~XMLURL(); 00098 00099 00100 <span class="comment">// -----------------------------------------------------------------------</span> 00101 <span class="comment">// Operators</span> 00102 <span class="comment">// -----------------------------------------------------------------------</span> 00103 XMLURL& operator=(<span class="keyword">const</span> XMLURL& toAssign); 00104 <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> XMLURL& toCompare) <span class="keyword">const</span>; 00105 <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> XMLURL& toCompare) <span class="keyword">const</span>; 00106 00107 00108 <span class="comment">// -----------------------------------------------------------------------</span> 00109 <span class="comment">// Getter methods</span> 00110 <span class="comment">// -----------------------------------------------------------------------</span> 00111 <span class="keyword">const</span> XMLCh* getFragment() <span class="keyword">const</span>; 00112 <span class="keyword">const</span> XMLCh* getHost() <span class="keyword">const</span>; 00113 <span class="keyword">const</span> XMLCh* getPassword() <span class="keyword">const</span>; 00114 <span class="keyword">const</span> XMLCh* getPath() <span class="keyword">const</span>; 00115 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortNum() <span class="keyword">const</span>; 00116 Protocols getProtocol() <span class="keyword">const</span>; 00117 <span class="keyword">const</span> XMLCh* getProtocolName() <span class="keyword">const</span>; 00118 <span class="keyword">const</span> XMLCh* getQuery() <span class="keyword">const</span>; 00119 <span class="keyword">const</span> XMLCh* getURLText() <span class="keyword">const</span>; 00120 <span class="keyword">const</span> XMLCh* getUser() <span class="keyword">const</span>; 00121 <a class="code" href="classMemoryManager.html">MemoryManager</a>* getMemoryManager() <span class="keyword">const</span>; 00122 00123 00124 <span class="comment">// -----------------------------------------------------------------------</span> 00125 <span class="comment">// Setter methods</span> 00126 <span class="comment">// -----------------------------------------------------------------------</span> 00127 <span class="keywordtype">void</span> setURL(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> urlText); 00128 <span class="keywordtype">void</span> setURL 00129 ( 00130 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseURL 00131 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> relativeURL 00132 ); 00133 <span class="keywordtype">void</span> setURL 00134 ( 00135 <span class="keyword">const</span> XMLURL& baseURL 00136 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> relativeURL 00137 ); 00138 <span class="comment">// a version of setURL that doesn't throw malformed url exceptions</span> 00139 <span class="keywordtype">bool</span> setURL( 00140 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseURL 00141 , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> relativeURL 00142 , XMLURL& xmlURL); 00143 <span class="comment">// -----------------------------------------------------------------------</span> 00144 <span class="comment">// Miscellaneous methods</span> 00145 <span class="comment">// -----------------------------------------------------------------------</span> 00146 <span class="keywordtype">bool</span> isRelative() <span class="keyword">const</span>; 00147 <span class="keywordtype">bool</span> hasInvalidChar() <span class="keyword">const</span>; 00148 <a class="code" href="classBinInputStream.html">BinInputStream</a>* makeNewStream() <span class="keyword">const</span>; 00149 <span class="keywordtype">void</span> makeRelativeTo(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> baseURLText); 00150 <span class="keywordtype">void</span> makeRelativeTo(<span class="keyword">const</span> XMLURL& baseURL); 00151 00152 00153 <span class="keyword">private</span>: 00154 <span class="comment">// -----------------------------------------------------------------------</span> 00155 <span class="comment">// Private helper methods</span> 00156 <span class="comment">// -----------------------------------------------------------------------</span> 00157 <span class="keywordtype">void</span> buildFullText(); 00158 <span class="keywordtype">void</span> cleanUp(); 00159 <span class="keywordtype">bool</span> conglomerateWithBase(<span class="keyword">const</span> XMLURL& baseURL, <span class="keywordtype">bool</span> useExceptions=<span class="keyword">true</span>); 00160 <span class="keywordtype">void</span> parse 00161 ( 00162 <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> urlText 00163 ); 00164 00165 00166 <span class="comment">// -----------------------------------------------------------------------</span> 00167 <span class="comment">// Data members</span> 00168 <span class="comment">//</span> 00169 <span class="comment">// fFragment</span> 00170 <span class="comment">// The fragment part of the URL, if any. If none, its a null.</span> 00171 <span class="comment">//</span> 00172 <span class="comment">// fHost</span> 00173 <span class="comment">// The host part of the URL that was parsed out. This one will often</span> 00174 <span class="comment">// be null (or "localhost", which also means the current machine.)</span> 00175 <span class="comment">//</span> 00176 <span class="comment">// fPassword</span> 00177 <span class="comment">// The password found, if any. If none then its a null.</span> 00178 <span class="comment">//</span> 00179 <span class="comment">// fPath</span> 00180 <span class="comment">// The path part of the URL that was parsed out, if any. If none,</span> 00181 <span class="comment">// then its a null.</span> 00182 <span class="comment">//</span> 00183 <span class="comment">// fPortNum</span> 00184 <span class="comment">// The port that was indicated in the URL. If no port was provided</span> 00185 <span class="comment">// explicitly, then its left zero.</span> 00186 <span class="comment">//</span> 00187 <span class="comment">// fProtocol</span> 00188 <span class="comment">// Indicates the type of the URL's source. The text of the prefix</span> 00189 <span class="comment">// can be gotten from this.</span> 00190 <span class="comment">//</span> 00191 <span class="comment">// fQuery</span> 00192 <span class="comment">// The query part of the URL, if any. If none, then its a null.</span> 00193 <span class="comment">//</span> 00194 <span class="comment">// fUser</span> 00195 <span class="comment">// The username found, if any. If none, then its a null.</span> 00196 <span class="comment">//</span> 00197 <span class="comment">// fURLText</span> 00198 <span class="comment">// This is a copy of the URL text, after it has been taken apart,</span> 00199 <span class="comment">// made relative if needed, canonicalized, and then put back</span> 00200 <span class="comment">// together. Its only created upon demand.</span> 00201 <span class="comment">//</span> 00202 <span class="comment">// fHasInvalidChar</span> 00203 <span class="comment">// This indicates if the URL Text contains invalid characters as per</span> 00204 <span class="comment">// RFC 2396 standard.</span> 00205 <span class="comment">// -----------------------------------------------------------------------</span> 00206 <a class="code" href="classMemoryManager.html">MemoryManager</a>* fMemoryManager; 00207 XMLCh* fFragment; 00208 XMLCh* fHost; 00209 XMLCh* fPassword; 00210 XMLCh* fPath; 00211 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fPortNum; 00212 Protocols fProtocol; 00213 XMLCh* fQuery; 00214 XMLCh* fUser; 00215 XMLCh* fURLText; 00216 <span class="keywordtype">bool</span> fHasInvalidChar; 00217 }; 00218 00219 00220 <span class="comment">// ---------------------------------------------------------------------------</span> 00221 <span class="comment">// XMLURL: Public operators</span> 00222 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00223"></a><a class="code" href="classXMLURL.html#a11">00223</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classXMLURL.html#a11">XMLURL::operator!=</a>(<span class="keyword">const</span> XMLURL& toCompare)<span class="keyword"> const</span> 00224 <span class="keyword"></span>{ 00225 <span class="keywordflow">return</span> !<a class="code" href="classXMLURL.html#a10">operator==</a>(toCompare); 00226 } 00227 00228 00229 <span class="comment">// ---------------------------------------------------------------------------</span> 00230 <span class="comment">// XMLURL: Getter methods</span> 00231 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00232"></a><a class="code" href="classXMLURL.html#a12">00232</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a12">XMLURL::getFragment</a>()<span class="keyword"> const</span> 00233 <span class="keyword"></span>{ 00234 <span class="keywordflow">return</span> fFragment; 00235 } 00236 <a name="l00237"></a><a class="code" href="classXMLURL.html#a13">00237</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a13">XMLURL::getHost</a>()<span class="keyword"> const</span> 00238 <span class="keyword"></span>{ 00239 <span class="keywordflow">return</span> fHost; 00240 } 00241 <a name="l00242"></a><a class="code" href="classXMLURL.html#a14">00242</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a14">XMLURL::getPassword</a>()<span class="keyword"> const</span> 00243 <span class="keyword"></span>{ 00244 <span class="keywordflow">return</span> fPassword; 00245 } 00246 <a name="l00247"></a><a class="code" href="classXMLURL.html#a15">00247</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a15">XMLURL::getPath</a>()<span class="keyword"> const</span> 00248 <span class="keyword"></span>{ 00249 <span class="keywordflow">return</span> fPath; 00250 } 00251 <a name="l00252"></a><a class="code" href="classXMLURL.html#a17">00252</a> <span class="keyword">inline</span> <a class="code" href="classXMLURL.html#w5">XMLURL::Protocols</a> <a class="code" href="classXMLURL.html#a17">XMLURL::getProtocol</a>()<span class="keyword"> const</span> 00253 <span class="keyword"></span>{ 00254 <span class="keywordflow">return</span> fProtocol; 00255 } 00256 <a name="l00257"></a><a class="code" href="classXMLURL.html#a19">00257</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a19">XMLURL::getQuery</a>()<span class="keyword"> const</span> 00258 <span class="keyword"></span>{ 00259 <span class="keywordflow">return</span> fQuery; 00260 } 00261 <a name="l00262"></a><a class="code" href="classXMLURL.html#a21">00262</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a21">XMLURL::getUser</a>()<span class="keyword"> const</span> 00263 <span class="keyword"></span>{ 00264 <span class="keywordflow">return</span> fUser; 00265 } 00266 <a name="l00267"></a><a class="code" href="classXMLURL.html#a20">00267</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLURL.html#a20">XMLURL::getURLText</a>()<span class="keyword"> const</span> 00268 <span class="keyword"></span>{ 00269 <span class="comment">//</span> 00270 <span class="comment">// Fault it in if not already. Since this is a const method and we</span> 00271 <span class="comment">// can't use mutable members due the compilers we have to support,</span> 00272 <span class="comment">// we have to cast off the constness.</span> 00273 <span class="comment">//</span> 00274 <span class="keywordflow">if</span> (!fURLText) 00275 ((XMLURL*)<span class="keyword">this</span>)->buildFullText(); 00276 00277 <span class="keywordflow">return</span> fURLText; 00278 } 00279 <a name="l00280"></a><a class="code" href="classXMLURL.html#a22">00280</a> <span class="keyword">inline</span> <a class="code" href="classMemoryManager.html">MemoryManager</a>* <a class="code" href="classXMLURL.html#a22">XMLURL::getMemoryManager</a>()<span class="keyword"> const</span> 00281 <span class="keyword"></span>{ 00282 <span class="keywordflow">return</span> fMemoryManager; 00283 } 00284 00285 <a class="code" href="XMLException_8hpp.html#a1">MakeXMLException</a>(MalformedURLException, ) 00286 00287 XERCES_CPP_NAMESPACE_END 00288 00289 00290 #endif </pre></div> </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" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I> Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved. </I></FONT></TD></TR></TABLE></BODY></HTML>