mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-30 23:57:58 +08:00
595 lines
45 KiB
HTML
595 lines
45 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_Workspace 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
|
|
 <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="#pub-methods">Public Member Functions</a> |
|
|
<a href="../../d8/d9f/class_o_n___workspace-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">ON_Workspace Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p><code>#include <<a class="el" href="../../dd/d7c/opennurbs__workspace_8h_source.html">opennurbs_workspace.h</a>></code></p>
|
|
<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:a451014f96a5446f061ef1f94a31d8d54"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a451014f96a5446f061ef1f94a31d8d54">ON_Workspace</a> ()</td></tr>
|
|
<tr class="separator:a451014f96a5446f061ef1f94a31d8d54"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa5f38447078c616f5a089c90de0db0e1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace</a> ()</td></tr>
|
|
<tr class="separator:aa5f38447078c616f5a089c90de0db0e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9012adce3a0f26aeeed92004249fcb53"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a9012adce3a0f26aeeed92004249fcb53">Destroy</a> ()</td></tr>
|
|
<tr class="separator:a9012adce3a0f26aeeed92004249fcb53"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac128e1a55780ccb886b24aa66c82bf4a"><td class="memItemLeft" align="right" valign="top">double * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a">GetDoubleMemory</a> (size_t count)</td></tr>
|
|
<tr class="separator:ac128e1a55780ccb886b24aa66c82bf4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adf748a2ec5a575c1ae2be028ffe65e7c"><td class="memItemLeft" align="right" valign="top">double ** </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#adf748a2ec5a575c1ae2be028ffe65e7c">GetDoubleMemory</a> (size_t row_count, size_t col_count)</td></tr>
|
|
<tr class="separator:adf748a2ec5a575c1ae2be028ffe65e7c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af273f3cb2935d9112a37908114ffe7fe"><td class="memItemLeft" align="right" valign="top">int * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe">GetIntMemory</a> (size_t count)</td></tr>
|
|
<tr class="separator:af273f3cb2935d9112a37908114ffe7fe"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a076caac8b9ca7267ce1f8a7ec533e8c4"><td class="memItemLeft" align="right" valign="top">int ** </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a076caac8b9ca7267ce1f8a7ec533e8c4">GetIntMemory</a> (size_t row_count, size_t col_count)</td></tr>
|
|
<tr class="separator:a076caac8b9ca7267ce1f8a7ec533e8c4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a501164357dedebcac9ded42aa4ddda5a"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory</a> (size_t sz)</td></tr>
|
|
<tr class="separator:a501164357dedebcac9ded42aa4ddda5a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a62aa3e0ed8a4692752d0cc4283b0c919"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919">GetPointMemory</a> (size_t count)</td></tr>
|
|
<tr class="separator:a62aa3e0ed8a4692752d0cc4283b0c919"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a187afb0c90420dac624b8a114cb79544"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544">GetVectorMemory</a> (size_t count)</td></tr>
|
|
<tr class="separator:a187afb0c90420dac624b8a114cb79544"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5cf4382ea9177d0ce78acb7680264b3e"><td class="memItemLeft" align="right" valign="top">double * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a5cf4382ea9177d0ce78acb7680264b3e">GrowDoubleMemory</a> (double *ptr, size_t count)</td></tr>
|
|
<tr class="separator:a5cf4382ea9177d0ce78acb7680264b3e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a033a2755c5f01ff7ae06fcd5e9f41215"><td class="memItemLeft" align="right" valign="top">int * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">GrowIntMemory</a> (int *ptr, size_t count)</td></tr>
|
|
<tr class="separator:a033a2755c5f01ff7ae06fcd5e9f41215"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac2a85bc034d029677f3f555703ee52ce"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce">GrowMemory</a> (void *ptr, size_t sz)</td></tr>
|
|
<tr class="separator:ac2a85bc034d029677f3f555703ee52ce"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1d58452b5ac12199a38b1974ca4aca39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a1d58452b5ac12199a38b1974ca4aca39">GrowPointMemory</a> (<a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a> *ptr, size_t count)</td></tr>
|
|
<tr class="separator:a1d58452b5ac12199a38b1974ca4aca39"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a183be8757c791b858c6aa78c835e04f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a183be8757c791b858c6aa78c835e04f2">GrowVectorMemory</a> (<a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a> *ptr, size_t count)</td></tr>
|
|
<tr class="separator:a183be8757c791b858c6aa78c835e04f2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2368c4bc3c5fc5134d373cae3e73b12e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e">KeepAllMemory</a> ()</td></tr>
|
|
<tr class="separator:a2368c4bc3c5fc5134d373cae3e73b12e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a900ccd355d813f2bddec3529271f1f7f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a900ccd355d813f2bddec3529271f1f7f">KeepFile</a> (FILE *fileptr)</td></tr>
|
|
<tr class="separator:a900ccd355d813f2bddec3529271f1f7f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab21c61bec3d3ef472abe7c04c5c65257"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">KeepMemory</a> (void *ptr)</td></tr>
|
|
<tr class="separator:ab21c61bec3d3ef472abe7c04c5c65257"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a95acfcc647b928b72f8768d3a415c0f4"><td class="memItemLeft" align="right" valign="top">FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">OpenFile</a> (const char *filename, const char *filemode)</td></tr>
|
|
<tr class="separator:a95acfcc647b928b72f8768d3a415c0f4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa80494bd6dc9c737d150601a9badb8a6"><td class="memItemLeft" align="right" valign="top">FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa80494bd6dc9c737d150601a9badb8a6">OpenFile</a> (const wchar_t *filename, const wchar_t *filemode)</td></tr>
|
|
<tr class="separator:aa80494bd6dc9c737d150601a9badb8a6"><td class="memSeparator" colspan="2"> </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 & Associates. All rights reserved. / OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert / McNeel & 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: Use <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> classes on the stack to efficiently get and automatically clean up workspace memory and scratch files. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a451014f96a5446f061ef1f94a31d8d54"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a451014f96a5446f061ef1f94a31d8d54">◆ </a></span>ON_Workspace()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ON_Workspace::ON_Workspace </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> classes should be on the stack or as members on classes that are never copied. The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">ON_Workspace::OpenFile</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa5f38447078c616f5a089c90de0db0e1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa5f38447078c616f5a089c90de0db0e1">◆ </a></span>~ON_Workspace()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ON_Workspace::~ON_Workspace </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">ON_Workspace::OpenFile</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a9012adce3a0f26aeeed92004249fcb53"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9012adce3a0f26aeeed92004249fcb53">◆ </a></span>Destroy()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ON_Workspace::Destroy </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">ON_Workspace::OpenFile</a>. The workspace can be used again after calling destroy. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac128e1a55780ccb886b24aa66c82bf4a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac128e1a55780ccb886b24aa66c82bf4a">◆ </a></span>GetDoubleMemory() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double* ON_Workspace::GetDoubleMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an array of doubles that will be freed by ~ON_Workspace. The intent of <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a">ON_Workspace::GetDoubleMemory</a> is to provide an easy way to get scratch double arrays without having to worry about cleaning up before returning. Parameters: count - [in] (>0) number of doubles in memory block. If count <= 0, then nullptr is returned. Returns: A pointer to the array of doubles. Remarks. This is a simple helper function so you don't have to mess around with (double*) casts and sizeof(double)s in a call to <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory()</a>. It is exactly like calling (double*)GetMemory(count*sizeof(double)); See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">ON_Workspace::GrowIntMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adf748a2ec5a575c1ae2be028ffe65e7c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adf748a2ec5a575c1ae2be028ffe65e7c">◆ </a></span>GetDoubleMemory() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double** ON_Workspace::GetDoubleMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>row_count</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>col_count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an matrix of doubles Parameters: row_count - [in] (>0) number of rows col_count - [in] (>0) number of columns Returns: A pointer p so that p[i][j] is an double when 0 <= i < row_count and 0 <= j < col_count. Remarks. This is a simple helper function so you don't have to mess around building the 2d array. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af273f3cb2935d9112a37908114ffe7fe"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af273f3cb2935d9112a37908114ffe7fe">◆ </a></span>GetIntMemory() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int* ON_Workspace::GetIntMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an array of integers that will be freed by ~ON_Workspace. The intent of <a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe">ON_Workspace::GetIntMemory</a> is to provide an easy way to get scratch integer arrays without having to worry about cleaning up before returning. Parameters: count - [in] (>0) number of integers in memory block. If count <= 0, then nullptr is returned. Returns: A pointer to the array of integers. Remarks. This is a simple helper function so you don't have to mess around with (int*) casts and sizeof(int)s in a call to <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory()</a>. It is exactly like calling (int*)GetMemory(count*sizeof(int)); See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">ON_Workspace::GrowIntMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a076caac8b9ca7267ce1f8a7ec533e8c4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a076caac8b9ca7267ce1f8a7ec533e8c4">◆ </a></span>GetIntMemory() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int** ON_Workspace::GetIntMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>row_count</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>col_count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an matrix of integers Parameters: row_count - [in] (>0) number of rows col_count - [in] (>0) number of columns Returns: A pointer p so that p[i][j] is an integer when 0 <= i < row_count and 0 <= j < col_count. Remarks. This is a simple helper function so you don't have to mess around building the 2d array. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a501164357dedebcac9ded42aa4ddda5a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a501164357dedebcac9ded42aa4ddda5a">◆ </a></span>GetMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void* ON_Workspace::GetMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>sz</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> is to provide an easy way to get blocks of scratch memory without having to worry about cleaning up before returning. Parameters: sz - [in] (>0) size of memory block in bytes. If sz <= 0, then nullptr is returned. Returns: A pointer to the memory block. Remarks. onmalloc() is used to get the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a>::::~ON_Workspace <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce">ON_Workspace::GrowMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe">ON_Workspace::GetIntMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a">ON_Workspace::GetDoubleMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919">ON_Workspace::GetPointMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544">ON_Workspace::GetVectorMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a62aa3e0ed8a4692752d0cc4283b0c919"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a62aa3e0ed8a4692752d0cc4283b0c919">◆ </a></span>GetPointMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a>* ON_Workspace::GetPointMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an array of ON_3dPoints that will be freed by ~ON_Workspace. The intent of <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919">ON_Workspace::GetPointMemory</a> is to provide an easy way to get scratch point arrays without having to worry about cleaning up before returning. Parameters: count - [in] (>0) number of points in memory block. If count <= 0, then nullptr is returned. Returns: A pointer to the memory block. Remarks. This is a simple helper function so you don't have to mess around with (ON_3dPoint*) casts and sizeof(ON_3dPoint)s in a call to <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory()</a>. It is exactly like calling (ON_3dPoint*)GetMemory(count*sizeof(ON_3dPoint)); See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">ON_Workspace::GrowIntMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a187afb0c90420dac624b8a114cb79544"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a187afb0c90420dac624b8a114cb79544">◆ </a></span>GetVectorMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a>* ON_Workspace::GetVectorMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Gets an array of ON_3dVectors that will be freed by ~ON_Workspace. The intent of <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544">ON_Workspace::GetVectorMemory</a> is to provide an easy way to get scratch Vector arrays without having to worry about cleaning up before returning. Parameters: count - [in] (>0) number of Vectors in memory block. If count <= 0, then nullptr is returned. Returns: A pointer to the memory block. Remarks. This is a simple helper function so you don't have to mess around with (ON_3dVector*) casts and sizeof(ON_3dVector)s in a call to <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">GetMemory()</a>. It is exactly like calling (ON_3dVector*)GetMemory(count*sizeof(ON_3dVector)); See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">ON_Workspace::GrowIntMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5cf4382ea9177d0ce78acb7680264b3e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5cf4382ea9177d0ce78acb7680264b3e">◆ </a></span>GrowDoubleMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double* ON_Workspace::GrowDoubleMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double * </td>
|
|
<td class="paramname"><em>ptr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Grows the array of doubles that was allocated by GetDoubleMemory or GrowDoubleMemory. Parameters: ptr - [in] pointer returned by an earlier call to GetDoubleMemory or GrowDoubleMemory. count - [in] (>0) number of doubles in memory block. If count <= 0, then nullptr is returned. If ptr was not allocated by this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> class, then nullptr is returned. Returns: A pointer to the double array. Remarks. onrealloc() is used to grow the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a5cf4382ea9177d0ce78acb7680264b3e">GrowDoubleMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a">ON_Workspace::GetDoubleMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a033a2755c5f01ff7ae06fcd5e9f41215"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a033a2755c5f01ff7ae06fcd5e9f41215">◆ </a></span>GrowIntMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int* ON_Workspace::GrowIntMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>ptr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. Parameters: ptr - [in] pointer returned by an earlier call to GetIntMemory or GrowIntMemory. count - [in] (>0) number of integers in memory block. If count <= 0, then nullptr is returned. If ptr was not allocated by this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> class, then nullptr is returned. Returns: A pointer to the integer array. Remarks. onrealloc() is used to grow the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">GrowIntMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe">ON_Workspace::GetIntMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac2a85bc034d029677f3f555703ee52ce"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac2a85bc034d029677f3f555703ee52ce">◆ </a></span>GrowMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void* ON_Workspace::GrowMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>ptr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>sz</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Grows a block of heap memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a>. Parameters: ptr - [in] pointer returned by an earlier call to GetMemory or GrowMemory. sz - [in] (>0) size of memory block in bytes. If sz <= 0, then nullptr is returned. If ptr is not nullptr and was not allocated by an earlier call to GetMemory or GrowMemory, then nullptr is returned. Returns: A pointer to the memory block. Remarks. onrealloc() is used to grow the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215">ON_Workspace::GrowIntMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a5cf4382ea9177d0ce78acb7680264b3e">ON_Workspace::GrowDoubleMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a1d58452b5ac12199a38b1974ca4aca39">ON_Workspace::GrowPointMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a183be8757c791b858c6aa78c835e04f2">ON_Workspace::GrowVectorMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1d58452b5ac12199a38b1974ca4aca39"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1d58452b5ac12199a38b1974ca4aca39">◆ </a></span>GrowPointMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a>* ON_Workspace::GrowPointMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="../../d2/d35/class_o_n__3d_point.html">ON_3dPoint</a> * </td>
|
|
<td class="paramname"><em>ptr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Grows the array of points that was allocated by GetPointMemory or GrowPointMemory. Parameters: ptr - [in] pointer returned by an earlier call to GetPointMemory or GrowPointMemory. count - [in] (>0) number of points in memory block. If count <= 0, then nullptr is returned. If ptr was not allocated by this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> class, then nullptr is returned. Returns: A pointer to the point array. Remarks. onrealloc() is used to grow the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919">ON_Workspace::GetPointMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a183be8757c791b858c6aa78c835e04f2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a183be8757c791b858c6aa78c835e04f2">◆ </a></span>GrowVectorMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a>* ON_Workspace::GrowVectorMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="../../d5/dae/class_o_n__3d_vector.html">ON_3dVector</a> * </td>
|
|
<td class="paramname"><em>ptr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>count</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Grows the array of vectors that was allocated by GetVectorMemory or GrowVectorMemory. Parameters: ptr - [in] pointer returned by an earlier call to GetVectorMemory or GrowVectorMemory. count - [in] (>0) number of vectors in memory block. If count <= 0, then nullptr is returned. If ptr was not allocated by this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a> class, then nullptr is returned. Returns: A pointer to the vector array. Remarks. onrealloc() is used to grow the block of memory. Do NOT free the pointer returned by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">~ON_Workspace()</a> will free the memory. If you decide you want to keep the memory block, pass the pointer to KeepMemory before ~ON_Workspace is called. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544">ON_Workspace::GetVectorMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2368c4bc3c5fc5134d373cae3e73b12e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2368c4bc3c5fc5134d373cae3e73b12e">◆ </a></span>KeepAllMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ON_Workspace::KeepAllMemory </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Calling <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e">KeepAllMemory()</a> has the same effect as calling KeepMemory(p) for every active allocation in the workspace. After calling <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e">KeepAllMemory()</a>, you can no longer use Grow...() on the pointers and you are responsible for using onfree() to release the memory when it is no longer needed. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">ON_Workspace::~ON_Workspace</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">ON_Workspace::KeepMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a900ccd355d813f2bddec3529271f1f7f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a900ccd355d813f2bddec3529271f1f7f">◆ </a></span>KeepFile()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool ON_Workspace::KeepFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">FILE * </td>
|
|
<td class="paramname"><em>fileptr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: If you want to prevent ~ON_Workspace from closing a file that was opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">ON_Workspace::OpenFile</a>, then pass the returned FILE pointer to KeepFile. After calling KeepFile, the caller is responsible for calling ON::CloseFile to close the file. Parameters: fileptr - [in] pointer returned by OpenFile. Returns: True if file was successfully closed. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">ON_Workspace::~ON_Workspace</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4">ON_Workspace::OpenFile</a> ON::OpenFile ON::CloseFile </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab21c61bec3d3ef472abe7c04c5c65257"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab21c61bec3d3ef472abe7c04c5c65257">◆ </a></span>KeepMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool ON_Workspace::KeepMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>ptr</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Calling the <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">KeepMemory()</a> function with a pointer returned from one of the Get...() or Grow...() calls keeps the workspace destructor from freeing the memory. After calling <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257">KeepMemory()</a>, you can no longer use Grow...() on the pointer. The caller is responsible for using onfree() to release the memory when it is no longer needed. Parameters: ptr - [in] pointer returned by a Get...() or Grow() call to this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a>. Returns: True if the pointer was successfully found and removed from this <a class="el" href="../../d1/d6c/class_o_n___workspace.html">ON_Workspace</a>. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">ON_Workspace::~ON_Workspace</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a">ON_Workspace::GetMemory</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e">ON_Workspace::KeepAllMemory</a> </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a95acfcc647b928b72f8768d3a415c0f4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a95acfcc647b928b72f8768d3a415c0f4">◆ </a></span>OpenFile() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">FILE* ON_Workspace::OpenFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>filename</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>filemode</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. Parameters: filename - [in] name of file filemode - [in] open mode (just like second argument to fopen). Returns: Pointer to opened file. Remarks: ~ON_Workspace will close the file. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">ON_Workspace::~ON_Workspace</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a900ccd355d813f2bddec3529271f1f7f">ON_Workspace::KeepFile</a> ON::OpenFile </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa80494bd6dc9c737d150601a9badb8a6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa80494bd6dc9c737d150601a9badb8a6">◆ </a></span>OpenFile() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">FILE* ON_Workspace::OpenFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const wchar_t * </td>
|
|
<td class="paramname"><em>filename</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const wchar_t * </td>
|
|
<td class="paramname"><em>filemode</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Description: Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. Parameters: filename - [in] name of file filemode - [in] open mode (just like second argument to _wfopen). Returns: Pointer to opened file. Remarks: ~ON_Workspace will close the file. See Also: <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1">ON_Workspace::~ON_Workspace</a> <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a900ccd355d813f2bddec3529271f1f7f">ON_Workspace::KeepFile</a> ON::OpenFile </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Fri Jan 26 2018 04:54:33 for openNURBS SDK Help by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|