blob: 6fbd3943d88e20364a8d002c30ca41160a1914c9 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.7-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<title>RapidJSON: rapidjson::MemoryStream Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygenextra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="topbanner"><a href="https://github.com/Tencent/rapidjson" title="RapidJSON GitHub"><i class="githublogo"></i></a></div>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structrapidjson_1_1_memory_stream.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structrapidjson_1_1_memory_stream-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">rapidjson::MemoryStream Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Represents an in-memory input byte stream.
<a href="structrapidjson_1_1_memory_stream.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="memorystream_8h_source.html">memorystream.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:abf9f7cf51a5830ae45e24f5d55fdceaf"><td class="memItemLeft" align="right" valign="top"><a id="abf9f7cf51a5830ae45e24f5d55fdceaf"></a>
typedef char&#160;</td><td class="memItemRight" valign="bottom"><b>Ch</b></td></tr>
<tr class="separator:abf9f7cf51a5830ae45e24f5d55fdceaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a78a2158aae245de652bad7d53de1772c"><td class="memItemLeft" align="right" valign="top"><a id="a78a2158aae245de652bad7d53de1772c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MemoryStream</b> (const Ch *src, size_t size)</td></tr>
<tr class="separator:a78a2158aae245de652bad7d53de1772c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfe6486d171f52af46147031e0c65bb6"><td class="memItemLeft" align="right" valign="top"><a id="abfe6486d171f52af46147031e0c65bb6"></a>
Ch&#160;</td><td class="memItemRight" valign="bottom"><b>Peek</b> () const</td></tr>
<tr class="separator:abfe6486d171f52af46147031e0c65bb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0f6a8e627bc071d96bd1dbb50188f68"><td class="memItemLeft" align="right" valign="top"><a id="aa0f6a8e627bc071d96bd1dbb50188f68"></a>
Ch&#160;</td><td class="memItemRight" valign="bottom"><b>Take</b> ()</td></tr>
<tr class="separator:aa0f6a8e627bc071d96bd1dbb50188f68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab759106a74ad078260c2c1029bfb7030"><td class="memItemLeft" align="right" valign="top"><a id="ab759106a74ad078260c2c1029bfb7030"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>Tell</b> () const</td></tr>
<tr class="separator:ab759106a74ad078260c2c1029bfb7030"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cda045c9d01e18c4d4b06b2afe2edf2"><td class="memItemLeft" align="right" valign="top"><a id="a9cda045c9d01e18c4d4b06b2afe2edf2"></a>
Ch *&#160;</td><td class="memItemRight" valign="bottom"><b>PutBegin</b> ()</td></tr>
<tr class="separator:a9cda045c9d01e18c4d4b06b2afe2edf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3721da916bbddb54c97f631c3d8eb811"><td class="memItemLeft" align="right" valign="top"><a id="a3721da916bbddb54c97f631c3d8eb811"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Put</b> (Ch)</td></tr>
<tr class="separator:a3721da916bbddb54c97f631c3d8eb811"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c16eac80906e4ff0c1ad1bc6fe43635"><td class="memItemLeft" align="right" valign="top"><a id="a1c16eac80906e4ff0c1ad1bc6fe43635"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Flush</b> ()</td></tr>
<tr class="separator:a1c16eac80906e4ff0c1ad1bc6fe43635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2135b36b12e5fcd2ee575b9a9cdb579c"><td class="memItemLeft" align="right" valign="top"><a id="a2135b36b12e5fcd2ee575b9a9cdb579c"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>PutEnd</b> (Ch *)</td></tr>
<tr class="separator:a2135b36b12e5fcd2ee575b9a9cdb579c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad17be8ddf7b91d91b70fe1cdf5478d14"><td class="memItemLeft" align="right" valign="top"><a id="ad17be8ddf7b91d91b70fe1cdf5478d14"></a>
const Ch *&#160;</td><td class="memItemRight" valign="bottom"><b>Peek4</b> () const</td></tr>
<tr class="separator:ad17be8ddf7b91d91b70fe1cdf5478d14"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ac0b4da6016e5ba6241604fd4258fb722"><td class="memItemLeft" align="right" valign="top"><a id="ac0b4da6016e5ba6241604fd4258fb722"></a>
const Ch *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrapidjson_1_1_memory_stream.html#ac0b4da6016e5ba6241604fd4258fb722">src_</a></td></tr>
<tr class="memdesc:ac0b4da6016e5ba6241604fd4258fb722"><td class="mdescLeft">&#160;</td><td class="mdescRight">Current read position. <br /></td></tr>
<tr class="separator:ac0b4da6016e5ba6241604fd4258fb722"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cc586e50fbfc0bd5994977b42243b93"><td class="memItemLeft" align="right" valign="top"><a id="a1cc586e50fbfc0bd5994977b42243b93"></a>
const Ch *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrapidjson_1_1_memory_stream.html#a1cc586e50fbfc0bd5994977b42243b93">begin_</a></td></tr>
<tr class="memdesc:a1cc586e50fbfc0bd5994977b42243b93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Original head of the string. <br /></td></tr>
<tr class="separator:a1cc586e50fbfc0bd5994977b42243b93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f45298891e8156121b4017954fabe8"><td class="memItemLeft" align="right" valign="top"><a id="a47f45298891e8156121b4017954fabe8"></a>
const Ch *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrapidjson_1_1_memory_stream.html#a47f45298891e8156121b4017954fabe8">end_</a></td></tr>
<tr class="memdesc:a47f45298891e8156121b4017954fabe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">End of stream. <br /></td></tr>
<tr class="separator:a47f45298891e8156121b4017954fabe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8437d59c32168a74226312d9e96ace"><td class="memItemLeft" align="right" valign="top"><a id="a8c8437d59c32168a74226312d9e96ace"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrapidjson_1_1_memory_stream.html#a8c8437d59c32168a74226312d9e96ace">size_</a></td></tr>
<tr class="memdesc:a8c8437d59c32168a74226312d9e96ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the stream. <br /></td></tr>
<tr class="separator:a8c8437d59c32168a74226312d9e96ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents an in-memory input byte stream. </p>
<p>This class is mainly for being wrapped by <a class="el" href="classrapidjson_1_1_encoded_input_stream.html" title="Input byte stream wrapper with a statically bound encoding.">EncodedInputStream</a> or <a class="el" href="classrapidjson_1_1_auto_u_t_f_input_stream.html" title="Input stream wrapper with dynamically bound encoding and automatic encoding detection.">AutoUTFInputStream</a>.</p>
<p>It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.</p>
<p>Differences between <a class="el" href="structrapidjson_1_1_memory_stream.html" title="Represents an in-memory input byte stream.">MemoryStream</a> and StringStream:</p><ol type="1">
<li>StringStream has encoding but <a class="el" href="structrapidjson_1_1_memory_stream.html" title="Represents an in-memory input byte stream.">MemoryStream</a> is a byte stream.</li>
<li><a class="el" href="structrapidjson_1_1_memory_stream.html" title="Represents an in-memory input byte stream.">MemoryStream</a> needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source.</li>
<li><a class="el" href="structrapidjson_1_1_memory_stream.html" title="Represents an in-memory input byte stream.">MemoryStream</a> supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4(). <dl class="section note"><dt>Note</dt><dd>implements <a class="el" href="classrapidjson_1_1_stream.html" title="Concept for reading and writing characters.">Stream</a> concept </dd></dl>
</li>
</ol>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/rapidjson/<a class="el" href="memorystream_8h_source.html">memorystream.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacerapidjson.html">rapidjson</a></li><li class="navelem"><a class="el" href="structrapidjson_1_1_memory_stream.html">MemoryStream</a></li>
</ul>
</div>
</body>
</html>