Generated from v6.0.11315.11111-test10
This commit is contained in:
Bozo
2018-01-26 04:54:48 -08:00
parent 2ea16cc86c
commit 55446d56ce
1111 changed files with 7129 additions and 10641 deletions

View File

@@ -3,7 +3,7 @@
<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="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>openNURBS SDK Help: ON_SimpleArray&lt; T &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -22,6 +22,7 @@
<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>
@@ -29,21 +30,18 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<!-- Generated by Doxygen 1.8.13 -->
<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>
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
@@ -258,11 +256,7 @@ Protected Attributes</h2></td></tr>
class ON_SimpleArray&lt; T &gt;</h3>
<dl class="section rcs"><dt>NoKeywords</dt><dd></dd></dl>
<p><br />
<br />
/ / 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. / <br />
<br />
/ For complete openNURBS copyright information see <a href="http://www.opennurbs.org">http://www.opennurbs.org</a>. / //////////////////////////////////////////////////////////////</p>
<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>. / //////////////////////////////////////////////////////////////</p>
<p>The ON_SimpleArray&lt;&gt; template is more efficient than the ON_ClassArray&lt;&gt; template, but ON_SimpleArray&lt;&gt; should not be used for arrays of classes that require explicit construction, destruction, or copy operators.</p>
<p>Elements returned by <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad6fb51ad272618b034b8dd4695094a2d" title="array operations //////////////////////////////////////////////////// ">AppendNew()</a> are memset to zero.</p>
<p>By default, ON_SimpleArray&lt;&gt; uses onrealloc() to manage the dynamic array memory. If you want to use something besides onrealloc() to manage the array memory, then override <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#aba771b1bd1d30886c96da29ab89b86da" title="low level memory managment ////////////////////////////////////////// ">ON_SimpleArray::Realloc()</a>. </p>
@@ -381,9 +375,8 @@ template&lt;class T&gt; </div>
</div><div class="memdoc">
<p>Append copy of element. Increments count by 1. </p>
<p>&lt; (int) cast is for 64 bit pointers</p>
<p>26 Sep 2005 Dale Lear User passed in an element of the m_a[] that will get reallocated by the call to Reserve(newcapacity). <br />
<br />
&lt; ON_*Array&lt;&gt; templates do not require robust copy constructor.</p>
<p>26 Sep 2005 Dale Lear User passed in an element of the m_a[] that will get reallocated by the call to Reserve(newcapacity).</p>
<p>&lt; ON_*Array&lt;&gt; templates do not require robust copy constructor.</p>
<p>&lt; ON_*Array&lt;&gt; templates require a robust operator=. </p>
</div>
@@ -675,16 +668,13 @@ template&lt;class T&gt; </div>
</div><div class="memdoc">
<p>See Also: ON_CompareIncreasing&lt;T&gt; and ON_CompareDeccreasing&lt;T&gt; </p>
<p>BinarySearch( p, compare ) does a fast search of a sorted array and returns the smallest index "i" of the element that satisifies 0==compare(p,&amp;array[i]). <br />
<br />
BinarySearch( p, compare, count ) does a fast search of the first count element sorted array and returns the smallest index "i" of the element that satisifies 0==compare(p,&amp;array[i]). The version that takes a "count" is useful when elements are being appended during a calculation and the appended elements are not sorted.</p>
<p>If the search is successful, <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#adfff8569ef8e5248c46a586d3a7f5d8d" title="See Also: ON_CompareIncreasing&lt;T&gt; and ON_CompareDeccreasing&lt;T&gt; ">BinarySearch()</a> returns the index of the element (&gt;=0). If the search is not successful, <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#adfff8569ef8e5248c46a586d3a7f5d8d" title="See Also: ON_CompareIncreasing&lt;T&gt; and ON_CompareDeccreasing&lt;T&gt; ">BinarySearch()</a> returns -1. <br />
<br />
Use QuickSort( compare ) or, in rare cases and after meaningful performance testing using optimzed release builds, HeapSort( compare ) to sort the array. </p>
<p>BinarySearch( p, compare ) does a fast search of a sorted array and returns the smallest index "i" of the element that satisifies 0==compare(p,&amp;array[i]).</p>
<p>BinarySearch( p, compare, count ) does a fast search of the first count element sorted array and returns the smallest index "i" of the element that satisifies 0==compare(p,&amp;array[i]). The version that takes a "count" is useful when elements are being appended during a calculation and the appended elements are not sorted.</p>
<p>If the search is successful, <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#adfff8569ef8e5248c46a586d3a7f5d8d" title="See Also: ON_CompareIncreasing&lt;T&gt; and ON_CompareDeccreasing&lt;T&gt; ">BinarySearch()</a> returns the index of the element (&gt;=0). If the search is not successful, <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#adfff8569ef8e5248c46a586d3a7f5d8d" title="See Also: ON_CompareIncreasing&lt;T&gt; and ON_CompareDeccreasing&lt;T&gt; ">BinarySearch()</a> returns -1. Use QuickSort( compare ) or, in rare cases and after meaningful performance testing using optimzed release builds, HeapSort( compare ) to sort the array. </p>
<p>This worked on a wide range of 32 bit compilers.</p>
<p>Convert "found" pointer to array index.</p>
<p>In an ideal world, return ((int)(found - m_a)) would work everywhere. In practice, this should work any 32 bit compiler and we can hope the optimzer generates efficient code. <br />
"key" not found </p>
<p>In an ideal world, return ((int)(found - m_a)) would work everywhere. In practice, this should work any 32 bit compiler and we can hope the optimzer generates efficient code.</p>
<p>"key" not found </p>
</div>
</div>
@@ -723,8 +713,8 @@ template&lt;class T&gt; </div>
</div><div class="memdoc">
<p>This worked on a wide range of 32 bit compilers.</p>
<p>Convert "found" pointer to array index.</p>
<p>In an ideal world, return ((int)(found - m_a)) would work everywhere. In practice, this should work any 32 bit compiler and we can hope the optimzer generates efficient code. <br />
"key" not found </p>
<p>In an ideal world, return ((int)(found - m_a)) would work everywhere. In practice, this should work any 32 bit compiler and we can hope the optimzer generates efficient code.</p>
<p>"key" not found </p>
</div>
</div>
@@ -1095,12 +1085,9 @@ template&lt;class T &gt; </div>
</table>
</div><div class="memdoc">
<p>is &lt; current <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a>, then count is reduced to value.When the dynamic array needs to grow, this calculates the new value for m_capacity. </p>
<p>Note: This code appears in <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a5d2395da5bc042c230d799ed92c9c564">ON_SimpleArray&lt;T&gt;::NewCapacity()</a> and <a class="el" href="../../dd/d40/class_o_n___class_array.html#a39b36908b477ca9e79dd435d1802237a">ON_ClassArray&lt;T&gt;::NewCapacity()</a>. Changes made to either function should be made to both functions. Because this code is template code that has to support dynamic linking and the code is defined in a header, I'm using copy-and-paste rather than a static. <br />
<br />
<br />
This function returns 2*m_count unless that will result in an additional allocation of more than cap_size bytes. The cap_size concept was added in January 2010 because some calculations on enormous models were slightly underestimating the initial <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a854343dc47d8e351690acaa531f2b44a" title="memory managment //////////////////////////////////////////////////// ">Reserve()</a> size and then wasting gigabytes of memory. <br />
<br />
cap_size = 128 MB on 32-bit os, 256 MB on 64 bit os</p>
<p>Note: This code appears in <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a5d2395da5bc042c230d799ed92c9c564">ON_SimpleArray&lt;T&gt;::NewCapacity()</a> and <a class="el" href="../../dd/d40/class_o_n___class_array.html#a39b36908b477ca9e79dd435d1802237a">ON_ClassArray&lt;T&gt;::NewCapacity()</a>. Changes made to either function should be made to both functions. Because this code is template code that has to support dynamic linking and the code is defined in a header, I'm using copy-and-paste rather than a static.</p>
<p>This function returns 2*m_count unless that will result in an additional allocation of more than cap_size bytes. The cap_size concept was added in January 2010 because some calculations on enormous models were slightly underestimating the initial <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a854343dc47d8e351690acaa531f2b44a" title="memory managment //////////////////////////////////////////////////// ">Reserve()</a> size and then wasting gigabytes of memory.</p>
<p>cap_size = 128 MB on 32-bit os, 256 MB on 64 bit os</p>
<p>Growing the array will increase the memory use by more than cap_size. </p>
</div>
@@ -1414,21 +1401,7 @@ template&lt;class T&gt; </div>
<p>1) If ptr and capacity are zero, return nullptr. 2) If ptr is nullptr, an capacity &gt; 0, allocate a memory block of capacity*sizeof(T) bytes and return a pointer to this block. If the allocation request fails, return nullptr. 3) If ptr is not nullptr and capacity is 0, free the memory block pointed to by ptr and return nullptr. 4) If ptr is not nullptr and capacity &gt; 0, then reallocate the memory block and return a pointer to the reallocated block. If the reallocation request fails, return nullptr.</p>
<p>NOTE WELL: Microsoft's VC 6.0 realloc() contains a bug that can cause crashes and should be avoided. See MSDN Knowledge Base article ID Q225099 for more information. (re)allocated capacity*sizeof(T) bytes</p>
<dl class="section rcs"><dt>NoKeywords</dt><dd></dd></dl>
<p><br />
<br />
<br />
<br />
<br />
<br />
<br />
/ / 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. / <br />
<br />
<br />
<br />
<br />
<br />
<br />
/ For complete openNURBS copyright information see <a href="http://www.opennurbs.org">http://www.opennurbs.org</a>. / //////////////////////////////////////////////////////////////When this file is parsed with /W4 warnings, two bogus warnings are generated. The <a class="el" href="../../dd/d40/class_o_n___class_array.html#ad4650327b91304e934de5bf6fe4bb9ae">ON_ClassArray&lt;T&gt;::DestroyElement</a> template function generates a C4100: 'x' : unreferenced formal parameter warning. This appears to be caused by a bug in the compiler warning code or the way templates are expanded. This pragma is needed squelch the bogus warning. The ON_CompareIncreasing and ON_CompareDecreasing templates generate a C4211: nonstandard extension used : redefined extern to static warning. Microsoft's compiler appears to have a little trouble when static functions are declared before they are defined in a single .cpp file. This pragma is needed squelch the bogus warning. The main reason the definitions of the functions for the <a class="el" href="../../dc/dfe/class_o_n___simple_array.html">ON_SimpleArray</a> and <a class="el" href="../../dd/d40/class_o_n___class_array.html">ON_ClassArray</a> templates are in this separate file is so that the Microsoft developer studio autocomplete functions will work on these classes.</p>
<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>. / //////////////////////////////////////////////////////////////When this file is parsed with /W4 warnings, two bogus warnings are generated. The <a class="el" href="../../dd/d40/class_o_n___class_array.html#ad4650327b91304e934de5bf6fe4bb9ae">ON_ClassArray&lt;T&gt;::DestroyElement</a> template function generates a C4100: 'x' : unreferenced formal parameter warning. This appears to be caused by a bug in the compiler warning code or the way templates are expanded. This pragma is needed squelch the bogus warning. The ON_CompareIncreasing and ON_CompareDecreasing templates generate a C4211: nonstandard extension used : redefined extern to static warning. Microsoft's compiler appears to have a little trouble when static functions are declared before they are defined in a single .cpp file. This pragma is needed squelch the bogus warning. The main reason the definitions of the functions for the <a class="el" href="../../dc/dfe/class_o_n___simple_array.html">ON_SimpleArray</a> and <a class="el" href="../../dd/d40/class_o_n___class_array.html">ON_ClassArray</a> templates are in this separate file is so that the Microsoft developer studio autocomplete functions will work on these classes.</p>
<p>This file is included by <a class="el" href="../../d3/d03/opennurbs__array_8h_source.html">opennurbs_array.h</a> in the appropriate spot. If you need the definitions in the file, then you should include <a class="el" href="../../d3/d03/opennurbs__array_8h_source.html">opennurbs_array.h</a> and let it take care of including this file.construction //////////////////////////////////////////////////////// </p>
</div>
@@ -1657,11 +1630,8 @@ template&lt;class T &gt; </div>
</table>
</div><div class="memdoc">
<p>Shrink/grows capacity. If value </p>
<p>Allow "expert" users of ON_SimpleArray&lt;&gt;.SetArray(*,*,0) to clean up after themselves and deals with the case when the forget to clean up after themselves. <br />
<br />
<br />
<br />
sets capacity to input value</p>
<p>Allow "expert" users of ON_SimpleArray&lt;&gt;.SetArray(*,*,0) to clean up after themselves and deals with the case when the forget to clean up after themselves.</p>
<p>sets capacity to input value</p>
<p>NOTE: <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#aba771b1bd1d30886c96da29ab89b86da" title="low level memory managment ////////////////////////////////////////// ">Realloc()</a> does an allocation if the first argument is nullptr.</p>
<p>zero new memory</p>
<p>out of memory </p>
@@ -1787,10 +1757,8 @@ template&lt;class T&gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>Description: <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a14e3d8c3c9542339ffabe5b404b76062">Sort()</a> fills in the index[] array so that array[index[i]] &lt;= array[index[i+1]]. <br />
The array is not modified. <br />
Parameters: sort_algorithm - [in] <br />
ON::sort_algorithm::quick_sort (best in general) or ON::sort_algorithm::heap_sort Use ON::sort_algorithm::heap_sort only if you have done extensive testing with optimized release builds and are confident heap sort is significantly faster. index - [out] an array of length <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a> that is returned with some permutation of (0,1,...,<a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a>-1). compare - [in] compare function compare(a,b,p) should return &lt;0 if a&lt;b, 0, if a==b, and &gt;0 if a&gt;b. Returns: true if successful </p>
<p>Description: <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a14e3d8c3c9542339ffabe5b404b76062">Sort()</a> fills in the index[] array so that array[index[i]] &lt;= array[index[i+1]]. The array is not modified.</p>
<p>Parameters: sort_algorithm - [in] ON::sort_algorithm::quick_sort (best in general) or ON::sort_algorithm::heap_sort Use ON::sort_algorithm::heap_sort only if you have done extensive testing with optimized release builds and are confident heap sort is significantly faster. index - [out] an array of length <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a> that is returned with some permutation of (0,1,...,<a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a>-1). compare - [in] compare function compare(a,b,p) should return &lt;0 if a&lt;b, 0, if a==b, and &gt;0 if a&gt;b. Returns: true if successful </p>
</div>
</div>
@@ -1833,10 +1801,8 @@ template&lt;class T&gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>Description: <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a14e3d8c3c9542339ffabe5b404b76062">Sort()</a> fills in the index[] array so that array[index[i]] &lt;= array[index[i+1]]. <br />
The array is not modified. <br />
Parameters: sort_algorithm - [in] <br />
ON::sort_algorithm::quick_sort (best in general) or ON::sort_algorithm::heap_sort Use ON::sort_algorithm::heap_sort only if you have done extensive testing with optimized release builds and are confident heap sort is significantly faster. index - [out] an array of length <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a> that is returned with some permutation of (0,1,...,<a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a>-1). compare - [in] compare function compare(a,b,p) should return &lt;0 if a&lt;b, 0, if a==b, and &gt;0 if a&gt;b. p - [in] pointer passed as third argument to compare.</p>
<p>Description: <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#a14e3d8c3c9542339ffabe5b404b76062">Sort()</a> fills in the index[] array so that array[index[i]] &lt;= array[index[i+1]]. The array is not modified.</p>
<p>Parameters: sort_algorithm - [in] ON::sort_algorithm::quick_sort (best in general) or ON::sort_algorithm::heap_sort Use ON::sort_algorithm::heap_sort only if you have done extensive testing with optimized release builds and are confident heap sort is significantly faster. index - [out] an array of length <a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a> that is returned with some permutation of (0,1,...,<a class="el" href="../../dc/dfe/class_o_n___simple_array.html#ad44741ad8393d128dae2ff39b8c596c9" title="query /////////////////////////////////////////////////////////////// ">Count()</a>-1). compare - [in] compare function compare(a,b,p) should return &lt;0 if a&lt;b, 0, if a==b, and &gt;0 if a&gt;b. p - [in] pointer passed as third argument to compare.</p>
<p>Returns: true if successful </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
@@ -2002,9 +1968,9 @@ template&lt;class T&gt; </div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Jan 26 2018 12:38:23 for openNURBS SDK Help by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Jan 26 2018 04:54:33 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.14
</a> 1.8.13
</small></address>
</body>
</html>