⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 type_gdynamicarray.html

📁 一个非常有用的开源代码
💻 HTML
字号:
<html><head><title>Generated Documentation</title></head><body>	<image src="headerimage.png">	<br><br><table><tr><td><big><big><big style="font-family: arial;"><b>GDynamicArray</b></big></big></big><br><br></td><td> A dynamic array</td></tr></table><br><br><big><big><i>Constructors (public)</i></big></big><br><div style="margin-left: 40px;"><big><b>GDynamicArray</b></big>(int nCellSize, int nGrowBy)<br><div style="margin-left: 80px;"><font color=brown> nCellSize = size of a single element in bytes. nGrowBy = number of elements to initially allocate space           for when the first element is added to the array</font></div><br></div><br><big><big><i>Destructors</i></big></big><br><div style="margin-left: 40px;"><big><b>~GDynamicArray</b></big>()<br></div><br><big><big><i>Public</i></big></big><br><div style="margin-left: 40px;">void <big><b>Clear</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Resizes the array to zero elements</font></div><br>void <big><b>DeleteCell</b></big>(int n)<br><div style="margin-left: 80px;"><font color=brown> Deletes an element and moves all subsequent elements over to fill the gap.  (If order is not important in your array, it's a good idea to swap the cell you want to delete with the last element before you delete it so that you won't have to pay the performance penalty for shifting the whole array over.)</font></div><br>int <big><b>GetAllocSize</b></big>()<br>int <big><b>GetSize</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Returns the number of elements in the array</font></div><br>void <big><b>Grow</b></big>()<br><div style="margin-left: 80px;"><font color=brown> Make the allocated buffer bigger</font></div><br>void <big><b>SetAllocSize</b></big>(int n)<br>void <big><b>SetSize</b></big>(int n)<br><div style="margin-left: 80px;"><font color=brown> Resizes the array (throwing out elements >= n)</font></div><br>void <big><b>_AddCellByRef</b></big>(const void* pData)<br><div style="margin-left: 80px;"><font color=brown> Adds an element (referenced by pData) to the end of the array.</font></div><br>void <big><b>_GetCellRef</b></big>(int* n)<br><div style="margin-left: 80px;"><font color=brown> Returns a reference to element n</font></div><br>void <big><b>_InsertCellByRef</b></big>(int n, void* pData)<br><div style="margin-left: 80px;"><font color=brown> Inserts an element (referenced by pData) into the array at location n. (It will shift all subsequent elements over to make room.)</font></div><br>void <big><b>_SetCellByRef</b></big>(int nCell, void* pData)<br><div style="margin-left: 80px;"><font color=brown> Replaces element nCell with the element reference by pData</font></div><br></div><br></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -