1*5dd36a3bSchristos<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2*5dd36a3bSchristos<html xmlns="http://www.w3.org/1999/xhtml"> 3*5dd36a3bSchristos<head> 4*5dd36a3bSchristos<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5*5dd36a3bSchristos<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6*5dd36a3bSchristos<meta name="generator" content="Doxygen 1.8.12"/> 7*5dd36a3bSchristos<meta name="viewport" content="width=device-width, initial-scale=1"/> 8*5dd36a3bSchristos<title>libcbor: src/cbor/arrays.h File Reference</title> 9*5dd36a3bSchristos<link href="tabs.css" rel="stylesheet" type="text/css"/> 10*5dd36a3bSchristos<script type="text/javascript" src="jquery.js"></script> 11*5dd36a3bSchristos<script type="text/javascript" src="dynsections.js"></script> 12*5dd36a3bSchristos<link href="search/search.css" rel="stylesheet" type="text/css"/> 13*5dd36a3bSchristos<script type="text/javascript" src="search/searchdata.js"></script> 14*5dd36a3bSchristos<script type="text/javascript" src="search/search.js"></script> 15*5dd36a3bSchristos<link href="doxygen.css" rel="stylesheet" type="text/css" /> 16*5dd36a3bSchristos<link href="customdoxygen.css" rel="stylesheet" type="text/css"/> 17*5dd36a3bSchristos</head> 18*5dd36a3bSchristos<body> 19*5dd36a3bSchristos<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 20*5dd36a3bSchristos<div id="titlearea"> 21*5dd36a3bSchristos<table cellspacing="0" cellpadding="0"> 22*5dd36a3bSchristos <tbody> 23*5dd36a3bSchristos <tr style="height: 56px;"> 24*5dd36a3bSchristos <td id="projectalign" style="padding-left: 0.5em;"> 25*5dd36a3bSchristos <div id="projectname">libcbor 26*5dd36a3bSchristos  <span id="projectnumber">0.5.0</span> 27*5dd36a3bSchristos </div> 28*5dd36a3bSchristos <div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div> 29*5dd36a3bSchristos </td> 30*5dd36a3bSchristos </tr> 31*5dd36a3bSchristos </tbody> 32*5dd36a3bSchristos</table> 33*5dd36a3bSchristos</div> 34*5dd36a3bSchristos<!-- end header part --> 35*5dd36a3bSchristos<!-- Generated by Doxygen 1.8.12 --> 36*5dd36a3bSchristos<script type="text/javascript"> 37*5dd36a3bSchristosvar searchBox = new SearchBox("searchBox", "search",false,'Search'); 38*5dd36a3bSchristos</script> 39*5dd36a3bSchristos<script type="text/javascript" src="menudata.js"></script> 40*5dd36a3bSchristos<script type="text/javascript" src="menu.js"></script> 41*5dd36a3bSchristos<script type="text/javascript"> 42*5dd36a3bSchristos$(function() { 43*5dd36a3bSchristos initMenu('',true,false,'search.php','Search'); 44*5dd36a3bSchristos $(document).ready(function() { init_search(); }); 45*5dd36a3bSchristos}); 46*5dd36a3bSchristos</script> 47*5dd36a3bSchristos<div id="main-nav"></div> 48*5dd36a3bSchristos<!-- window showing the filter options --> 49*5dd36a3bSchristos<div id="MSearchSelectWindow" 50*5dd36a3bSchristos onmouseover="return searchBox.OnSearchSelectShow()" 51*5dd36a3bSchristos onmouseout="return searchBox.OnSearchSelectHide()" 52*5dd36a3bSchristos onkeydown="return searchBox.OnSearchSelectKey(event)"> 53*5dd36a3bSchristos</div> 54*5dd36a3bSchristos 55*5dd36a3bSchristos<!-- iframe showing the search results (closed by default) --> 56*5dd36a3bSchristos<div id="MSearchResultsWindow"> 57*5dd36a3bSchristos<iframe src="javascript:void(0)" frameborder="0" 58*5dd36a3bSchristos name="MSearchResults" id="MSearchResults"> 59*5dd36a3bSchristos</iframe> 60*5dd36a3bSchristos</div> 61*5dd36a3bSchristos 62*5dd36a3bSchristos<div id="nav-path" class="navpath"> 63*5dd36a3bSchristos <ul> 64*5dd36a3bSchristos<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li> </ul> 65*5dd36a3bSchristos</div> 66*5dd36a3bSchristos</div><!-- top --> 67*5dd36a3bSchristos<div class="header"> 68*5dd36a3bSchristos <div class="summary"> 69*5dd36a3bSchristos<a href="#func-members">Functions</a> </div> 70*5dd36a3bSchristos <div class="headertitle"> 71*5dd36a3bSchristos<div class="title">arrays.h File Reference</div> </div> 72*5dd36a3bSchristos</div><!--header--> 73*5dd36a3bSchristos<div class="contents"> 74*5dd36a3bSchristos<div class="textblock"><code>#include "<a class="el" href="common_8h_source.html">cbor/common.h</a>"</code><br /> 75*5dd36a3bSchristos</div> 76*5dd36a3bSchristos<p><a href="arrays_8h_source.html">Go to the source code of this file.</a></p> 77*5dd36a3bSchristos<table class="memberdecls"> 78*5dd36a3bSchristos<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> 79*5dd36a3bSchristosFunctions</h2></td></tr> 80*5dd36a3bSchristos<tr class="memitem:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84">cbor_array_size</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr> 81*5dd36a3bSchristos<tr class="memdesc:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of members. <a href="#a4f634a9a4bc834e4ea6ac43e94d51f84">More...</a><br /></td></tr> 82*5dd36a3bSchristos<tr class="separator:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="memSeparator" colspan="2"> </td></tr> 83*5dd36a3bSchristos<tr class="memitem:a5da97cca271f81f55809c39fad6078b0"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a5da97cca271f81f55809c39fad6078b0">cbor_array_allocated</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr> 84*5dd36a3bSchristos<tr class="memdesc:a5da97cca271f81f55809c39fad6078b0"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the allocated storage. <a href="#a5da97cca271f81f55809c39fad6078b0">More...</a><br /></td></tr> 85*5dd36a3bSchristos<tr class="separator:a5da97cca271f81f55809c39fad6078b0"><td class="memSeparator" colspan="2"> </td></tr> 86*5dd36a3bSchristos<tr class="memitem:a1573139e26cf5b5acc4b0ed861291069"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a1573139e26cf5b5acc4b0ed861291069">cbor_array_get</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index)</td></tr> 87*5dd36a3bSchristos<tr class="memdesc:a1573139e26cf5b5acc4b0ed861291069"><td class="mdescLeft"> </td><td class="mdescRight">Get item by index. <a href="#a1573139e26cf5b5acc4b0ed861291069">More...</a><br /></td></tr> 88*5dd36a3bSchristos<tr class="separator:a1573139e26cf5b5acc4b0ed861291069"><td class="memSeparator" colspan="2"> </td></tr> 89*5dd36a3bSchristos<tr class="memitem:a382cc2dc480ebb9c7951eb3235be89b4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a382cc2dc480ebb9c7951eb3235be89b4">cbor_array_set</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *value)</td></tr> 90*5dd36a3bSchristos<tr class="memdesc:a382cc2dc480ebb9c7951eb3235be89b4"><td class="mdescLeft"> </td><td class="mdescRight">Set item by index. <a href="#a382cc2dc480ebb9c7951eb3235be89b4">More...</a><br /></td></tr> 91*5dd36a3bSchristos<tr class="separator:a382cc2dc480ebb9c7951eb3235be89b4"><td class="memSeparator" colspan="2"> </td></tr> 92*5dd36a3bSchristos<tr class="memitem:a44020515090bbbe91249aff0016ab8e5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a44020515090bbbe91249aff0016ab8e5">cbor_array_replace</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *value)</td></tr> 93*5dd36a3bSchristos<tr class="memdesc:a44020515090bbbe91249aff0016ab8e5"><td class="mdescLeft"> </td><td class="mdescRight">Replace item at an index. <a href="#a44020515090bbbe91249aff0016ab8e5">More...</a><br /></td></tr> 94*5dd36a3bSchristos<tr class="separator:a44020515090bbbe91249aff0016ab8e5"><td class="memSeparator" colspan="2"> </td></tr> 95*5dd36a3bSchristos<tr class="memitem:ac2f1480c546a0268e8b046b365e58599"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#ac2f1480c546a0268e8b046b365e58599">cbor_array_is_definite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr> 96*5dd36a3bSchristos<tr class="memdesc:ac2f1480c546a0268e8b046b365e58599"><td class="mdescLeft"> </td><td class="mdescRight">Is the array definite? <a href="#ac2f1480c546a0268e8b046b365e58599">More...</a><br /></td></tr> 97*5dd36a3bSchristos<tr class="separator:ac2f1480c546a0268e8b046b365e58599"><td class="memSeparator" colspan="2"> </td></tr> 98*5dd36a3bSchristos<tr class="memitem:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a291a9f3ff12a2e2c58b2ca8b00280d40">cbor_array_is_indefinite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr> 99*5dd36a3bSchristos<tr class="memdesc:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="mdescLeft"> </td><td class="mdescRight">Is the array indefinite? <a href="#a291a9f3ff12a2e2c58b2ca8b00280d40">More...</a><br /></td></tr> 100*5dd36a3bSchristos<tr class="separator:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="memSeparator" colspan="2"> </td></tr> 101*5dd36a3bSchristos<tr class="memitem:a8dd01f4a46f162fa4f06b7df7428128e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> ** </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a8dd01f4a46f162fa4f06b7df7428128e">cbor_array_handle</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr> 102*5dd36a3bSchristos<tr class="memdesc:a8dd01f4a46f162fa4f06b7df7428128e"><td class="mdescLeft"> </td><td class="mdescRight">Get the array contents. <a href="#a8dd01f4a46f162fa4f06b7df7428128e">More...</a><br /></td></tr> 103*5dd36a3bSchristos<tr class="separator:a8dd01f4a46f162fa4f06b7df7428128e"><td class="memSeparator" colspan="2"> </td></tr> 104*5dd36a3bSchristos<tr class="memitem:a93d7c18019000d5e206a81a4cca70631"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a93d7c18019000d5e206a81a4cca70631">cbor_new_definite_array</a> (size_t size)</td></tr> 105*5dd36a3bSchristos<tr class="memdesc:a93d7c18019000d5e206a81a4cca70631"><td class="mdescLeft"> </td><td class="mdescRight">Create new definite array. <a href="#a93d7c18019000d5e206a81a4cca70631">More...</a><br /></td></tr> 106*5dd36a3bSchristos<tr class="separator:a93d7c18019000d5e206a81a4cca70631"><td class="memSeparator" colspan="2"> </td></tr> 107*5dd36a3bSchristos<tr class="memitem:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#aaec916ccc6f19782b6aef5ec1da2cc26">cbor_new_indefinite_array</a> ()</td></tr> 108*5dd36a3bSchristos<tr class="memdesc:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="mdescLeft"> </td><td class="mdescRight">Create new indefinite array. <a href="#aaec916ccc6f19782b6aef5ec1da2cc26">More...</a><br /></td></tr> 109*5dd36a3bSchristos<tr class="separator:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="memSeparator" colspan="2"> </td></tr> 110*5dd36a3bSchristos<tr class="memitem:abb1c1c9731a2195857dc471f2a6f60f5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#abb1c1c9731a2195857dc471f2a6f60f5">cbor_array_push</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *array, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *pushee)</td></tr> 111*5dd36a3bSchristos<tr class="memdesc:abb1c1c9731a2195857dc471f2a6f60f5"><td class="mdescLeft"> </td><td class="mdescRight">Append to the end. <a href="#abb1c1c9731a2195857dc471f2a6f60f5">More...</a><br /></td></tr> 112*5dd36a3bSchristos<tr class="separator:abb1c1c9731a2195857dc471f2a6f60f5"><td class="memSeparator" colspan="2"> </td></tr> 113*5dd36a3bSchristos</table> 114*5dd36a3bSchristos<h2 class="groupheader">Function Documentation</h2> 115*5dd36a3bSchristos<a id="a5da97cca271f81f55809c39fad6078b0"></a> 116*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a5da97cca271f81f55809c39fad6078b0">§ </a></span>cbor_array_allocated()</h2> 117*5dd36a3bSchristos 118*5dd36a3bSchristos<div class="memitem"> 119*5dd36a3bSchristos<div class="memproto"> 120*5dd36a3bSchristos <table class="memname"> 121*5dd36a3bSchristos <tr> 122*5dd36a3bSchristos <td class="memname">size_t cbor_array_allocated </td> 123*5dd36a3bSchristos <td>(</td> 124*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 125*5dd36a3bSchristos <td class="paramname"><em>item</em></td><td>)</td> 126*5dd36a3bSchristos <td></td> 127*5dd36a3bSchristos </tr> 128*5dd36a3bSchristos </table> 129*5dd36a3bSchristos</div><div class="memdoc"> 130*5dd36a3bSchristos 131*5dd36a3bSchristos<p>Get the size of the allocated storage. </p> 132*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 133*5dd36a3bSchristos <table class="params"> 134*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 135*5dd36a3bSchristos </table> 136*5dd36a3bSchristos </dd> 137*5dd36a3bSchristos</dl> 138*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>The size of the allocated storage (number of items) </dd></dl> 139*5dd36a3bSchristos 140*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00018">18</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 141*5dd36a3bSchristos 142*5dd36a3bSchristos</div> 143*5dd36a3bSchristos</div> 144*5dd36a3bSchristos<a id="a1573139e26cf5b5acc4b0ed861291069"></a> 145*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a1573139e26cf5b5acc4b0ed861291069">§ </a></span>cbor_array_get()</h2> 146*5dd36a3bSchristos 147*5dd36a3bSchristos<div class="memitem"> 148*5dd36a3bSchristos<div class="memproto"> 149*5dd36a3bSchristos <table class="memname"> 150*5dd36a3bSchristos <tr> 151*5dd36a3bSchristos <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_array_get </td> 152*5dd36a3bSchristos <td>(</td> 153*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 154*5dd36a3bSchristos <td class="paramname"><em>item</em>, </td> 155*5dd36a3bSchristos </tr> 156*5dd36a3bSchristos <tr> 157*5dd36a3bSchristos <td class="paramkey"></td> 158*5dd36a3bSchristos <td></td> 159*5dd36a3bSchristos <td class="paramtype">size_t </td> 160*5dd36a3bSchristos <td class="paramname"><em>index</em> </td> 161*5dd36a3bSchristos </tr> 162*5dd36a3bSchristos <tr> 163*5dd36a3bSchristos <td></td> 164*5dd36a3bSchristos <td>)</td> 165*5dd36a3bSchristos <td></td><td></td> 166*5dd36a3bSchristos </tr> 167*5dd36a3bSchristos </table> 168*5dd36a3bSchristos</div><div class="memdoc"> 169*5dd36a3bSchristos 170*5dd36a3bSchristos<p>Get item by index. </p> 171*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 172*5dd36a3bSchristos <table class="params"> 173*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 174*5dd36a3bSchristos <tr><td class="paramname">index</td><td>The index </td></tr> 175*5dd36a3bSchristos </table> 176*5dd36a3bSchristos </dd> 177*5dd36a3bSchristos</dl> 178*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd><b>incref</b> The item, or <code>NULL</code> in case of boundary violation </dd></dl> 179*5dd36a3bSchristos 180*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00025">25</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 181*5dd36a3bSchristos 182*5dd36a3bSchristos</div> 183*5dd36a3bSchristos</div> 184*5dd36a3bSchristos<a id="a8dd01f4a46f162fa4f06b7df7428128e"></a> 185*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a8dd01f4a46f162fa4f06b7df7428128e">§ </a></span>cbor_array_handle()</h2> 186*5dd36a3bSchristos 187*5dd36a3bSchristos<div class="memitem"> 188*5dd36a3bSchristos<div class="memproto"> 189*5dd36a3bSchristos <table class="memname"> 190*5dd36a3bSchristos <tr> 191*5dd36a3bSchristos <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>** cbor_array_handle </td> 192*5dd36a3bSchristos <td>(</td> 193*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 194*5dd36a3bSchristos <td class="paramname"><em>item</em></td><td>)</td> 195*5dd36a3bSchristos <td></td> 196*5dd36a3bSchristos </tr> 197*5dd36a3bSchristos </table> 198*5dd36a3bSchristos</div><div class="memdoc"> 199*5dd36a3bSchristos 200*5dd36a3bSchristos<p>Get the array contents. </p> 201*5dd36a3bSchristos<p>The items may be reordered and modified as long as references remain consistent.</p> 202*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 203*5dd36a3bSchristos <table class="params"> 204*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 205*5dd36a3bSchristos </table> 206*5dd36a3bSchristos </dd> 207*5dd36a3bSchristos</dl> 208*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd><a class="el" href="arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84" title="Get the number of members. ">cbor_array_size</a> items </dd></dl> 209*5dd36a3bSchristos 210*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00100">100</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 211*5dd36a3bSchristos 212*5dd36a3bSchristos</div> 213*5dd36a3bSchristos</div> 214*5dd36a3bSchristos<a id="ac2f1480c546a0268e8b046b365e58599"></a> 215*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#ac2f1480c546a0268e8b046b365e58599">§ </a></span>cbor_array_is_definite()</h2> 216*5dd36a3bSchristos 217*5dd36a3bSchristos<div class="memitem"> 218*5dd36a3bSchristos<div class="memproto"> 219*5dd36a3bSchristos <table class="memname"> 220*5dd36a3bSchristos <tr> 221*5dd36a3bSchristos <td class="memname">bool cbor_array_is_definite </td> 222*5dd36a3bSchristos <td>(</td> 223*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 224*5dd36a3bSchristos <td class="paramname"><em>item</em></td><td>)</td> 225*5dd36a3bSchristos <td></td> 226*5dd36a3bSchristos </tr> 227*5dd36a3bSchristos </table> 228*5dd36a3bSchristos</div><div class="memdoc"> 229*5dd36a3bSchristos 230*5dd36a3bSchristos<p>Is the array definite? </p> 231*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 232*5dd36a3bSchristos <table class="params"> 233*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 234*5dd36a3bSchristos </table> 235*5dd36a3bSchristos </dd> 236*5dd36a3bSchristos</dl> 237*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>Is the array definite? </dd></dl> 238*5dd36a3bSchristos 239*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00088">88</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 240*5dd36a3bSchristos 241*5dd36a3bSchristos</div> 242*5dd36a3bSchristos</div> 243*5dd36a3bSchristos<a id="a291a9f3ff12a2e2c58b2ca8b00280d40"></a> 244*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a291a9f3ff12a2e2c58b2ca8b00280d40">§ </a></span>cbor_array_is_indefinite()</h2> 245*5dd36a3bSchristos 246*5dd36a3bSchristos<div class="memitem"> 247*5dd36a3bSchristos<div class="memproto"> 248*5dd36a3bSchristos <table class="memname"> 249*5dd36a3bSchristos <tr> 250*5dd36a3bSchristos <td class="memname">bool cbor_array_is_indefinite </td> 251*5dd36a3bSchristos <td>(</td> 252*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 253*5dd36a3bSchristos <td class="paramname"><em>item</em></td><td>)</td> 254*5dd36a3bSchristos <td></td> 255*5dd36a3bSchristos </tr> 256*5dd36a3bSchristos </table> 257*5dd36a3bSchristos</div><div class="memdoc"> 258*5dd36a3bSchristos 259*5dd36a3bSchristos<p>Is the array indefinite? </p> 260*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 261*5dd36a3bSchristos <table class="params"> 262*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 263*5dd36a3bSchristos </table> 264*5dd36a3bSchristos </dd> 265*5dd36a3bSchristos</dl> 266*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>Is the array indefinite? </dd></dl> 267*5dd36a3bSchristos 268*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00094">94</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 269*5dd36a3bSchristos 270*5dd36a3bSchristos</div> 271*5dd36a3bSchristos</div> 272*5dd36a3bSchristos<a id="abb1c1c9731a2195857dc471f2a6f60f5"></a> 273*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#abb1c1c9731a2195857dc471f2a6f60f5">§ </a></span>cbor_array_push()</h2> 274*5dd36a3bSchristos 275*5dd36a3bSchristos<div class="memitem"> 276*5dd36a3bSchristos<div class="memproto"> 277*5dd36a3bSchristos <table class="memname"> 278*5dd36a3bSchristos <tr> 279*5dd36a3bSchristos <td class="memname">bool cbor_array_push </td> 280*5dd36a3bSchristos <td>(</td> 281*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 282*5dd36a3bSchristos <td class="paramname"><em>array</em>, </td> 283*5dd36a3bSchristos </tr> 284*5dd36a3bSchristos <tr> 285*5dd36a3bSchristos <td class="paramkey"></td> 286*5dd36a3bSchristos <td></td> 287*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 288*5dd36a3bSchristos <td class="paramname"><em>pushee</em> </td> 289*5dd36a3bSchristos </tr> 290*5dd36a3bSchristos <tr> 291*5dd36a3bSchristos <td></td> 292*5dd36a3bSchristos <td>)</td> 293*5dd36a3bSchristos <td></td><td></td> 294*5dd36a3bSchristos </tr> 295*5dd36a3bSchristos </table> 296*5dd36a3bSchristos</div><div class="memdoc"> 297*5dd36a3bSchristos 298*5dd36a3bSchristos<p>Append to the end. </p> 299*5dd36a3bSchristos<p>For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.</p> 300*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 301*5dd36a3bSchristos <table class="params"> 302*5dd36a3bSchristos <tr><td class="paramname">array[borrow]</td><td>An array </td></tr> 303*5dd36a3bSchristos <tr><td class="paramname">pushee[incref]</td><td>The item to push </td></tr> 304*5dd36a3bSchristos </table> 305*5dd36a3bSchristos </dd> 306*5dd36a3bSchristos</dl> 307*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>true on success, false on failure </dd></dl> 308*5dd36a3bSchristos 309*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00052">52</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 310*5dd36a3bSchristos 311*5dd36a3bSchristos</div> 312*5dd36a3bSchristos</div> 313*5dd36a3bSchristos<a id="a44020515090bbbe91249aff0016ab8e5"></a> 314*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a44020515090bbbe91249aff0016ab8e5">§ </a></span>cbor_array_replace()</h2> 315*5dd36a3bSchristos 316*5dd36a3bSchristos<div class="memitem"> 317*5dd36a3bSchristos<div class="memproto"> 318*5dd36a3bSchristos <table class="memname"> 319*5dd36a3bSchristos <tr> 320*5dd36a3bSchristos <td class="memname">bool cbor_array_replace </td> 321*5dd36a3bSchristos <td>(</td> 322*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 323*5dd36a3bSchristos <td class="paramname"><em>item</em>, </td> 324*5dd36a3bSchristos </tr> 325*5dd36a3bSchristos <tr> 326*5dd36a3bSchristos <td class="paramkey"></td> 327*5dd36a3bSchristos <td></td> 328*5dd36a3bSchristos <td class="paramtype">size_t </td> 329*5dd36a3bSchristos <td class="paramname"><em>index</em>, </td> 330*5dd36a3bSchristos </tr> 331*5dd36a3bSchristos <tr> 332*5dd36a3bSchristos <td class="paramkey"></td> 333*5dd36a3bSchristos <td></td> 334*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 335*5dd36a3bSchristos <td class="paramname"><em>value</em> </td> 336*5dd36a3bSchristos </tr> 337*5dd36a3bSchristos <tr> 338*5dd36a3bSchristos <td></td> 339*5dd36a3bSchristos <td>)</td> 340*5dd36a3bSchristos <td></td><td></td> 341*5dd36a3bSchristos </tr> 342*5dd36a3bSchristos </table> 343*5dd36a3bSchristos</div><div class="memdoc"> 344*5dd36a3bSchristos 345*5dd36a3bSchristos<p>Replace item at an index. </p> 346*5dd36a3bSchristos<p>The item being replace will be <a class="el" href="common_8h.html#aa10ebec46eddc9312ec46a0898b5d196" title="Decreases the reference count by one, deallocating the item if needed. ">cbor_decref</a> 'ed.</p> 347*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 348*5dd36a3bSchristos <table class="params"> 349*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 350*5dd36a3bSchristos <tr><td class="paramname">value[incref]</td><td>The item to assign </td></tr> 351*5dd36a3bSchristos <tr><td class="paramname">index</td><td>The index, first item is 0. </td></tr> 352*5dd36a3bSchristos </table> 353*5dd36a3bSchristos </dd> 354*5dd36a3bSchristos</dl> 355*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>true on success, false on allocation failure. </dd></dl> 356*5dd36a3bSchristos 357*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00042">42</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 358*5dd36a3bSchristos 359*5dd36a3bSchristos</div> 360*5dd36a3bSchristos</div> 361*5dd36a3bSchristos<a id="a382cc2dc480ebb9c7951eb3235be89b4"></a> 362*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a382cc2dc480ebb9c7951eb3235be89b4">§ </a></span>cbor_array_set()</h2> 363*5dd36a3bSchristos 364*5dd36a3bSchristos<div class="memitem"> 365*5dd36a3bSchristos<div class="memproto"> 366*5dd36a3bSchristos <table class="memname"> 367*5dd36a3bSchristos <tr> 368*5dd36a3bSchristos <td class="memname">bool cbor_array_set </td> 369*5dd36a3bSchristos <td>(</td> 370*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 371*5dd36a3bSchristos <td class="paramname"><em>item</em>, </td> 372*5dd36a3bSchristos </tr> 373*5dd36a3bSchristos <tr> 374*5dd36a3bSchristos <td class="paramkey"></td> 375*5dd36a3bSchristos <td></td> 376*5dd36a3bSchristos <td class="paramtype">size_t </td> 377*5dd36a3bSchristos <td class="paramname"><em>index</em>, </td> 378*5dd36a3bSchristos </tr> 379*5dd36a3bSchristos <tr> 380*5dd36a3bSchristos <td class="paramkey"></td> 381*5dd36a3bSchristos <td></td> 382*5dd36a3bSchristos <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 383*5dd36a3bSchristos <td class="paramname"><em>value</em> </td> 384*5dd36a3bSchristos </tr> 385*5dd36a3bSchristos <tr> 386*5dd36a3bSchristos <td></td> 387*5dd36a3bSchristos <td>)</td> 388*5dd36a3bSchristos <td></td><td></td> 389*5dd36a3bSchristos </tr> 390*5dd36a3bSchristos </table> 391*5dd36a3bSchristos</div><div class="memdoc"> 392*5dd36a3bSchristos 393*5dd36a3bSchristos<p>Set item by index. </p> 394*5dd36a3bSchristos<p>Creating arrays with holes is not possible</p> 395*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 396*5dd36a3bSchristos <table class="params"> 397*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 398*5dd36a3bSchristos <tr><td class="paramname">value[incref]</td><td>The item to assign </td></tr> 399*5dd36a3bSchristos <tr><td class="paramname">index</td><td>The index, first item is 0. </td></tr> 400*5dd36a3bSchristos </table> 401*5dd36a3bSchristos </dd> 402*5dd36a3bSchristos</dl> 403*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>true on success, false on allocation failure. </dd></dl> 404*5dd36a3bSchristos 405*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00030">30</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 406*5dd36a3bSchristos 407*5dd36a3bSchristos</div> 408*5dd36a3bSchristos</div> 409*5dd36a3bSchristos<a id="a4f634a9a4bc834e4ea6ac43e94d51f84"></a> 410*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a4f634a9a4bc834e4ea6ac43e94d51f84">§ </a></span>cbor_array_size()</h2> 411*5dd36a3bSchristos 412*5dd36a3bSchristos<div class="memitem"> 413*5dd36a3bSchristos<div class="memproto"> 414*5dd36a3bSchristos <table class="memname"> 415*5dd36a3bSchristos <tr> 416*5dd36a3bSchristos <td class="memname">size_t cbor_array_size </td> 417*5dd36a3bSchristos <td>(</td> 418*5dd36a3bSchristos <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td> 419*5dd36a3bSchristos <td class="paramname"><em>item</em></td><td>)</td> 420*5dd36a3bSchristos <td></td> 421*5dd36a3bSchristos </tr> 422*5dd36a3bSchristos </table> 423*5dd36a3bSchristos</div><div class="memdoc"> 424*5dd36a3bSchristos 425*5dd36a3bSchristos<p>Get the number of members. </p> 426*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 427*5dd36a3bSchristos <table class="params"> 428*5dd36a3bSchristos <tr><td class="paramname">item[borrow]</td><td>An array </td></tr> 429*5dd36a3bSchristos </table> 430*5dd36a3bSchristos </dd> 431*5dd36a3bSchristos</dl> 432*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd>The number of members </dd></dl> 433*5dd36a3bSchristos 434*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00012">12</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 435*5dd36a3bSchristos 436*5dd36a3bSchristos</div> 437*5dd36a3bSchristos</div> 438*5dd36a3bSchristos<a id="a93d7c18019000d5e206a81a4cca70631"></a> 439*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#a93d7c18019000d5e206a81a4cca70631">§ </a></span>cbor_new_definite_array()</h2> 440*5dd36a3bSchristos 441*5dd36a3bSchristos<div class="memitem"> 442*5dd36a3bSchristos<div class="memproto"> 443*5dd36a3bSchristos <table class="memname"> 444*5dd36a3bSchristos <tr> 445*5dd36a3bSchristos <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_definite_array </td> 446*5dd36a3bSchristos <td>(</td> 447*5dd36a3bSchristos <td class="paramtype">size_t </td> 448*5dd36a3bSchristos <td class="paramname"><em>size</em></td><td>)</td> 449*5dd36a3bSchristos <td></td> 450*5dd36a3bSchristos </tr> 451*5dd36a3bSchristos </table> 452*5dd36a3bSchristos</div><div class="memdoc"> 453*5dd36a3bSchristos 454*5dd36a3bSchristos<p>Create new definite array. </p> 455*5dd36a3bSchristos<dl class="params"><dt>Parameters</dt><dd> 456*5dd36a3bSchristos <table class="params"> 457*5dd36a3bSchristos <tr><td class="paramname">size</td><td>Number of slots to preallocate </td></tr> 458*5dd36a3bSchristos </table> 459*5dd36a3bSchristos </dd> 460*5dd36a3bSchristos</dl> 461*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd><b>new</b> array or <code>NULL</code> upon malloc failure </dd></dl> 462*5dd36a3bSchristos 463*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00106">106</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 464*5dd36a3bSchristos 465*5dd36a3bSchristos</div> 466*5dd36a3bSchristos</div> 467*5dd36a3bSchristos<a id="aaec916ccc6f19782b6aef5ec1da2cc26"></a> 468*5dd36a3bSchristos<h2 class="memtitle"><span class="permalink"><a href="#aaec916ccc6f19782b6aef5ec1da2cc26">§ </a></span>cbor_new_indefinite_array()</h2> 469*5dd36a3bSchristos 470*5dd36a3bSchristos<div class="memitem"> 471*5dd36a3bSchristos<div class="memproto"> 472*5dd36a3bSchristos <table class="memname"> 473*5dd36a3bSchristos <tr> 474*5dd36a3bSchristos <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_indefinite_array </td> 475*5dd36a3bSchristos <td>(</td> 476*5dd36a3bSchristos <td class="paramname"></td><td>)</td> 477*5dd36a3bSchristos <td></td> 478*5dd36a3bSchristos </tr> 479*5dd36a3bSchristos </table> 480*5dd36a3bSchristos</div><div class="memdoc"> 481*5dd36a3bSchristos 482*5dd36a3bSchristos<p>Create new indefinite array. </p> 483*5dd36a3bSchristos<dl class="section return"><dt>Returns</dt><dd><b>new</b> array or <code>NULL</code> upon malloc failure </dd></dl> 484*5dd36a3bSchristos 485*5dd36a3bSchristos<p>Definition at line <a class="el" href="arrays_8c_source.html#l00138">138</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p> 486*5dd36a3bSchristos 487*5dd36a3bSchristos</div> 488*5dd36a3bSchristos</div> 489*5dd36a3bSchristos</div><!-- contents --> 490*5dd36a3bSchristos<!-- start footer part --> 491*5dd36a3bSchristos<hr class="footer"/><address class="footer"><small> 492*5dd36a3bSchristosGenerated on Mon Feb 6 2017 00:26:19 for libcbor by  <a href="http://www.doxygen.org/index.html"> 493*5dd36a3bSchristos<img class="footer" src="doxygen.png" alt="doxygen"/> 494*5dd36a3bSchristos</a> 1.8.12 495*5dd36a3bSchristos</small></address> 496*5dd36a3bSchristos</body> 497*5dd36a3bSchristos</html> 498