Files
opennurbs/6/d4/d1e/class_o_n___serial_number_map.html
Bozo 832ccb5c1a Publish!
Generated from v6.0.11315.11111-test14
2018-02-03 11:08:49 -08:00

558 lines
39 KiB
HTML

<!-- HTML header for doxygen 1.8.13-->
<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>openNURBS SDK Help: ON_SerialNumberMap 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="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../customdoxygen.css" rel="stylesheet" type="text/css"/>
<!-- bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- smartmenus -->
<link href="../../jquery.smartmenus.bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="../../jquery.smartmenus.js"></script>
<script type="text/javascript" src="../../jquery.smartmenus.bootstrap.js"></script>
</head>
<body>
<!-- <div class="version-banner">
Go back to the <a href="/">main site</a>...
</div> -->
<div class="container">
<!-- navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<a class="navbar-brand" href="#">openNURBS SDK Help</a>
<div class="navbar-collapse collapse" id="main-nav-placeholder">
<!-- <p class="navbar-text navbar-right">v6.0</p> -->
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" href="#">v6.0 <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Latest (6.x)</a></li>
<li class="disabled"><a href="#">WIP (7.x)</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div class="page-content">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('../../',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../dc/df4/class_o_n___serial_number_map-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ON_SerialNumberMap Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html" title="ON_SerialNumberMap provides a way to map set of unique serial number - uuid pairs to application defi...">ON_SerialNumberMap</a> provides a way to map set of unique serial number - uuid pairs to application defined values so that adding, finding and removing serial numbers is fast and efficient. The class is designed to handle several millions of unique serial numbers. There are no restrictions on what order numbers are added and removed. The minimum memory footprint is less than 150KB and doesn't increase until you have more than 8000 serial numbers. It is possible to have an active serial number and an inactive id.
<a href="../../d4/d1e/class_o_n___serial_number_map.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../d7/dc7/opennurbs__lookup_8h_source.html">opennurbs_lookup.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df3/struct_o_n___serial_number_map_1_1_m_a_p___v_a_l_u_e.html">MAP_VALUE</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a></td></tr>
<tr class="separator:"><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:ade39350227a19c80e76e68ee8e7c3ec7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ade39350227a19c80e76e68ee8e7c3ec7">ON_SerialNumberMap</a> ()</td></tr>
<tr class="separator:ade39350227a19c80e76e68ee8e7c3ec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fcc4316a166cbecd462bdb31807cdb9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a1fcc4316a166cbecd462bdb31807cdb9">~ON_SerialNumberMap</a> ()</td></tr>
<tr class="separator:a1fcc4316a166cbecd462bdb31807cdb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae869883459be99d1cacd50c36c7791ce"><td class="memItemLeft" align="right" valign="top">ON__UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ae869883459be99d1cacd50c36c7791ce">ActiveIdCount</a> () const</td></tr>
<tr class="separator:ae869883459be99d1cacd50c36c7791ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a086f6cc264c00a4c89b6da87c7c7dfe8"><td class="memItemLeft" align="right" valign="top">ON__UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a086f6cc264c00a4c89b6da87c7c7dfe8">ActiveSerialNumberCount</a> () const</td></tr>
<tr class="separator:a086f6cc264c00a4c89b6da87c7c7dfe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96df5f40a4c460657c8343a5353edff3"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a96df5f40a4c460657c8343a5353edff3">AddSerialNumber</a> (ON__UINT64 sn)</td></tr>
<tr class="memdesc:a96df5f40a4c460657c8343a5353edff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a serial number to the map. <a href="#a96df5f40a4c460657c8343a5353edff3">More...</a><br /></td></tr>
<tr class="separator:a96df5f40a4c460657c8343a5353edff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac34da15e7c4d4fd7064b453f79a5d5c3"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ac34da15e7c4d4fd7064b453f79a5d5c3">AddSerialNumberAndId</a> (ON__UINT64 sn, <a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a> id)</td></tr>
<tr class="separator:ac34da15e7c4d4fd7064b453f79a5d5c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc966db78c0e387c97bc83316e88a458"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#adc966db78c0e387c97bc83316e88a458">Dump</a> (<a class="el" href="../../d2/da3/class_o_n___text_log.html">ON_TextLog</a> &amp;text_log) const</td></tr>
<tr class="separator:adc966db78c0e387c97bc83316e88a458"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba91e707ff57712b2f6f77482767c46a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#aba91e707ff57712b2f6f77482767c46a">EmptyList</a> ()</td></tr>
<tr class="memdesc:aba91e707ff57712b2f6f77482767c46a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empties the list. <a href="#aba91e707ff57712b2f6f77482767c46a">More...</a><br /></td></tr>
<tr class="separator:aba91e707ff57712b2f6f77482767c46a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22a3d98e52e8fecd9c91d5178644add2"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a22a3d98e52e8fecd9c91d5178644add2">FindId</a> (<a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a>) const</td></tr>
<tr class="separator:a22a3d98e52e8fecd9c91d5178644add2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3398d52f452f1541a9164b30adc03ab6"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a3398d52f452f1541a9164b30adc03ab6">FindSerialNumber</a> (ON__UINT64 sn) const</td></tr>
<tr class="separator:a3398d52f452f1541a9164b30adc03ab6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac335b7613050b067afda5fe6a64b1acd"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ac335b7613050b067afda5fe6a64b1acd">FirstElement</a> () const</td></tr>
<tr class="separator:ac335b7613050b067afda5fe6a64b1acd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f0ffe4c4d9be6d2425cd757c5e97d1d"><td class="memItemLeft" align="right" valign="top">ON__UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a2f0ffe4c4d9be6d2425cd757c5e97d1d">GetElements</a> (ON__UINT64 sn0, ON__UINT64 sn1, ON__UINT64 max_count, <a class="el" href="../../dc/dfe/class_o_n___simple_array.html">ON_SimpleArray</a>&lt; <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> &gt; &amp;elements) const</td></tr>
<tr class="memdesc:a2f0ffe4c4d9be6d2425cd757c5e97d1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds all the elements whose serial numbers are in the range sn0 &lt;= sn &lt;= sn1 and appends them to the elements[] array. If max_count &gt; 0, it specifies the maximum number of elements to append. <a href="#a2f0ffe4c4d9be6d2425cd757c5e97d1d">More...</a><br /></td></tr>
<tr class="separator:a2f0ffe4c4d9be6d2425cd757c5e97d1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac09208444cb4f2c29c734e11dd94dc4f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ac09208444cb4f2c29c734e11dd94dc4f">IsValid</a> (bool bBuildHashTable, <a class="el" href="../../d2/da3/class_o_n___text_log.html">ON_TextLog</a> *textlog) const</td></tr>
<tr class="memdesc:ac09208444cb4f2c29c734e11dd94dc4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the map is valid. Returns false if the map is not valid. If an error is found and textlog is not null, then a description of the problem is sent to textlog. <a href="#ac09208444cb4f2c29c734e11dd94dc4f">More...</a><br /></td></tr>
<tr class="separator:ac09208444cb4f2c29c734e11dd94dc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fbb7511b5d531ac9081dd5cf7a21b3d"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a8fbb7511b5d531ac9081dd5cf7a21b3d">LastElement</a> () const</td></tr>
<tr class="separator:a8fbb7511b5d531ac9081dd5cf7a21b3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8d46ef6a88cd61b7ce5d5c0a48ad702"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#af8d46ef6a88cd61b7ce5d5c0a48ad702">RemoveId</a> (ON__UINT64 sn, <a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a> id)</td></tr>
<tr class="separator:af8d46ef6a88cd61b7ce5d5c0a48ad702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5a55bfca57de46722873e074f702acd"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#aa5a55bfca57de46722873e074f702acd">RemoveSerialNumberAndId</a> (ON__UINT64 sn)</td></tr>
<tr class="separator:aa5a55bfca57de46722873e074f702acd"><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><a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html" title="ON_SerialNumberMap provides a way to map set of unique serial number - uuid pairs to application defi...">ON_SerialNumberMap</a> provides a way to map set of unique serial number - uuid pairs to application defined values so that adding, finding and removing serial numbers is fast and efficient. The class is designed to handle several millions of unique serial numbers. There are no restrictions on what order numbers are added and removed. The minimum memory footprint is less than 150KB and doesn't increase until you have more than 8000 serial numbers. It is possible to have an active serial number and an inactive id. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ade39350227a19c80e76e68ee8e7c3ec7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade39350227a19c80e76e68ee8e7c3ec7">&#9670;&nbsp;</a></span>ON_SerialNumberMap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ON_SerialNumberMap::ON_SerialNumberMap </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a1fcc4316a166cbecd462bdb31807cdb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fcc4316a166cbecd462bdb31807cdb9">&#9670;&nbsp;</a></span>~ON_SerialNumberMap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ON_SerialNumberMap::~ON_SerialNumberMap </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae869883459be99d1cacd50c36c7791ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae869883459be99d1cacd50c36c7791ce">&#9670;&nbsp;</a></span>ActiveIdCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ON__UINT64 ON_SerialNumberMap::ActiveIdCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Number of active ids in the list. This number is less than or equal to <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a086f6cc264c00a4c89b6da87c7c7dfe8">ActiveSerialNumberCount()</a>. </dd></dl>
</div>
</div>
<a id="a086f6cc264c00a4c89b6da87c7c7dfe8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a086f6cc264c00a4c89b6da87c7c7dfe8">&#9670;&nbsp;</a></span>ActiveSerialNumberCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ON__UINT64 ON_SerialNumberMap::ActiveSerialNumberCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Number of active serial numbers in the list. </dd></dl>
</div>
</div>
<a id="a96df5f40a4c460657c8343a5353edff3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96df5f40a4c460657c8343a5353edff3">&#9670;&nbsp;</a></span>AddSerialNumber()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::AddSerialNumber </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a serial number to the map. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn</td><td>[in] serial number to add.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the serial number is valid (&gt;0), a pointer to its element is returned. When a new element is added, every byte of the m_value field is set to 0. If the serial number was already active, its element is also returned. If you need to distinguish between new and previously existing elements, then set an m_value field to something besides 0 after you add a new serial number. The id associated with this serial number will be zero and cannot be found using <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a22a3d98e52e8fecd9c91d5178644add2">FindId()</a>. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="ac34da15e7c4d4fd7064b453f79a5d5c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac34da15e7c4d4fd7064b453f79a5d5c3">&#9670;&nbsp;</a></span>AddSerialNumberAndId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::AddSerialNumberAndId </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a>&#160;</td>
<td class="paramname"><em>id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn</td><td>[in] serial number to add.</td></tr>
<tr><td class="paramname">id</td><td>[in] suggested id to add. If id is zero or already in use, another id will be assigned to the element.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the serial number is valid (&gt;0), a pointer to its element is returned. When a new element is added, every byte of the m_value field is set to 0. If the serial number was already active, its element is also returned. If you need to distinguish between new and previously existing elements, then set an m_value field to something besides 0 after you add a new serial number. If the id parameter is nil, then a new uuid is created and added. If the id parameter is not nil but is active on another element, a new uuid is created and added. You can inspect the value of m_id on the returned element to determine the id <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#ac34da15e7c4d4fd7064b453f79a5d5c3">AddSerialNumberAndId()</a> assigned to the element.</p>
<p>Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="adc966db78c0e387c97bc83316e88a458"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc966db78c0e387c97bc83316e88a458">&#9670;&nbsp;</a></span>Dump()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ON_SerialNumberMap::Dump </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d2/da3/class_o_n___text_log.html">ON_TextLog</a> &amp;&#160;</td>
<td class="paramname"><em>text_log</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aba91e707ff57712b2f6f77482767c46a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba91e707ff57712b2f6f77482767c46a">&#9670;&nbsp;</a></span>EmptyList()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ON_SerialNumberMap::EmptyList </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Empties the list. </p>
</div>
</div>
<a id="a22a3d98e52e8fecd9c91d5178644add2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22a3d98e52e8fecd9c91d5178644add2">&#9670;&nbsp;</a></span>FindId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::FindId </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a>&#160;</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>[in] id number to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the id is active, a pointer to its element is returned. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="a3398d52f452f1541a9164b30adc03ab6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3398d52f452f1541a9164b30adc03ab6">&#9670;&nbsp;</a></span>FindSerialNumber()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::FindSerialNumber </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn</td><td>[in] serial number to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the serial number is active, a pointer to its element is returned. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="ac335b7613050b067afda5fe6a64b1acd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac335b7613050b067afda5fe6a64b1acd">&#9670;&nbsp;</a></span>FirstElement()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::FirstElement </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">The active element with the smallest serial number, or null if the list is empty. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="a2f0ffe4c4d9be6d2425cd757c5e97d1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f0ffe4c4d9be6d2425cd757c5e97d1d">&#9670;&nbsp;</a></span>GetElements()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ON__UINT64 ON_SerialNumberMap::GetElements </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>max_count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dc/dfe/class_o_n___simple_array.html">ON_SimpleArray</a>&lt; <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>elements</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds all the elements whose serial numbers are in the range sn0 &lt;= sn &lt;= sn1 and appends them to the elements[] array. If max_count &gt; 0, it specifies the maximum number of elements to append. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn0</td><td>[in] Minimum serial number.</td></tr>
<tr><td class="paramname">sn1</td><td>[in] Maximum serial number</td></tr>
<tr><td class="paramname">max_count</td><td>[in] If max_count &gt; 0, this parameter specifies the maximum number of elements to append.</td></tr>
<tr><td class="paramname">elements</td><td>[out] Elements are appended to this array</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of elements appended to elements[] array. </dd></dl>
<p>When many elements are returned, <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a2f0ffe4c4d9be6d2425cd757c5e97d1d" title="Finds all the elements whose serial numbers are in the range sn0 &lt;= sn &lt;= sn1 and appends them to the...">GetElements()</a> can be substantially faster than repeated calls to FindElement(). </p>
</div>
</div>
<a id="ac09208444cb4f2c29c734e11dd94dc4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac09208444cb4f2c29c734e11dd94dc4f">&#9670;&nbsp;</a></span>IsValid()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ON_SerialNumberMap::IsValid </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>bBuildHashTable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d2/da3/class_o_n___text_log.html">ON_TextLog</a> *&#160;</td>
<td class="paramname"><em>textlog</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if the map is valid. Returns false if the map is not valid. If an error is found and textlog is not null, then a description of the problem is sent to textlog. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the list if valid. </dd></dl>
</div>
</div>
<a id="a8fbb7511b5d531ac9081dd5cf7a21b3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fbb7511b5d531ac9081dd5cf7a21b3d">&#9670;&nbsp;</a></span>LastElement()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::LastElement </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">The active element with the biggest serial number, or null if the list is empty. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="af8d46ef6a88cd61b7ce5d5c0a48ad702"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8d46ef6a88cd61b7ce5d5c0a48ad702">&#9670;&nbsp;</a></span>RemoveId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::RemoveId </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d8/db4/struct_o_n___u_u_i_d__struct.html">ON_UUID</a>&#160;</td>
<td class="paramname"><em>id</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn</td><td>[in] If &gt; 0, this is the serial number of the element with the id. If 0, the field is ignored.</td></tr>
<tr><td class="paramname">id</td><td>[in] id to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the id was active, it is removed and a pointer to its element is returned. The element's serial remains active. To remove both the id and serial number, use <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#aa5a55bfca57de46722873e074f702acd">RemoveSerialNumberAndId()</a>. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
<a id="aa5a55bfca57de46722873e074f702acd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5a55bfca57de46722873e074f702acd">&#9670;&nbsp;</a></span>RemoveSerialNumberAndId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>* ON_SerialNumberMap::RemoveSerialNumberAndId </td>
<td>(</td>
<td class="paramtype">ON__UINT64&#160;</td>
<td class="paramname"><em>sn</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sn</td><td>[in] serial number of the element to remove.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><p class="startdd">If the serial number was active, it is removed and a pointer to its element is returned. If the element's id was active, the id is also removed. Restrictions: The returned pointer may become invalid after any subsequent calls to any function in this class. If you need to save information in the returned <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> for future use, you must copy the information into storage you are managing.</p>
<p class="enddd">You may change the value of the <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a>'s m_value field. You must NEVER change any other <a class="el" href="../../df/d03/struct_o_n___serial_number_map_1_1_s_n___e_l_e_m_e_n_t.html">SN_ELEMENT</a> fields or you will break searching and possibly cause crashes. </p>
</dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
</div> <!-- page-content -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Feb 3 2018 11:08:32 for openNURBS SDK Help by <a href="http://www.doxygen.org/index.html">
<!-- <img class="footer" src="../../doxygen.png" alt="doxygen"/> -->
Doxygen
</a> 1.8.13
</small></address>
</div> <!-- container -->
<!-- doxy-boot -->
<script type="text/javascript" src="../../doxy-boot.js"></script>
</body>
</html>