blob: b5c4e1d612b48de289cabc76ae353b9206f6ea22 [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::GenericArray&lt; Const, ValueT &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_array.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="#friends">Friends</a> &#124;
<a href="classrapidjson_1_1_generic_array-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">rapidjson::GenericArray&lt; Const, ValueT &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Helper class for accessing Value of array type.
<a href="classrapidjson_1_1_generic_array.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="document_8h_source.html">document.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:a6f2b607cc4e648e5b250dea147843476"><td class="memItemLeft" align="right" valign="top"><a id="a6f2b607cc4e648e5b250dea147843476"></a>
typedef <a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&lt; true, ValueT &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstArray</b></td></tr>
<tr class="separator:a6f2b607cc4e648e5b250dea147843476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae82a8e56892743f606ae07da8f9a2f5a"><td class="memItemLeft" align="right" valign="top"><a id="ae82a8e56892743f606ae07da8f9a2f5a"></a>
typedef <a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&lt; false, ValueT &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Array</b></td></tr>
<tr class="separator:ae82a8e56892743f606ae07da8f9a2f5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a417eefa7bd2a3d357e947e64044f0bd9"><td class="memItemLeft" align="right" valign="top"><a id="a417eefa7bd2a3d357e947e64044f0bd9"></a>
typedef ValueT&#160;</td><td class="memItemRight" valign="bottom"><b>PlainType</b></td></tr>
<tr class="separator:a417eefa7bd2a3d357e947e64044f0bd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebd828a2f020262b41af908fbb28a571"><td class="memItemLeft" align="right" valign="top"><a id="aebd828a2f020262b41af908fbb28a571"></a>
typedef internal::MaybeAddConst&lt; Const, PlainType &gt;::<a class="el" href="namespacerapidjson.html#ae79a4751c1c460ff0de5ecc07874f3e4">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ValueType</b></td></tr>
<tr class="separator:aebd828a2f020262b41af908fbb28a571"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae94140e6dbab05cd3918d3e75819dc0a"><td class="memItemLeft" align="right" valign="top"><a id="ae94140e6dbab05cd3918d3e75819dc0a"></a>
typedef ValueType *&#160;</td><td class="memItemRight" valign="bottom"><b>ValueIterator</b></td></tr>
<tr class="separator:ae94140e6dbab05cd3918d3e75819dc0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82298d507b2b15c9d909c25a32f5afeb"><td class="memItemLeft" align="right" valign="top"><a id="a82298d507b2b15c9d909c25a32f5afeb"></a>
typedef ValueType::AllocatorType&#160;</td><td class="memItemRight" valign="bottom"><b>AllocatorType</b></td></tr>
<tr class="separator:a82298d507b2b15c9d909c25a32f5afeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad52689025256c94097a0e7bb1c70620e"><td class="memItemLeft" align="right" valign="top"><a id="ad52689025256c94097a0e7bb1c70620e"></a>
typedef ValueType::StringRefType&#160;</td><td class="memItemRight" valign="bottom"><b>StringRefType</b></td></tr>
<tr class="separator:ad52689025256c94097a0e7bb1c70620e"><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:ae59cd71ac1e26cc66ae0269991f82f26"><td class="memItemLeft" align="right" valign="top"><a id="ae59cd71ac1e26cc66ae0269991f82f26"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>GenericArray</b> (const <a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a> &amp;rhs)</td></tr>
<tr class="separator:ae59cd71ac1e26cc66ae0269991f82f26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9c9bffca8056d6b20b9f92334d35798"><td class="memItemLeft" align="right" valign="top"><a id="ab9c9bffca8056d6b20b9f92334d35798"></a>
<a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a> &amp;rhs)</td></tr>
<tr class="separator:ab9c9bffca8056d6b20b9f92334d35798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37a9b2e7b7ce914b25654b04ed7a8344"><td class="memItemLeft" align="right" valign="top"><a id="a37a9b2e7b7ce914b25654b04ed7a8344"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator ValueType &amp;</b> () const</td></tr>
<tr class="separator:a37a9b2e7b7ce914b25654b04ed7a8344"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0473410a03268bbc25cb6d95ecc9925"><td class="memItemLeft" align="right" valign="top"><a id="ad0473410a03268bbc25cb6d95ecc9925"></a>
<a class="el" href="namespacerapidjson.html#a44eb33eaa523e36d466b1ced64b85c84">SizeType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Size</b> () const</td></tr>
<tr class="separator:ad0473410a03268bbc25cb6d95ecc9925"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78052c2a7bb54ee4ea7579df5eab480c"><td class="memItemLeft" align="right" valign="top"><a id="a78052c2a7bb54ee4ea7579df5eab480c"></a>
<a class="el" href="namespacerapidjson.html#a44eb33eaa523e36d466b1ced64b85c84">SizeType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Capacity</b> () const</td></tr>
<tr class="separator:a78052c2a7bb54ee4ea7579df5eab480c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa816f9b2ab65c842c343e5dbe99d876"><td class="memItemLeft" align="right" valign="top"><a id="aaa816f9b2ab65c842c343e5dbe99d876"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Empty</b> () const</td></tr>
<tr class="separator:aaa816f9b2ab65c842c343e5dbe99d876"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b671cc963732398d9234cf01aa339ab"><td class="memItemLeft" align="right" valign="top"><a id="a1b671cc963732398d9234cf01aa339ab"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Clear</b> () const</td></tr>
<tr class="separator:a1b671cc963732398d9234cf01aa339ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3455ca0429fa330cb981c78fab473c0"><td class="memItemLeft" align="right" valign="top"><a id="ae3455ca0429fa330cb981c78fab473c0"></a>
ValueType &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (<a class="el" href="namespacerapidjson.html#a44eb33eaa523e36d466b1ced64b85c84">SizeType</a> index) const</td></tr>
<tr class="separator:ae3455ca0429fa330cb981c78fab473c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32299e51f24648e04757de26d952ffe7"><td class="memItemLeft" align="right" valign="top"><a id="a32299e51f24648e04757de26d952ffe7"></a>
ValueIterator&#160;</td><td class="memItemRight" valign="bottom"><b>Begin</b> () const</td></tr>
<tr class="separator:a32299e51f24648e04757de26d952ffe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e2a9f13adcca6e0f191495cdce9689"><td class="memItemLeft" align="right" valign="top"><a id="a27e2a9f13adcca6e0f191495cdce9689"></a>
ValueIterator&#160;</td><td class="memItemRight" valign="bottom"><b>End</b> () const</td></tr>
<tr class="separator:a27e2a9f13adcca6e0f191495cdce9689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1110e43990424e416555541731f229f"><td class="memItemLeft" align="right" valign="top"><a id="ad1110e43990424e416555541731f229f"></a>
<a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Reserve</b> (<a class="el" href="namespacerapidjson.html#a44eb33eaa523e36d466b1ced64b85c84">SizeType</a> newCapacity, AllocatorType &amp;allocator) const</td></tr>
<tr class="separator:ad1110e43990424e416555541731f229f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bcd130448a9d68303523df7b22dc452"><td class="memItemLeft" align="right" valign="top"><a id="a0bcd130448a9d68303523df7b22dc452"></a>
<a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&#160;</td><td class="memItemRight" valign="bottom"><b>PushBack</b> (ValueType &amp;value, AllocatorType &amp;allocator) const</td></tr>
<tr class="separator:a0bcd130448a9d68303523df7b22dc452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a673eda4c52685461b5bbeccf2f2b5c88"><td class="memItemLeft" align="right" valign="top"><a id="a673eda4c52685461b5bbeccf2f2b5c88"></a>
<a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&#160;</td><td class="memItemRight" valign="bottom"><b>PushBack</b> (StringRefType value, AllocatorType &amp;allocator) const</td></tr>
<tr class="separator:a673eda4c52685461b5bbeccf2f2b5c88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f24db0f4c3d82a836d2722fd1e6f34c"><td class="memTemplParams" colspan="2"><a id="a9f24db0f4c3d82a836d2722fd1e6f34c"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a9f24db0f4c3d82a836d2722fd1e6f34c"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><b>RAPIDJSON_DISABLEIF_RETURN</b> ((internal::OrExpr&lt; internal::IsPointer&lt; T &gt;, internal::IsGenericValue&lt; T &gt; &gt;),(const <a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a> &amp;)) PushBack(T value</td></tr>
<tr class="separator:a9f24db0f4c3d82a836d2722fd1e6f34c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ccee2eea89c21fcd29363506e5ed3f"><td class="memItemLeft" align="right" valign="top"><a id="a50ccee2eea89c21fcd29363506e5ed3f"></a>
<a class="el" href="classrapidjson_1_1_generic_array.html">GenericArray</a>&#160;</td><td class="memItemRight" valign="bottom"><b>PopBack</b> () const</td></tr>
<tr class="separator:a50ccee2eea89c21fcd29363506e5ed3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13d2a18801a80add6e1bd9ad167822a5"><td class="memItemLeft" align="right" valign="top"><a id="a13d2a18801a80add6e1bd9ad167822a5"></a>
ValueIterator&#160;</td><td class="memItemRight" valign="bottom"><b>Erase</b> (ConstValueIterator pos) const</td></tr>
<tr class="separator:a13d2a18801a80add6e1bd9ad167822a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8fb2a13a98c62a284de0005850d624c"><td class="memItemLeft" align="right" valign="top"><a id="af8fb2a13a98c62a284de0005850d624c"></a>
ValueIterator&#160;</td><td class="memItemRight" valign="bottom"><b>Erase</b> (ConstValueIterator first, ConstValueIterator last) const</td></tr>
<tr class="separator:af8fb2a13a98c62a284de0005850d624c"><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:a188ce2c0f8223d3e5cfd03c7fae494bb"><td class="memItemLeft" align="right" valign="top"><a id="a188ce2c0f8223d3e5cfd03c7fae494bb"></a>
const typedef ValueT *&#160;</td><td class="memItemRight" valign="bottom"><b>ConstValueIterator</b></td></tr>
<tr class="separator:a188ce2c0f8223d3e5cfd03c7fae494bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83b4a605b756094312a12ba2aebea529"><td class="memItemLeft" align="right" valign="top"><a id="a83b4a605b756094312a12ba2aebea529"></a>
AllocatorType &amp;const&#160;</td><td class="memItemRight" valign="bottom"><b>allocator</b> { value_.PushBack(value, allocator)</td></tr>
<tr class="separator:a83b4a605b756094312a12ba2aebea529"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21bef2fc4704ddcdced3966fd85904d2"><td class="memItemLeft" align="right" valign="top"><a id="a21bef2fc4704ddcdced3966fd85904d2"></a>
return *&#160;</td><td class="memItemRight" valign="bottom"><b>this</b></td></tr>
<tr class="separator:a21bef2fc4704ddcdced3966fd85904d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a899449e1a645b5e377af059fb61113d8"><td class="memTemplParams" colspan="2"><a id="a899449e1a645b5e377af059fb61113d8"></a>
template&lt;typename , typename &gt; </td></tr>
<tr class="memitem:a899449e1a645b5e377af059fb61113d8"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><b>GenericValue</b></td></tr>
<tr class="separator:a899449e1a645b5e377af059fb61113d8"><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;bool Const, typename ValueT&gt;<br />
class rapidjson::GenericArray&lt; Const, ValueT &gt;</h3>
<p>Helper class for accessing Value of array type. </p>
<p>Instance of this helper class is obtained by <code>GenericValue::GetArray()</code>. In addition to all APIs for array type, it provides range-based for loop if <code>RAPIDJSON_HAS_CXX11_RANGE_FOR=1</code>. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>include/rapidjson/<a class="el" href="document_8h_source.html">document.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_array.html">GenericArray</a></li>
</ul>
</div>
</body>
</html>