<p>This class is a derivative of the standard <aclass="el"href="classxercesc_1_1InputSource.html"title="A single input source for an XML entity. ">InputSource</a> class.
<areashape="rect"id="node2"href="classxercesc_1_1InputSource.html"title="A single input source for an XML entity. "alt=""coords="29,80,176,107"/><areashape="rect"id="node3"href="classxercesc_1_1XMemory.html"title="This class makes it possible to override the C++ memory management by adding new/delete operators to ..."alt=""coords="37,5,168,32"/></map>
<trclass="memdesc:aaa8bd9496d65679b79bb16043309a6c4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A memory buffer input source is constructed from a buffer of byte data, and the count of bytes in that buffer. <ahref="#aaa8bd9496d65679b79bb16043309a6c4">More...</a><br/></td></tr>
<trclass="memdesc:a66ede45468921b97d2baf175561b9b6d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This constructor is identical to the previous one, except that it takes the fake system id in local code page form and transcodes it internally. <ahref="#a66ede45468921b97d2baf175561b9b6d">More...</a><br/></td></tr>
<trclass="memdesc:a0af721882921667f44881403ad977cc3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">If the buffer was adopted, the copy made during construction is deleted at this point. <ahref="#a0af721882921667f44881403ad977cc3">More...</a><br/></td></tr>
<trclass="memdesc:a6763b5370b2b83eb987fa43dc8f31301"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method will return a binary input stream derivative that will parse from the memory buffer. <ahref="#a6763b5370b2b83eb987fa43dc8f31301">More...</a><br/></td></tr>
<trclass="memdesc:a9efbedc3d265c066bc6fa65530ab7e75"><tdclass="mdescLeft"> </td><tdclass="mdescRight">By default, for safety's sake, each newly created stream from this input source will make its own copy of the buffer to stream from. <ahref="#a9efbedc3d265c066bc6fa65530ab7e75">More...</a><br/></td></tr>
<trclass="memdesc:a745c57b859b4a29d1ab44e13af9eab85"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This methods allows the <aclass="el"href="classxercesc_1_1MemBufInputSource.html"title="This class is a derivative of the standard InputSource class. ">MemBufInputSource</a> to be used for more than one input source, instead of destructing/constructing another <aclass="el"href="classxercesc_1_1MemBufInputSource.html"title="This class is a derivative of the standard InputSource class. ">MemBufInputSource</a>. <ahref="#a745c57b859b4a29d1ab44e13af9eab85">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_classxercesc_1_1InputSource"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_classxercesc_1_1InputSource')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classxercesc_1_1InputSource.html">xercesc::InputSource</a></td></tr>
<trclass="memdesc:a6f150d285d4ce368ce7a6f94f65f2957 inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">An input source can be set to force the parser to assume a particular encoding for the data that input source represents, via the <aclass="el"href="classxercesc_1_1InputSource.html#a38edffa85c69a79705506dc674f370ca"title="Set the encoding which will be required for use with the XML text read via a stream opened by this in...">setEncoding()</a> method. <ahref="#a6f150d285d4ce368ce7a6f94f65f2957">More...</a><br/></td></tr>
<trclass="memdesc:a192a9028168663eb4fb1e905e41837d8 inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the public identifier for this input source. <ahref="#a192a9028168663eb4fb1e905e41837d8">More...</a><br/></td></tr>
<trclass="memdesc:a95ae54667532f3cbc9ec4a734541d0f5 inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the system identifier for this input source. <ahref="#a95ae54667532f3cbc9ec4a734541d0f5">More...</a><br/></td></tr>
<trclass="memdesc:a3184b9e26e147b88d0eae9b09f39910d inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the flag that indicates if the parser should issue fatal error if this input source is not found. <ahref="#a3184b9e26e147b88d0eae9b09f39910d">More...</a><br/></td></tr>
<trclass="memdesc:a38edffa85c69a79705506dc674f370ca inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the encoding which will be required for use with the XML text read via a stream opened by this input source. <ahref="#a38edffa85c69a79705506dc674f370ca">More...</a><br/></td></tr>
<trclass="memdesc:ad88b92735d82dcadf39496ca83357aec inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the public identifier for this input source. <ahref="#ad88b92735d82dcadf39496ca83357aec">More...</a><br/></td></tr>
<trclass="memdesc:a3542f513fd873dd217ce1972b041182b inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the system identifier for this input source. <ahref="#a3542f513fd873dd217ce1972b041182b">More...</a><br/></td></tr>
<trclass="memdesc:a30493e827beb6798632d40f81be064c7 inherit pub_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Indicates if the parser should issue fatal error if this input source is not found. <ahref="#a30493e827beb6798632d40f81be064c7">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_classxercesc_1_1XMemory"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_classxercesc_1_1XMemory')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classxercesc_1_1XMemory.html">xercesc::XMemory</a></td></tr>
<trclass="memdesc:a7f41eef0d509e5eff717599647942a0f inherit pub_methods_classxercesc_1_1XMemory"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method defines a custom operator new, that will use the provided memory manager to perform the allocation. <ahref="#a7f41eef0d509e5eff717599647942a0f">More...</a><br/></td></tr>
<trclass="memdesc:af2335addd6a2bb6cc7bb1df630d05eeb inherit pub_methods_classxercesc_1_1XMemory"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method provides a matching delete for the custom operator new. <ahref="#af2335addd6a2bb6cc7bb1df630d05eeb">More...</a><br/></td></tr>
<trclass="memdesc:a47791b65820d24581920532a88c37e75 inherit pub_methods_classxercesc_1_1XMemory"><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method provides a matching delete for the placement new. <ahref="#a47791b65820d24581920532a88c37e75">More...</a><br/></td></tr>
<trclass="inherit_header pro_methods_classxercesc_1_1InputSource"><tdcolspan="2"onclick="javascript:toggleInherit('pro_methods_classxercesc_1_1InputSource')"><imgsrc="closed.png"alt="-"/> Protected Member Functions inherited from <aclass="el"href="classxercesc_1_1InputSource.html">xercesc::InputSource</a></td></tr>
<trclass="memdesc:a4a73a8e57de0eb17e5f5c53cb838dce6 inherit pro_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructor with a system identifier as XMLCh type. <ahref="#a4a73a8e57de0eb17e5f5c53cb838dce6">More...</a><br/></td></tr>
<trclass="memdesc:ad7b79c573ccaa32680e6d7cbc0cc644c inherit pro_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructor with a system and public identifiers. <ahref="#ad7b79c573ccaa32680e6d7cbc0cc644c">More...</a><br/></td></tr>
<trclass="memdesc:ad16637d2929e9e193061186c994f7308 inherit pro_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructor witha system identifier as string. <ahref="#ad16637d2929e9e193061186c994f7308">More...</a><br/></td></tr>
<trclass="memdesc:a619e49d0a44dffdba3e30566754ef99e inherit pro_methods_classxercesc_1_1InputSource"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructor witha system and public identifiers. <ahref="#a619e49d0a44dffdba3e30566754ef99e">More...</a><br/></td></tr>
<trclass="inherit_header pro_methods_classxercesc_1_1XMemory"><tdcolspan="2"onclick="javascript:toggleInherit('pro_methods_classxercesc_1_1XMemory')"><imgsrc="closed.png"alt="-"/> Protected Member Functions inherited from <aclass="el"href="classxercesc_1_1XMemory.html">xercesc::XMemory</a></td></tr>
<divclass="textblock"><p>This class is a derivative of the standard <aclass="el"href="classxercesc_1_1InputSource.html"title="A single input source for an XML entity. ">InputSource</a> class. </p>
<p>It provides for the parser access to data stored in a memory buffer. The type of buffer and its host specific attributes are of little concern here. The only real requirement is that the memory be readable by the current process.</p>
<p>Note that the memory buffer size is expressed in <b>bytes</b>, not in characters. If you pass it text data, you must account for the bytes per character when indicating the buffer size.</p>
<p>As with all <aclass="el"href="classxercesc_1_1InputSource.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. In this case, there are two options available.</p>
<p>The passed buffer can be adopted or merely referenced. If it is adopted, then it must be dynamically allocated and will be destroyed when the input source is destroyed (no reference counting!.) If not adopted, the caller must insure that it remains valid until the input source object is destroyed.</p>
<p>The other option indicates whether each stream created for this input source should get its own copy of the data, or whether it should just stream the data directly from this object's copy of the data. The same rules apply here, in that the buffer must either be copied by the stream or it must remain valid until the stream is destroyed. </p>
<p>Note that the system id provided serves two purposes. Firstly it is going to be displayed in error messages as the source of the error. And secondly, any entities which are referred to from this entity via relative paths/URLs will be relative to this fake system id.</p>
<tr><tdclass="paramname">srcDocBytes</td><td>The actual data buffer to be parsed from. </td></tr>
<tr><tdclass="paramname">byteCount</td><td>The count of bytes (not characters, bytes!) in the buffer. </td></tr>
<tr><tdclass="paramname">bufId</td><td>A fake system id for the buffer. </td></tr>
<tr><tdclass="paramname">adoptBuffer</td><td>Indicates whether this object should adopt the buffer (i.e. become responsible for deletion) or just use it in place. </td></tr>
<tr><tdclass="paramname">manager</td><td>Pointer to the memory manager to be used to allocate objects. </td></tr>
<p>This constructor is identical to the previous one, except that it takes the fake system id in local code page form and transcodes it internally. </p>
<p>If <aclass="el"href="classxercesc_1_1MemBufInputSource.html#a9efbedc3d265c066bc6fa65530ab7e75"title="By default, for safety's sake, each newly created stream from this input source will make its own cop...">setCopyBufToStream()</a> has been set, then the stream will make its own copy. Otherwise, it will use the buffer as is (in which case it must remain valid until the stream is no longer in use, i.e. the parse completes.)</p>
<dlclass="section return"><dt>Returns</dt><dd>A dynamically allocated binary input stream derivative that can parse from the memory buffer. </dd></dl>
<p>This methods allows the <aclass="el"href="classxercesc_1_1MemBufInputSource.html"title="This class is a derivative of the standard InputSource class. ">MemBufInputSource</a> to be used for more than one input source, instead of destructing/constructing another <aclass="el"href="classxercesc_1_1MemBufInputSource.html"title="This class is a derivative of the standard InputSource class. ">MemBufInputSource</a>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">srcDocBytes</td><td>The actual data buffer to be parsed from. </td></tr>
<tr><tdclass="paramname">byteCount</td><td>The count of bytes (not characters, bytes!) in the buffer. </td></tr>
<p>By default, for safety's sake, each newly created stream from this input source will make its own copy of the buffer to stream from. </p>
<p>This avoids having to deal with aliasing of the buffer for simple work. But, for higher performance applications or for large buffers, this is obviously not optimal.</p>
<p>In such cases, you can call this method to turn off that default action. Once turned off, the streams will just get a pointer to the buffer and parse directly from that. In this case, you must insure that the buffer remains valid for as long as any parse events are still using it.</p>