mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-30 23:57:58 +08:00
782 lines
69 KiB
HTML
782 lines
69 KiB
HTML
<!-- HTML header for doxygen 1.8.13-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>openNURBS SDK Help: ON_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="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
<script type="text/javascript" src="../../dynsections.js"></script>
|
|
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="../../customdoxygen.css" rel="stylesheet" type="text/css"/>
|
|
<!-- bootstrap -->
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
<!-- smartmenus -->
|
|
<link href="../../jquery.smartmenus.bootstrap.css" rel="stylesheet">
|
|
<script type="text/javascript" src="../../jquery.smartmenus.js"></script>
|
|
<script type="text/javascript" src="../../jquery.smartmenus.bootstrap.js"></script>
|
|
</head>
|
|
<body>
|
|
<!-- <div class="version-banner">
|
|
Go back to the <a href="/">main site</a>...
|
|
</div> -->
|
|
<div class="container">
|
|
<!-- navbar -->
|
|
<nav class="navbar navbar-default">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="#">openNURBS SDK Help</a>
|
|
<div class="navbar-collapse collapse" id="main-nav-placeholder">
|
|
<!-- <p class="navbar-text navbar-right">v6.0</p> -->
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li class="dropdown">
|
|
<a class="dropdown-toggle" href="#">v6.0 <span class="caret"></span></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#">Latest (6.x)</a></li>
|
|
<li class="disabled"><a href="#">WIP (7.x)</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div class="page-content">
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript" src="../../menudata.js"></script>
|
|
<script type="text/javascript" src="../../menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('../../',false,false,'search.php','Search');
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#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>Use <a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a> classes on the stack to efficiently get and automatically clean up workspace memory and scratch files.
|
|
<a href="../../d1/d6c/class_o_n___workspace.html#details">More...</a></p>
|
|
|
|
<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="memdesc:a451014f96a5446f061ef1f94a31d8d54"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">ON_Workspace::OpenFile</a>. <a href="#a451014f96a5446f061ef1f94a31d8d54">More...</a><br /></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="memdesc:aa5f38447078c616f5a089c90de0db0e1"><td class="mdescLeft"> </td><td class="mdescRight">The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">ON_Workspace::OpenFile</a>. <a href="#aa5f38447078c616f5a089c90de0db0e1">More...</a><br /></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="memdesc:a9012adce3a0f26aeeed92004249fcb53"><td class="mdescLeft"> </td><td class="mdescRight">The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">ON_Workspace::OpenFile</a>. The workspace can be used again after calling destroy. <a href="#a9012adce3a0f26aeeed92004249fcb53">More...</a><br /></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="memdesc:ac128e1a55780ccb886b24aa66c82bf4a"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Gets an array of doubles that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetDoubleMe...">ON_Workspace::GetDoubleMemory</a> is to provide an easy way to get scratch double arrays without having to worry about cleaning up before returning. <a href="#ac128e1a55780ccb886b24aa66c82bf4a">More...</a><br /></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="memdesc:adf748a2ec5a575c1ae2be028ffe65e7c"><td class="mdescLeft"> </td><td class="mdescRight">Gets an matrix of doubles <a href="#adf748a2ec5a575c1ae2be028ffe65e7c">More...</a><br /></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="memdesc:af273f3cb2935d9112a37908114ffe7fe"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Gets an array of integers that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetIntMemo...">ON_Workspace::GetIntMemory</a> is to provide an easy way to get scratch integer arrays without having to worry about cleaning up before returning. <a href="#af273f3cb2935d9112a37908114ffe7fe">More...</a><br /></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="memdesc:a076caac8b9ca7267ce1f8a7ec533e8c4"><td class="mdescLeft"> </td><td class="mdescRight">Gets an matrix of integers <a href="#a076caac8b9ca7267ce1f8a7ec533e8c4">More...</a><br /></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="memdesc:a501164357dedebcac9ded42aa4ddda5a"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">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. <a href="#a501164357dedebcac9ded42aa4ddda5a">More...</a><br /></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="memdesc:a62aa3e0ed8a4692752d0cc4283b0c919"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Gets an array of ON_3dPoints that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetPoin...">ON_Workspace::GetPointMemory</a> is to provide an easy way to get scratch point arrays without having to worry about cleaning up before returning. <a href="#a62aa3e0ed8a4692752d0cc4283b0c919">More...</a><br /></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="memdesc:a187afb0c90420dac624b8a114cb79544"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Gets an array of ON_3dVectors that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetVec...">ON_Workspace::GetVectorMemory</a> is to provide an easy way to get scratch Vector arrays without having to worry about cleaning up before returning. <a href="#a187afb0c90420dac624b8a114cb79544">More...</a><br /></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="memdesc:a5cf4382ea9177d0ce78acb7680264b3e"><td class="mdescLeft"> </td><td class="mdescRight">Grows the array of doubles that was allocated by GetDoubleMemory or GrowDoubleMemory. <a href="#a5cf4382ea9177d0ce78acb7680264b3e">More...</a><br /></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="memdesc:a033a2755c5f01ff7ae06fcd5e9f41215"><td class="mdescLeft"> </td><td class="mdescRight">Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. <a href="#a033a2755c5f01ff7ae06fcd5e9f41215">More...</a><br /></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="memdesc:ac2a85bc034d029677f3f555703ee52ce"><td class="mdescLeft"> </td><td class="mdescRight">Grows a block of heap memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>. <a href="#ac2a85bc034d029677f3f555703ee52ce">More...</a><br /></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="memdesc:a1d58452b5ac12199a38b1974ca4aca39"><td class="mdescLeft"> </td><td class="mdescRight">Grows the array of points that was allocated by GetPointMemory or GrowPointMemory. <a href="#a1d58452b5ac12199a38b1974ca4aca39">More...</a><br /></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="memdesc:a183be8757c791b858c6aa78c835e04f2"><td class="mdescLeft"> </td><td class="mdescRight">Grows the array of vectors that was allocated by GetVectorMemory or GrowVectorMemory. <a href="#a183be8757c791b858c6aa78c835e04f2">More...</a><br /></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="memdesc:a2368c4bc3c5fc5134d373cae3e73b12e"><td class="mdescLeft"> </td><td class="mdescRight">Calling <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e" title="Calling KeepAllMemory() has the same effect as calling KeepMemory(p) for every active allocation in t...">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" title="Calling KeepAllMemory() has the same effect as calling KeepMemory(p) for every active allocation in t...">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. <a href="#a2368c4bc3c5fc5134d373cae3e73b12e">More...</a><br /></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="memdesc:a900ccd355d813f2bddec3529271f1f7f"><td class="mdescLeft"> </td><td class="mdescRight">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" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">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. <a href="#a900ccd355d813f2bddec3529271f1f7f">More...</a><br /></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="memdesc:ab21c61bec3d3ef472abe7c04c5c65257"><td class="mdescLeft"> </td><td class="mdescRight">Calling the <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">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" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">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. <a href="#ab21c61bec3d3ef472abe7c04c5c65257">More...</a><br /></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="memdesc:a95acfcc647b928b72f8768d3a415c0f4"><td class="mdescLeft"> </td><td class="mdescRight">Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. <a href="#a95acfcc647b928b72f8768d3a415c0f4">More...</a><br /></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="memdesc:aa80494bd6dc9c737d150601a9badb8a6"><td class="mdescLeft"> </td><td class="mdescRight">Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. <a href="#aa80494bd6dc9c737d150601a9badb8a6">More...</a><br /></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"><p>Use <a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">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><a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">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>The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">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>The destructor frees memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a> and closes files that were opened with <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">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>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" title="Gets an array of doubles that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetDoubleMe...">ON_Workspace::GetDoubleMemory</a> is to provide an easy way to get scratch double arrays without having to worry about cleaning up before returning. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">count</td><td>[in] (>0) number of doubles in memory block. If count <= 0, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">GetMemory()</a>. It is exactly like calling (double*)GetMemory(count*sizeof(double)); </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">ON_Workspace::GrowIntMemory</a></dd></dl>
|
|
|
|
</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>Gets an matrix of doubles </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">row_count</td><td>[in] (>0) number of rows</td></tr>
|
|
<tr><td class="paramname">col_count</td><td>[in] (>0) number of columns</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>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" title="Gets an array of integers that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetIntMemo...">ON_Workspace::GetIntMemory</a> is to provide an easy way to get scratch integer arrays without having to worry about cleaning up before returning. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">count</td><td>[in] (>0) number of integers in memory block. If count <= 0, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">GetMemory()</a>. It is exactly like calling (int*)GetMemory(count*sizeof(int)); </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">ON_Workspace::GrowIntMemory</a></dd></dl>
|
|
|
|
</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>Gets an matrix of integers </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">row_count</td><td>[in] (>0) number of rows</td></tr>
|
|
<tr><td class="paramname">col_count</td><td>[in] (>0) number of columns</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">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. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">sz</td><td>[in] (>0) size of memory block in bytes. If sz <= 0, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">GetMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>ON_Workspace::::~ON_Workspace, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac2a85bc034d029677f3f555703ee52ce" title="Grows a block of heap memory that was allocated by ON_Workspace::GetMemory. ">ON_Workspace::GrowMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe" title="Gets an array of integers that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetIntMemo...">ON_Workspace::GetIntMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a" title="Gets an array of doubles that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetDoubleMe...">ON_Workspace::GetDoubleMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919" title="Gets an array of ON_3dPoints that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetPoin...">ON_Workspace::GetPointMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544" title="Gets an array of ON_3dVectors that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetVec...">ON_Workspace::GetVectorMemory</a></dd></dl>
|
|
|
|
</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>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" title="Gets an array of ON_3dPoints that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetPoin...">ON_Workspace::GetPointMemory</a> is to provide an easy way to get scratch point arrays without having to worry about cleaning up before returning. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">count</td><td>[in] (>0) number of points in memory block. If count <= 0, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">GetMemory()</a>. It is exactly like calling (ON_3dPoint*)GetMemory(count*sizeof(ON_3dPoint)); </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">ON_Workspace::GrowIntMemory</a></dd></dl>
|
|
|
|
</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>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" title="Gets an array of ON_3dVectors that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetVec...">ON_Workspace::GetVectorMemory</a> is to provide an easy way to get scratch Vector arrays without having to worry about cleaning up before returning. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">count</td><td>[in] (>0) number of Vectors in memory block. If count <= 0, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">GetMemory()</a>. It is exactly like calling (ON_3dVector*)GetMemory(count*sizeof(ON_3dVector)); </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">ON_Workspace::GrowIntMemory</a></dd></dl>
|
|
|
|
</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>Grows the array of doubles that was allocated by GetDoubleMemory or GrowDoubleMemory. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by an earlier call to GetDoubleMemory or GrowDoubleMemory.</td></tr>
|
|
<tr><td class="paramname">count</td><td>[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" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a> class, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Grows the array of doubles that was allocated by GetDoubleMemory or GrowDoubleMemory. ">GrowDoubleMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#ac128e1a55780ccb886b24aa66c82bf4a" title="Gets an array of doubles that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetDoubleMe...">ON_Workspace::GetDoubleMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by an earlier call to GetIntMemory or GrowIntMemory.</td></tr>
|
|
<tr><td class="paramname">count</td><td>[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" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a> class, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">GrowIntMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#af273f3cb2935d9112a37908114ffe7fe" title="Gets an array of integers that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetIntMemo...">ON_Workspace::GetIntMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>Grows a block of heap memory that was allocated by <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by an earlier call to GetMemory or GrowMemory.</td></tr>
|
|
<tr><td class="paramname">sz</td><td>[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.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Grows a block of heap memory that was allocated by ON_Workspace::GetMemory. ">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a033a2755c5f01ff7ae06fcd5e9f41215" title="Grows the array of integers that was allocated by GetIntMemory or GrowIntMemory. ">ON_Workspace::GrowIntMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a5cf4382ea9177d0ce78acb7680264b3e" title="Grows the array of doubles that was allocated by GetDoubleMemory or GrowDoubleMemory. ">ON_Workspace::GrowDoubleMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a1d58452b5ac12199a38b1974ca4aca39" title="Grows the array of points that was allocated by GetPointMemory or GrowPointMemory. ">ON_Workspace::GrowPointMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a183be8757c791b858c6aa78c835e04f2" title="Grows the array of vectors that was allocated by GetVectorMemory or GrowVectorMemory. ">ON_Workspace::GrowVectorMemory</a></dd></dl>
|
|
|
|
</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>Grows the array of points that was allocated by GetPointMemory or GrowPointMemory. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by an earlier call to GetPointMemory or GrowPointMemory.</td></tr>
|
|
<tr><td class="paramname">count</td><td>[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" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a> class, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Grows a block of heap memory that was allocated by ON_Workspace::GetMemory. ">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a62aa3e0ed8a4692752d0cc4283b0c919" title="Gets an array of ON_3dPoints that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetPoin...">ON_Workspace::GetPointMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>Grows the array of vectors that was allocated by GetVectorMemory or GrowVectorMemory. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by an earlier call to GetVectorMemory or GrowVectorMemory.</td></tr>
|
|
<tr><td class="paramname">count</td><td>[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" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a> class, then nullptr is returned.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>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" title="Grows a block of heap memory that was allocated by ON_Workspace::GetMemory. ">GrowMemory()</a>. <a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">~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. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#a187afb0c90420dac624b8a114cb79544" title="Gets an array of ON_3dVectors that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetVec...">ON_Workspace::GetVectorMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>Calling <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e" title="Calling KeepAllMemory() has the same effect as calling KeepMemory(p) for every active allocation in t...">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" title="Calling KeepAllMemory() has the same effect as calling KeepMemory(p) for every active allocation in t...">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. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">ON_Workspace::~ON_Workspace</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">ON_Workspace::KeepMemory</a></dd></dl>
|
|
|
|
</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>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" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">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. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">fileptr</td><td>[in] pointer returned by OpenFile.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if file was successfully closed. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">ON_Workspace::~ON_Workspace</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a95acfcc647b928b72f8768d3a415c0f4" title="Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. ">ON_Workspace::OpenFile</a>, ON::OpenFile, ON::CloseFile</dd></dl>
|
|
|
|
</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>Calling the <a class="el" href="../../d1/d6c/class_o_n___workspace.html#ab21c61bec3d3ef472abe7c04c5c65257" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">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" title="Calling the KeepMemory() function with a pointer returned from one of the Get...() or Grow...">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. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ptr</td><td>[in] pointer returned by a Get...() or Grow() call to this <a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the pointer was successfully found and removed from this <a class="el" href="../../d1/d6c/class_o_n___workspace.html" title="Use ON_Workspace classes on the stack to efficiently get and automatically clean up workspace memory ...">ON_Workspace</a>. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">ON_Workspace::~ON_Workspace</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a501164357dedebcac9ded42aa4ddda5a" title="Gets a block of heap memory that will be freed by ~ON_Workspace. The intent of ON_Workspace::GetMemor...">ON_Workspace::GetMemory</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a2368c4bc3c5fc5134d373cae3e73b12e" title="Calling KeepAllMemory() has the same effect as calling KeepMemory(p) for every active allocation in t...">ON_Workspace::KeepAllMemory</a></dd></dl>
|
|
|
|
</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>Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">filename</td><td>[in] name of file</td></tr>
|
|
<tr><td class="paramname">filemode</td><td>[in] open mode (just like second argument to fopen).</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pointer to opened file. </dd></dl>
|
|
<p>~ON_Workspace will close the file. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">ON_Workspace::~ON_Workspace</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a900ccd355d813f2bddec3529271f1f7f" title="If you want to prevent ~ON_Workspace from closing a file that was opened with ON_Workspace::OpenFile...">ON_Workspace::KeepFile</a>, ON::OpenFile</dd></dl>
|
|
|
|
</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>Uses ON::OpenFile to open a file. ~ON_Workspace will close the file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">filename</td><td>[in] name of file</td></tr>
|
|
<tr><td class="paramname">filemode</td><td>[in] open mode (just like second argument to _wfopen).</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pointer to opened file. </dd></dl>
|
|
<p>~ON_Workspace will close the file. </p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d6c/class_o_n___workspace.html#aa5f38447078c616f5a089c90de0db0e1" title="The destructor frees memory that was allocated by ON_Workspace::GetMemory and closes files that were ...">ON_Workspace::~ON_Workspace</a>, <a class="el" href="../../d1/d6c/class_o_n___workspace.html#a900ccd355d813f2bddec3529271f1f7f" title="If you want to prevent ~ON_Workspace from closing a file that was opened with ON_Workspace::OpenFile...">ON_Workspace::KeepFile</a>, ON::OpenFile</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- HTML footer for doxygen 1.8.13-->
|
|
<!-- start footer part -->
|
|
</div> <!-- page-content -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sat Feb 3 2018 11:08:33 for openNURBS SDK Help by <a href="http://www.doxygen.org/index.html">
|
|
<!-- <img class="footer" src="../../doxygen.png" alt="doxygen"/> -->
|
|
Doxygen
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</div> <!-- container -->
|
|
<!-- doxy-boot -->
|
|
<script type="text/javascript" src="../../doxy-boot.js"></script>
|
|
</body>
|
|
</html>
|