forked from mongodb/libbson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bson_iter_document.page
40 lines (35 loc) · 1.55 KB
/
bson_iter_document.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
type="topic"
style="function"
xmlns:api="http://projectmallard.org/experimental/api/"
xmlns:ui="http://projectmallard.org/experimental/ui/"
id="bson_iter_document">
<info>
<link type="guide" xref="bson_iter_t" group="function"/>
</info>
<title>bson_iter_document()</title>
<section id="synopsis">
<title>Synopsis</title>
<synopsis><code mime="text/x-csrc"><![CDATA[
#define BSON_ITER_HOLDS_DOCUMENT(iter) \
(bson_iter_type ((iter)) == BSON_TYPE_DOCUMENT)
void
bson_iter_document (const bson_iter_t *iter,
uint32_t *document_len,
const uint8_t **document);
]]></code></synopsis>
</section>
<section id="parameters">
<title>Parameters</title>
<table>
<tr><td><p>iter</p></td><td><p>A <code xref="bson_iter_t">bson_iter_t</code>.</p></td></tr>
<tr><td><p>document_len</p></td><td><p>A location for the length of the document in bytes.</p></td></tr>
<tr><td><p>document</p></td><td><p>A location for the document buffer.</p></td></tr>
</table>
</section>
<section id="description">
<title>Description</title>
<p>The <code>bson_iter_document()</code> function shall retrieve the raw buffer of a sub-document from <code>iter</code>. <code>iter</code> <em>MUST</em> be on an element that is of type BSON_TYPE_DOCUMENT. This can be verified with <code xref="bson_iter_type">bson_iter_type()</code> or the <code>BSON_ITER_HOLDS_DOCUMENT()</code> macro.</p>
</section>
</page>