blob: 43edb74f88fe2794c80d2a6f8b950b99d72ea867 [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::GenericStringBuffer&lt; Encoding, Allocator &gt; Class Template 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('classrapidjson_1_1_generic_string_buffer.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="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classrapidjson_1_1_generic_string_buffer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">rapidjson::GenericStringBuffer&lt; Encoding, Allocator &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Represents an in-memory output stream.
<a href="classrapidjson_1_1_generic_string_buffer.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="stringbuffer_8h_source.html">stringbuffer.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:a315f6f4528438a19d5a93eac3e2c99f0"><td class="memItemLeft" align="right" valign="top"><a id="a315f6f4528438a19d5a93eac3e2c99f0"></a>
typedef Encoding::Ch&#160;</td><td class="memItemRight" valign="bottom"><b>Ch</b></td></tr>
<tr class="separator:a315f6f4528438a19d5a93eac3e2c99f0"><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:a96f9ddc4322573a15d086f29197a3d1b"><td class="memItemLeft" align="right" valign="top"><a id="a96f9ddc4322573a15d086f29197a3d1b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>GenericStringBuffer</b> (<a class="el" href="classrapidjson_1_1_allocator.html">Allocator</a> *allocator=0, size_t capacity=kDefaultCapacity)</td></tr>
<tr class="separator:a96f9ddc4322573a15d086f29197a3d1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495081cfdd864623565606daf02f1187"><td class="memItemLeft" align="right" valign="top"><a id="a495081cfdd864623565606daf02f1187"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Put</b> (Ch c)</td></tr>
<tr class="separator:a495081cfdd864623565606daf02f1187"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35733ffe70f63b28857b8d738b2ffad7"><td class="memItemLeft" align="right" valign="top"><a id="a35733ffe70f63b28857b8d738b2ffad7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>PutUnsafe</b> (Ch c)</td></tr>
<tr class="separator:a35733ffe70f63b28857b8d738b2ffad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabe024dd7fc2ea0a0c929d7eea3d0b32"><td class="memItemLeft" align="right" valign="top"><a id="aabe024dd7fc2ea0a0c929d7eea3d0b32"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Flush</b> ()</td></tr>
<tr class="separator:aabe024dd7fc2ea0a0c929d7eea3d0b32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614af5a72984c88bd5a65e2bc233d310"><td class="memItemLeft" align="right" valign="top"><a id="a614af5a72984c88bd5a65e2bc233d310"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Clear</b> ()</td></tr>
<tr class="separator:a614af5a72984c88bd5a65e2bc233d310"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e688f68b88820655f717d3cc352b842"><td class="memItemLeft" align="right" valign="top"><a id="a7e688f68b88820655f717d3cc352b842"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ShrinkToFit</b> ()</td></tr>
<tr class="separator:a7e688f68b88820655f717d3cc352b842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae70a632053e258c7c431e0e35b095c84"><td class="memItemLeft" align="right" valign="top"><a id="ae70a632053e258c7c431e0e35b095c84"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Reserve</b> (size_t count)</td></tr>
<tr class="separator:ae70a632053e258c7c431e0e35b095c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa848ba1b8220afb4103d8099cbd6d3ff"><td class="memItemLeft" align="right" valign="top"><a id="aa848ba1b8220afb4103d8099cbd6d3ff"></a>
Ch *&#160;</td><td class="memItemRight" valign="bottom"><b>Push</b> (size_t count)</td></tr>
<tr class="separator:aa848ba1b8220afb4103d8099cbd6d3ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfdf31dc9458a63e4d6544d3079c8d2e"><td class="memItemLeft" align="right" valign="top"><a id="acfdf31dc9458a63e4d6544d3079c8d2e"></a>
Ch *&#160;</td><td class="memItemRight" valign="bottom"><b>PushUnsafe</b> (size_t count)</td></tr>
<tr class="separator:acfdf31dc9458a63e4d6544d3079c8d2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb41bae09405ddd9aa9250ac47ab235e"><td class="memItemLeft" align="right" valign="top"><a id="afb41bae09405ddd9aa9250ac47ab235e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Pop</b> (size_t count)</td></tr>
<tr class="separator:afb41bae09405ddd9aa9250ac47ab235e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a520c0f75424762ea44ebf6ecdd1931d8"><td class="memItemLeft" align="right" valign="top"><a id="a520c0f75424762ea44ebf6ecdd1931d8"></a>
const Ch *&#160;</td><td class="memItemRight" valign="bottom"><b>GetString</b> () const</td></tr>
<tr class="separator:a520c0f75424762ea44ebf6ecdd1931d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d830ec37a4ba0fba3b523c90aaf8b42"><td class="memItemLeft" align="right" valign="top"><a id="a9d830ec37a4ba0fba3b523c90aaf8b42"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_string_buffer.html#a9d830ec37a4ba0fba3b523c90aaf8b42">GetSize</a> () const</td></tr>
<tr class="memdesc:a9d830ec37a4ba0fba3b523c90aaf8b42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of string in bytes in the string buffer. <br /></td></tr>
<tr class="separator:a9d830ec37a4ba0fba3b523c90aaf8b42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a114be213152d570a2d9fde7a28fe11"><td class="memItemLeft" align="right" valign="top"><a id="a0a114be213152d570a2d9fde7a28fe11"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_string_buffer.html#a0a114be213152d570a2d9fde7a28fe11">GetLength</a> () const</td></tr>
<tr class="memdesc:a0a114be213152d570a2d9fde7a28fe11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of string in Ch in the string buffer. <br /></td></tr>
<tr class="separator:a0a114be213152d570a2d9fde7a28fe11"><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:a061b1ffdcd0d660d98ab4a8e3ab49975"><td class="memItemLeft" align="right" valign="top"><a id="a061b1ffdcd0d660d98ab4a8e3ab49975"></a>
internal::Stack&lt; <a class="el" href="classrapidjson_1_1_allocator.html">Allocator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>stack_</b></td></tr>
<tr class="separator:a061b1ffdcd0d660d98ab4a8e3ab49975"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a56159d25a431109a2873e9455178eff0"><td class="memItemLeft" align="right" valign="top"><a id="a56159d25a431109a2873e9455178eff0"></a>
static const size_t&#160;</td><td class="memItemRight" valign="bottom"><b>kDefaultCapacity</b> = 256</td></tr>
<tr class="separator:a56159d25a431109a2873e9455178eff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Encoding, typename Allocator = CrtAllocator&gt;<br />
class rapidjson::GenericStringBuffer&lt; Encoding, Allocator &gt;</h3>
<p>Represents an in-memory output stream. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname"><a class="el" href="classrapidjson_1_1_encoding.html" title="Concept for encoding of Unicode characters.">Encoding</a></td><td><a class="el" href="classrapidjson_1_1_encoding.html" title="Concept for encoding of Unicode characters.">Encoding</a> of the stream. </td></tr>
<tr><td class="paramname"><a class="el" href="classrapidjson_1_1_allocator.html" title="Concept for allocating, resizing and freeing memory block.">Allocator</a></td><td>type for allocating memory buffer. </td></tr>
</table>
</dd>
</dl>
<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>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>include/rapidjson/<a class="el" href="fwd_8h_source.html">fwd.h</a></li>
<li>include/rapidjson/<a class="el" href="stringbuffer_8h_source.html">stringbuffer.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="classrapidjson_1_1_generic_string_buffer.html">GenericStringBuffer</a></li>
</ul>
</div>
</body>
</html>