Files
opennurbs/6/d4/d1e/class_o_n___serial_number_map.html
Bozo 013efd06c9 Publish!
Generated from v6.0.11315.11111-test11
2018-01-31 14:30:40 -08:00

484 lines
34 KiB
HTML

<!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="../../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" />
</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">openNURBS SDK Help
&#160;<span id="projectnumber">6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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><!-- 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><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="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="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="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="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"><dl class="section rcs"><dt>NoKeywords</dt><dd></dd></dl>
<p>/ / Copyright (c) 1993-2012 Robert McNeel &amp; Associates. All rights reserved. / OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert / McNeel &amp; Associates. / / THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. / ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF / MERCHANTABILITY ARE HEREBY DISCLAIMED. / / For complete openNURBS copyright information see <a href="http://www.opennurbs.org">http://www.opennurbs.org</a>. / ////////////////////////////////////////////////////////////// Description: <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html">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">
<p>Returns: 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>. </p>
</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">
<p>Returns: Number of active serial numbers in the list. </p>
</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>Description: Add a serial number to the map. Parameters: sn - [in] serial number to add. Returns: 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>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>
</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">
<p>Parameters: sn - [in] serial number to add. id - [in] suggested id to add. If id is zero or already in use, another id will be assigned to the element. Returns: 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>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>
</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>Description: 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">
<p>Parameters: id - [in] id number to search for. Returns: 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>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>
</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">
<p>Parameters: sn - [in] serial number to search for. Returns: 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>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>
</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">
<p>Returns: 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>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>
</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>Description: 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. Parameters: sn0 - [in] Minimum serial number. sn1 - [in] Maximum serial number max_count - [in] If max_count &gt; 0, this parameter specifies the maximum number of elements to append. elements - [out] Elements are appended to this array Returns: Number of elements appended to elements[] array. Remarks: When many elements are returned, <a class="el" href="../../d4/d1e/class_o_n___serial_number_map.html#a2f0ffe4c4d9be6d2425cd757c5e97d1d">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>Description: 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. Returns: true if the list if valid. </p>
</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">
<p>Returns: 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>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>
</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">
<p>Parameters: sn - [in] If &gt; 0, this is the serial number of the element with the id. If 0, the field is ignored. id - [in] id to search for. Returns: 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>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>
</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">
<p>Parameters: sn - [in] serial number of the element to remove. Returns: 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>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>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 14:30:16 for openNURBS SDK Help by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>