1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xerces-C++: LocalFileInputSource Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical List</span></a></li>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>LocalFileInputSource Class Reference</h1><!-- doxytag: class="LocalFileInputSource" --><!-- doxytag: inherits="InputSource" -->This class is a derivative of the standard <a class="el" href="classInputSource.html" title="A single input source for an XML entity.">InputSource</a> class.
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for LocalFileInputSource:</div>
<div class="dynsection">
<p><center><img src="classLocalFileInputSource.png" usemap="#LocalFileInputSource_map" border="0" alt=""></center>
<map name="LocalFileInputSource_map">
<area href="classInputSource.html" alt="InputSource" shape="rect" coords="0,56,132,80">
<area href="classXMemory.html" alt="XMemory" shape="rect" coords="0,0,132,24">
</map>
</div>
<p>
<a href="classLocalFileInputSource-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classLocalFileInputSource.html#a40f6d0d8010a45a678c53faf5f7e67c">LocalFileInputSource</a> (const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const basePath, const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const relativePath, <a class="el" href="classMemoryManager.html">MemoryManager</a> *const manager=<a class="el" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A local file input source requires a path to the file to load. <a href="#a40f6d0d8010a45a678c53faf5f7e67c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classLocalFileInputSource.html#8959909b4f2b00ad60afc289747aafb6">LocalFileInputSource</a> (const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const filePath, <a class="el" href="classMemoryManager.html">MemoryManager</a> *const manager=<a class="el" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This constructor takes a single parameter which is the fully qualified or relative path. <a href="#8959909b4f2b00ad60afc289747aafb6"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Destructor</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classLocalFileInputSource.html#691e199c160ea24893e053ec5bccf86f">~LocalFileInputSource</a> ()</td></tr>
<tr><td colspan="2"><div class="groupHeader">Virtual methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classBinInputStream.html">BinInputStream</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classLocalFileInputSource.html#936dd02371dd1888ebd62f995b1a4004">makeStream</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method will return a binary input stream derivative that will parse from the local file indicatedby the system id. <a href="#936dd02371dd1888ebd62f995b1a4004"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is a derivative of the standard <a class="el" href="classInputSource.html" title="A single input source for an XML entity.">InputSource</a> class.
<p>
It provides for the parser access to data which is referenced via a local file path, as apposed to remote file or URL. This is the most efficacious mechanism by which local files can be parsed, since the parse knows that it refers to a local file and will make no other attempts to interpret the passed path.<p>
The path provided can either be a fully qualified path or a relative path. If relative, it will be completed either relative to a passed base path or relative to the current working directory of the process.<p>
As with all <a class="el" href="classInputSource.html" title="A single input source for an XML entity.">InputSource</a> derivatives. The primary objective of an input source is to create an input stream via which the parser can spool in data from the referenced source. <hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="a40f6d0d8010a45a678c53faf5f7e67c"></a><!-- doxytag: member="LocalFileInputSource::LocalFileInputSource" ref="a40f6d0d8010a45a678c53faf5f7e67c" args="(const XMLCh *const basePath, const XMLCh *const relativePath, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LocalFileInputSource::LocalFileInputSource </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const </td>
<td class="paramname"> <em>basePath</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const </td>
<td class="paramname"> <em>relativePath</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classMemoryManager.html">MemoryManager</a> *const </td>
<td class="paramname"> <em>manager</em> = <code><a class="el" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a></code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A local file input source requires a path to the file to load.
<p>
This can be provided either as a fully qualified path, a path relative to the current working directly, or a path relative to a provided base path.<p>
The completed path will become the system id of this input source. The constructors don't take any public id for local files, but you still set them via the parent class' <a class="el" href="classInputSource.html#4cb3a625fac37721b2c719183e124792" title="Set the public identifier for this input source.">setPublicId()</a> method of course.<p>
This constructor takes an explicit base path and a possibly relative path. If the relative path is seen to be fully qualified, it is used as is. Otherwise, it is made relative to the passed base path.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>basePath</em> </td><td>The base path from which the passed relative path will be based, if the relative part is indeed relative.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>relativePath</em> </td><td>The relative part of the path. It can actually be fully qualified, in which case it is taken as is.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>manager</em> </td><td>Pointer to the memory manager to be used to allocate objects.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXMLException.html">XMLException</a></em> </td><td>If the path is relative and doesn't properly resolve to a file. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="8959909b4f2b00ad60afc289747aafb6"></a><!-- doxytag: member="LocalFileInputSource::LocalFileInputSource" ref="8959909b4f2b00ad60afc289747aafb6" args="(const XMLCh *const filePath, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LocalFileInputSource::LocalFileInputSource </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#fae8f92d83170d97f757f704eca7f52a">XMLCh</a> *const </td>
<td class="paramname"> <em>filePath</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classMemoryManager.html">MemoryManager</a> *const </td>
<td class="paramname"> <em>manager</em> = <code><a class="el" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252">XMLPlatformUtils::fgMemoryManager</a></code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This constructor takes a single parameter which is the fully qualified or relative path.
<p>
If it is fully qualified, it is taken as is. If it is relative, then it is completed relative to the current working directory (or the equivalent on the local host machine.)<p>
The completed path will become the system id of this input source. The constructors don't take any public id for local files, but you still set them via the parent class' <a class="el" href="classInputSource.html#4cb3a625fac37721b2c719183e124792" title="Set the public identifier for this input source.">setPublicId()</a> method of course.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>filePath</em> </td><td>The relative or fully qualified path.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>manager</em> </td><td>Pointer to the memory manager to be used to allocate objects.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXMLException.html">XMLException</a></em> </td><td>If the path is relative and doesn't properly resolve to a file. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="691e199c160ea24893e053ec5bccf86f"></a><!-- doxytag: member="LocalFileInputSource::~LocalFileInputSource" ref="691e199c160ea24893e053ec5bccf86f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LocalFileInputSource::~LocalFileInputSource </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="936dd02371dd1888ebd62f995b1a4004"></a><!-- doxytag: member="LocalFileInputSource::makeStream" ref="936dd02371dd1888ebd62f995b1a4004" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classBinInputStream.html">BinInputStream</a>* LocalFileInputSource::makeStream </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This method will return a binary input stream derivative that will parse from the local file indicatedby the system id.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A dynamically allocated binary input stream derivative that can parse from the file indicated by the system id. </dd></dl>
<p>Implements <a class="el" href="classInputSource.html#f0722ef511e91e7b290528b3fd13be09">InputSource</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="LocalFileInputSource_8hpp-source.html">LocalFileInputSource.hpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 21 17:55:50 2010 for Xerces-C++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
|