blob: 51cab3d789c57262b2be83d39441206300a04ab6 [file] [log] [blame]
<!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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::Annotation Class 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="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>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<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>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1Annotation.html">Annotation</a></li> </ul>
</div>
</div><!-- top -->
<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-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classcrashpad_1_1Annotation-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::Annotation Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for an annotation, which records a name-value pair of arbitrary data when set.
<a href="classcrashpad_1_1Annotation.html#details">More...</a></p>
<p><code>#include &quot;client/annotation.h&quot;</code></p>
<div class="dynheader">
Inheritance diagram for crashpad::Annotation:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1Annotation.png" usemap="#crashpad::Annotation_map" alt=""/>
<map id="crashpad::Annotation_map" name="crashpad::Annotation_map">
<area href="classcrashpad_1_1StringAnnotation.html" title="An. " alt="crashpad::StringAnnotation&lt; MaxSize &gt;" shape="rect" coords="0,56,236,80"/>
</map>
</div></div>
<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:a734ee64cd20afdb78acb8656ed867d34"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a> : uint16_t </td></tr>
<tr class="memdesc:a734ee64cd20afdb78acb8656ed867d34"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of data stored in the annotation. <a href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">More...</a><br /></td></tr>
<tr class="separator:a734ee64cd20afdb78acb8656ed867d34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe8c08cb46e337e355c0f32c6f2e1851"><td class="memItemLeft" align="right" valign="top"><a id="afe8c08cb46e337e355c0f32c6f2e1851"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#afe8c08cb46e337e355c0f32c6f2e1851">ValueSizeType</a> = uint32_t</td></tr>
<tr class="memdesc:afe8c08cb46e337e355c0f32c6f2e1851"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type used for <em><a class="el" href="classcrashpad_1_1Annotation.html#a4c742340370959ebbda4f395bb0eb303" title="Specifies the number of bytes in value_ptr_ to include when generating a crash report. ">SetSize()</a></em>. <br /></td></tr>
<tr class="separator:afe8c08cb46e337e355c0f32c6f2e1851"><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:a2eca2863d47336e481595957ad06083e"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a2eca2863d47336e481595957ad06083e">Annotation</a> (<a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a> type, const char name[], void *const value_ptr)</td></tr>
<tr class="memdesc:a2eca2863d47336e481595957ad06083e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new annotation. <a href="#a2eca2863d47336e481595957ad06083e">More...</a><br /></td></tr>
<tr class="separator:a2eca2863d47336e481595957ad06083e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c742340370959ebbda4f395bb0eb303"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a4c742340370959ebbda4f395bb0eb303">SetSize</a> (<a class="el" href="classcrashpad_1_1Annotation.html#afe8c08cb46e337e355c0f32c6f2e1851">ValueSizeType</a> size)</td></tr>
<tr class="memdesc:a4c742340370959ebbda4f395bb0eb303"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the number of bytes in <em>value_ptr_</em> to include when generating a crash report. <a href="#a4c742340370959ebbda4f395bb0eb303">More...</a><br /></td></tr>
<tr class="separator:a4c742340370959ebbda4f395bb0eb303"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32b1655d880454b6d222f820fbf64289"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a32b1655d880454b6d222f820fbf64289">Clear</a> ()</td></tr>
<tr class="memdesc:a32b1655d880454b6d222f820fbf64289"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marks the annotation as cleared, indicating the <em>value_ptr_</em> should not be included in a crash report. <a href="#a32b1655d880454b6d222f820fbf64289">More...</a><br /></td></tr>
<tr class="separator:a32b1655d880454b6d222f820fbf64289"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a666f8d98d638a98ce2636d0997a3e0e3"><td class="memItemLeft" align="right" valign="top"><a id="a666f8d98d638a98ce2636d0997a3e0e3"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a666f8d98d638a98ce2636d0997a3e0e3">is_set</a> () const</td></tr>
<tr class="memdesc:a666f8d98d638a98ce2636d0997a3e0e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests whether the annotation has been set. <br /></td></tr>
<tr class="separator:a666f8d98d638a98ce2636d0997a3e0e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7829ca2cef17796bb8080c410d5bf808"><td class="memItemLeft" align="right" valign="top"><a id="a7829ca2cef17796bb8080c410d5bf808"></a>
<a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><b>type</b> () const</td></tr>
<tr class="separator:a7829ca2cef17796bb8080c410d5bf808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae88c1e70daf478c9e277722580a0d80b"><td class="memItemLeft" align="right" valign="top"><a id="ae88c1e70daf478c9e277722580a0d80b"></a>
<a class="el" href="classcrashpad_1_1Annotation.html#afe8c08cb46e337e355c0f32c6f2e1851">ValueSizeType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>size</b> () const</td></tr>
<tr class="separator:ae88c1e70daf478c9e277722580a0d80b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a577f397f90c664cbd3992d007f18c768"><td class="memItemLeft" align="right" valign="top"><a id="a577f397f90c664cbd3992d007f18c768"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>name</b> () const</td></tr>
<tr class="separator:a577f397f90c664cbd3992d007f18c768"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a487615bbab28fba843fccaa41d8abe4b"><td class="memItemLeft" align="right" valign="top"><a id="a487615bbab28fba843fccaa41d8abe4b"></a>
const void *&#160;</td><td class="memItemRight" valign="bottom"><b>value</b> () const</td></tr>
<tr class="separator:a487615bbab28fba843fccaa41d8abe4b"><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-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab56b76fed6c08cf0d1bb5fd9a92ea1be"><td class="memItemLeft" align="right" valign="top">static constexpr <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#ab56b76fed6c08cf0d1bb5fd9a92ea1be">UserDefinedType</a> (uint16_t value)</td></tr>
<tr class="memdesc:ab56b76fed6c08cf0d1bb5fd9a92ea1be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a user-defined <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34" title="The type of data stored in the annotation. ">Annotation::Type</a>. <a href="#ab56b76fed6c08cf0d1bb5fd9a92ea1be">More...</a><br /></td></tr>
<tr class="separator:ab56b76fed6c08cf0d1bb5fd9a92ea1be"><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:a159abc1f99211ba3d3be0e68789af327"><td class="memItemLeft" align="right" valign="top"><a id="a159abc1f99211ba3d3be0e68789af327"></a>
static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a159abc1f99211ba3d3be0e68789af327">kNameMaxLength</a> = 64</td></tr>
<tr class="memdesc:a159abc1f99211ba3d3be0e68789af327"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum length of an annotation’s name, in bytes. <br /></td></tr>
<tr class="separator:a159abc1f99211ba3d3be0e68789af327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e776193af79d77a2b45138aa42fa92f"><td class="memItemLeft" align="right" valign="top"><a id="a9e776193af79d77a2b45138aa42fa92f"></a>
static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1Annotation.html#a9e776193af79d77a2b45138aa42fa92f">kValueMaxSize</a> = 5 * 4096</td></tr>
<tr class="memdesc:a9e776193af79d77a2b45138aa42fa92f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum size of an annotation’s value, in bytes. <br /></td></tr>
<tr class="separator:a9e776193af79d77a2b45138aa42fa92f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aa35daea8181e58a1cba95d8e50532054"><td class="memItemLeft" align="right" valign="top"><a id="aa35daea8181e58a1cba95d8e50532054"></a>
std::atomic&lt; <a class="el" href="classcrashpad_1_1Annotation.html">Annotation</a> * &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>link_node</b> ()</td></tr>
<tr class="separator:aa35daea8181e58a1cba95d8e50532054"><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:a7acbded5719db777f051506443bcf1f5"><td class="memItemLeft" align="right" valign="top"><a id="a7acbded5719db777f051506443bcf1f5"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>AnnotationList</b></td></tr>
<tr class="separator:a7acbded5719db777f051506443bcf1f5"><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>Base class for an annotation, which records a name-value pair of arbitrary data when set. </p>
<p>After an annotation is declared, its <code>value_ptr_</code> will not be captured in a crash report until a call to <em><a class="el" href="classcrashpad_1_1Annotation.html#a4c742340370959ebbda4f395bb0eb303" title="Specifies the number of bytes in value_ptr_ to include when generating a crash report. ">SetSize()</a></em> specifies how much data from the value should be recorded.</p>
<p>Annotations should be declared with static storage duration.</p>
<p>An example declaration and usage:</p>
<div class="fragment"><div class="line"><span class="comment">// foo.cc:</span></div><div class="line"></div><div class="line"><span class="keyword">namespace </span>{</div><div class="line"><span class="keywordtype">char</span> g_buffer[1024];</div><div class="line"><a class="code" href="classcrashpad_1_1Annotation.html">crashpad::Annotation</a> g_buffer_annotation(</div><div class="line"> <a class="code" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34a302e56d566a2561033b27c13680ea4b2">crashpad::Annotation::Type::kString</a>, <span class="stringliteral">&quot;buffer_head&quot;</span>, g_buffer);</div><div class="line">} <span class="comment">// namespace</span></div><div class="line"></div><div class="line"><span class="keywordtype">void</span> OnBufferProduced(<span class="keywordtype">size_t</span> n) {</div><div class="line"> <span class="comment">// Capture the head of the buffer, in case we crash when parsing it.</span></div><div class="line"> g_buffer_annotation.SetSize(std::min(64, n));</div><div class="line"></div><div class="line"> <span class="comment">// Start parsing the header.</span></div><div class="line"> Frobinate(g_buffer, n);</div><div class="line">}</div></div><!-- fragment --><p><a class="el" href="classcrashpad_1_1Annotation.html" title="Base class for an annotation, which records a name-value pair of arbitrary data when set...">Annotation</a> objects are not inherently thread-safe. To manipulate them from multiple threads, external synchronization must be used.</p>
<p><a class="el" href="classcrashpad_1_1Annotation.html" title="Base class for an annotation, which records a name-value pair of arbitrary data when set...">Annotation</a> objects should never be destroyed. Once they are Set(), they are permanently referenced by a global object. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a734ee64cd20afdb78acb8656ed867d34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a734ee64cd20afdb78acb8656ed867d34">&#9670;&nbsp;</a></span>Type</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">crashpad::Annotation::Type</a> : uint16_t</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The type of data stored in the annotation. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a734ee64cd20afdb78acb8656ed867d34ab10913c938482a8aa4ba85b7a1116cb4"></a>kInvalid&#160;</td><td class="fielddoc"><p>An invalid annotation. Reserved for internal use. </p>
</td></tr>
<tr><td class="fieldname"><a id="a734ee64cd20afdb78acb8656ed867d34a302e56d566a2561033b27c13680ea4b2"></a>kString&#160;</td><td class="fielddoc"><p>A <code>NUL</code>-terminated C-string. </p>
</td></tr>
<tr><td class="fieldname"><a id="a734ee64cd20afdb78acb8656ed867d34ae3b452587aa197cda501adb165e5cdf1"></a>kUserDefinedStart&#160;</td><td class="fielddoc"><p>Clients may declare their own custom types by using values greater than this. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2eca2863d47336e481595957ad06083e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2eca2863d47336e481595957ad06083e">&#9670;&nbsp;</a></span>Annotation()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr crashpad::Annotation::Annotation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char&#160;</td>
<td class="paramname"><em>name</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *const&#160;</td>
<td class="paramname"><em>value_ptr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a new annotation. </p>
<p>Upon construction, the annotation will not be included in any crash reports until </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1Annotation.html#a4c742340370959ebbda4f395bb0eb303" title="Specifies the number of bytes in value_ptr_ to include when generating a crash report. ">SetSize()</a> is called with a value greater than <code>0</code>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The data type of the value of the annotation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>A <code>NUL</code>-terminated C-string name for the annotation. Names do not have to be unique, though not all crash processors may handle Annotations with the same name. Names should be constexpr data with static storage duration. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">value_ptr</td><td>A pointer to the value for the annotation. The pointer may not be changed once associated with an annotation, but the data may be mutated. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a32b1655d880454b6d222f820fbf64289"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32b1655d880454b6d222f820fbf64289">&#9670;&nbsp;</a></span>Clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::Annotation::Clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Marks the annotation as cleared, indicating the <em>value_ptr_</em> should not be included in a crash report. </p>
<p>This method does not mutate the data referenced by the annotation, it merely updates the annotation system's bookkeeping. </p>
</div>
</div>
<a id="a4c742340370959ebbda4f395bb0eb303"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c742340370959ebbda4f395bb0eb303">&#9670;&nbsp;</a></span>SetSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::Annotation::SetSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1Annotation.html#afe8c08cb46e337e355c0f32c6f2e1851">ValueSizeType</a>&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specifies the number of bytes in <em>value_ptr_</em> to include when generating a crash report. </p>
<p>A size of <code>0</code> indicates that no value should be recorded and is the equivalent of calling </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1Annotation.html#a32b1655d880454b6d222f820fbf64289" title="Marks the annotation as cleared, indicating the value_ptr_ should not be included in a crash report...">Clear()</a>.</dd></dl>
<p>This method does not mutate the data referenced by the annotation, it merely updates the annotation system's bookkeeping.</p>
<p>Subclasses of this base class that provide additional Set methods to mutate the value of the annotation must call always call this method.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The number of bytes. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab56b76fed6c08cf0d1bb5fd9a92ea1be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab56b76fed6c08cf0d1bb5fd9a92ea1be">&#9670;&nbsp;</a></span>UserDefinedType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static constexpr <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34">Type</a> crashpad::Annotation::UserDefinedType </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a user-defined <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34" title="The type of data stored in the annotation. ">Annotation::Type</a>. </p>
<p>This exists to remove the casting overhead of <code>enum class</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A value used to create a user-defined type.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value added to <a class="el" href="classcrashpad_1_1Annotation.html#a734ee64cd20afdb78acb8656ed867d34ae3b452587aa197cda501adb165e5cdf1" title="Clients may declare their own custom types by using values greater than this. ">Type::kUserDefinedStart</a> and casted. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>client/annotation.h</li>
<li>client/annotation.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>