\doxysection{source\+\_\+code/\+MODULE\+\_\+marigold\+\_\+dynamic\+\_\+array/marigold\+\_\+dynamic\+\_\+array.h File Reference}
\hypertarget{marigold__dynamic__array_8h}{}\label{marigold__dynamic__array_8h}\index{source\_code/MODULE\_marigold\_dynamic\_array/marigold\_dynamic\_array.h@{source\_code/MODULE\_marigold\_dynamic\_array/marigold\_dynamic\_array.h}}
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
Include dependency graph for marigold\+\_\+dynamic\+\_\+array.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=285pt]{marigold__dynamic__array_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=229pt]{marigold__dynamic__array_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \mbox{\hyperlink{marigold__dynamic__array_8h_aa03749e816311cda5048f053a4bbc069}{dynamic\+\_\+array}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{marigold__dynamic__array_8h_a12a619cb69a69466342cf46c4ed32ca0}{dynamic\+\_\+array\+\_\+create}} (size\+\_\+t item\+\_\+size, unsigned int starting\+\_\+capacity, unsigned char growth\+\_\+factor, bool is\+\_\+multithread\+\_\+safe)
\begin{DoxyCompactList}\small\item\em Create and initialize a new dynamic array. \end{DoxyCompactList}\item 
unsigned int \mbox{\hyperlink{marigold__dynamic__array_8h_af82db6ce1a4c0277250ac4545b992517}{dynamic\+\_\+array\+\_\+get\+\_\+occupancy}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Get the number of elements currently in the array. \end{DoxyCompactList}\item 
unsigned int \mbox{\hyperlink{marigold__dynamic__array_8h_a97aef4192e7bf8bc6601a485b975e8a1}{dynamic\+\_\+array\+\_\+get\+\_\+capacity}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Get the total capacity of the array. \end{DoxyCompactList}\item 
void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{marigold__dynamic__array_8h_aa716a8b7cc3e7e4f2776445956b6f20c}{dynamic\+\_\+array\+\_\+get\+\_\+pointer\+\_\+to\+\_\+index}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array, const unsigned int index)
\begin{DoxyCompactList}\small\item\em Get a pointer to the element at the specified index. \end{DoxyCompactList}\item 
const void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{marigold__dynamic__array_8h_a54614709f28d2da67d1349b39d449a64}{dynamic\+\_\+array\+\_\+get\+\_\+const\+\_\+pointer\+\_\+to\+\_\+index}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array, const unsigned int index)
\begin{DoxyCompactList}\small\item\em Get a const pointer to the element at the specified index. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_a41f398054650aba92c3cf66e6278273f}{dynamic\+\_\+array\+\_\+append}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array, const void \texorpdfstring{$\ast$}{*}element)
\begin{DoxyCompactList}\small\item\em Append an element to the end of the array. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_a8ffd2d54341aa8daa04fdac517e85b0b}{dynamic\+\_\+array\+\_\+pop}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Remove the last element from the array. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_a6c315e8471380136e9b4d1b17537481b}{dynamic\+\_\+array\+\_\+remove}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array, const unsigned int index)
\begin{DoxyCompactList}\small\item\em Remove an element at the specified index. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{marigold__dynamic__array_8h_a263862e1f35e8bde17a1ba9307b60785}{dynamic\+\_\+array\+\_\+clear}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Clear all elements from the array. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_a860a30efb898e1e20631b95ae544ece9}{dynamic\+\_\+array\+\_\+is\+\_\+empty}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Check if the array is empty. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_ab10002f58472dcb5f04c04c56790640d}{dynamic\+\_\+array\+\_\+increase\+\_\+capacity}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array, const unsigned int new\+\_\+capacity)
\begin{DoxyCompactList}\small\item\em Reserve additional capacity without changing size. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_af813494ee16c94e4f9d031be1665d2be}{dynamic\+\_\+array\+\_\+acquire}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Increment the owner count for shared ownership. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_a0638d6e4c6aba0de9925609de03bd57a}{dynamic\+\_\+array\+\_\+release}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Decrement the owner count for shared ownership. \end{DoxyCompactList}\item 
unsigned short \mbox{\hyperlink{marigold__dynamic__array_8h_ac0fcc3f5599e1fbb2b14f48dc8cf1551}{dynamic\+\_\+array\+\_\+get\+\_\+owner\+\_\+count}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Get the current owner count. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_afd8d4acd91ed7b5260881faf93c2e265}{dynamic\+\_\+array\+\_\+is\+\_\+thread\+\_\+safe}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}array)
\begin{DoxyCompactList}\small\item\em Check if the array is thread-\/safe. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{marigold__dynamic__array_8h_ab26fb7035357345d1db2d2619a96112f}{dynamic\+\_\+array\+\_\+clone}} (const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}original\+\_\+array, const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}new\+\_\+array)
\begin{DoxyCompactList}\small\item\em Creates a deep copy of the array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Typedef Documentation}
\Hypertarget{marigold__dynamic__array_8h_aa03749e816311cda5048f053a4bbc069}\label{marigold__dynamic__array_8h_aa03749e816311cda5048f053a4bbc069} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array@{dynamic\_array}}
\index{dynamic\_array@{dynamic\_array}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array}{dynamic\_array}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}}}



\doxysubsection{Function Documentation}
\Hypertarget{marigold__dynamic__array_8h_af813494ee16c94e4f9d031be1665d2be}\label{marigold__dynamic__array_8h_af813494ee16c94e4f9d031be1665d2be} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_acquire@{dynamic\_array\_acquire}}
\index{dynamic\_array\_acquire@{dynamic\_array\_acquire}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_acquire()}{dynamic\_array\_acquire()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+acquire (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Increment the owner count for shared ownership. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if owner\+\_\+count would overflow. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a41f398054650aba92c3cf66e6278273f}\label{marigold__dynamic__array_8h_a41f398054650aba92c3cf66e6278273f} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_append@{dynamic\_array\_append}}
\index{dynamic\_array\_append@{dynamic\_array\_append}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_append()}{dynamic\_array\_append()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+append (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{element }\end{DoxyParamCaption})}



Append an element to the end of the array. 

Automatically resizes if current\+\_\+size equals current\+\_\+capacity.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
{\em element} & Pointer to the element to append. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false on allocation failure. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a263862e1f35e8bde17a1ba9307b60785}\label{marigold__dynamic__array_8h_a263862e1f35e8bde17a1ba9307b60785} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_clear@{dynamic\_array\_clear}}
\index{dynamic\_array\_clear@{dynamic\_array\_clear}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_clear()}{dynamic\_array\_clear()}}
{\footnotesize\ttfamily void dynamic\+\_\+array\+\_\+clear (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Clear all elements from the array. 

Sets current\+\_\+size to 0. Does not free the memory block.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\Hypertarget{marigold__dynamic__array_8h_ab26fb7035357345d1db2d2619a96112f}\label{marigold__dynamic__array_8h_ab26fb7035357345d1db2d2619a96112f} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_clone@{dynamic\_array\_clone}}
\index{dynamic\_array\_clone@{dynamic\_array\_clone}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_clone()}{dynamic\_array\_clone()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+clone (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{original\+\_\+array,  }\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{new\+\_\+array }\end{DoxyParamCaption})}



Creates a deep copy of the array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the copy being copied, and one to copy it onto. Must create your own struct instance.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if creation is successful. False if it fails for any reason. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a12a619cb69a69466342cf46c4ed32ca0}\label{marigold__dynamic__array_8h_a12a619cb69a69466342cf46c4ed32ca0} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_create@{dynamic\_array\_create}}
\index{dynamic\_array\_create@{dynamic\_array\_create}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_create()}{dynamic\_array\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*} dynamic\+\_\+array\+\_\+create (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{item\+\_\+size,  }\item[{unsigned int}]{starting\+\_\+capacity,  }\item[{unsigned char}]{growth\+\_\+factor,  }\item[{bool}]{is\+\_\+multithread\+\_\+safe }\end{DoxyParamCaption})}



Create and initialize a new dynamic array. 

Creates a dynamic array with the specified item size and starting capacity. The growth\+\_\+factor determines how the array expands when capacity is exceeded.


\begin{DoxyParams}{Parameters}
{\em item\+\_\+size} & Size of each element in bytes. \\
\hline
{\em starting\+\_\+capacity} & Initial number of elements to allocate space for. \\
\hline
{\em growth\+\_\+factor} & Growth strategy\+: 0 = linear (+starting\+\_\+capacity), 1 = 1.\+5x, 2+ = multiplier (2 = 2x, 3 = 3x, etc.) \\
\hline
{\em is\+\_\+multithread\+\_\+safe} & If true, enables thread-\/safe operations. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the initialized \doxylink{structdynamic__array}{dynamic\+\_\+array}, or NULL on failure. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a97aef4192e7bf8bc6601a485b975e8a1}\label{marigold__dynamic__array_8h_a97aef4192e7bf8bc6601a485b975e8a1} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_get\_capacity@{dynamic\_array\_get\_capacity}}
\index{dynamic\_array\_get\_capacity@{dynamic\_array\_get\_capacity}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_get\_capacity()}{dynamic\_array\_get\_capacity()}}
{\footnotesize\ttfamily unsigned int dynamic\+\_\+array\+\_\+get\+\_\+capacity (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Get the total capacity of the array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Total capacity (current\+\_\+capacity). 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a54614709f28d2da67d1349b39d449a64}\label{marigold__dynamic__array_8h_a54614709f28d2da67d1349b39d449a64} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_get\_const\_pointer\_to\_index@{dynamic\_array\_get\_const\_pointer\_to\_index}}
\index{dynamic\_array\_get\_const\_pointer\_to\_index@{dynamic\_array\_get\_const\_pointer\_to\_index}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_get\_const\_pointer\_to\_index()}{dynamic\_array\_get\_const\_pointer\_to\_index()}}
{\footnotesize\ttfamily const void \texorpdfstring{$\ast$}{*} dynamic\+\_\+array\+\_\+get\+\_\+const\+\_\+pointer\+\_\+to\+\_\+index (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array,  }\item[{const unsigned int}]{index }\end{DoxyParamCaption})}



Get a const pointer to the element at the specified index. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
{\em index} & Index of the element to access. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Const pointer to the element, or NULL if index is out of bounds. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_af82db6ce1a4c0277250ac4545b992517}\label{marigold__dynamic__array_8h_af82db6ce1a4c0277250ac4545b992517} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_get\_occupancy@{dynamic\_array\_get\_occupancy}}
\index{dynamic\_array\_get\_occupancy@{dynamic\_array\_get\_occupancy}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_get\_occupancy()}{dynamic\_array\_get\_occupancy()}}
{\footnotesize\ttfamily unsigned int dynamic\+\_\+array\+\_\+get\+\_\+occupancy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Get the number of elements currently in the array. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Number of elements (current\+\_\+size). 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_ac0fcc3f5599e1fbb2b14f48dc8cf1551}\label{marigold__dynamic__array_8h_ac0fcc3f5599e1fbb2b14f48dc8cf1551} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_get\_owner\_count@{dynamic\_array\_get\_owner\_count}}
\index{dynamic\_array\_get\_owner\_count@{dynamic\_array\_get\_owner\_count}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_get\_owner\_count()}{dynamic\_array\_get\_owner\_count()}}
{\footnotesize\ttfamily unsigned short dynamic\+\_\+array\+\_\+get\+\_\+owner\+\_\+count (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Get the current owner count. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Current owner\+\_\+count value. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_aa716a8b7cc3e7e4f2776445956b6f20c}\label{marigold__dynamic__array_8h_aa716a8b7cc3e7e4f2776445956b6f20c} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_get\_pointer\_to\_index@{dynamic\_array\_get\_pointer\_to\_index}}
\index{dynamic\_array\_get\_pointer\_to\_index@{dynamic\_array\_get\_pointer\_to\_index}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_get\_pointer\_to\_index()}{dynamic\_array\_get\_pointer\_to\_index()}}
{\footnotesize\ttfamily void \texorpdfstring{$\ast$}{*} dynamic\+\_\+array\+\_\+get\+\_\+pointer\+\_\+to\+\_\+index (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array,  }\item[{const unsigned int}]{index }\end{DoxyParamCaption})}



Get a pointer to the element at the specified index. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
{\em index} & Index of the element to access. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the element, or NULL if index is out of bounds. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_ab10002f58472dcb5f04c04c56790640d}\label{marigold__dynamic__array_8h_ab10002f58472dcb5f04c04c56790640d} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_increase\_capacity@{dynamic\_array\_increase\_capacity}}
\index{dynamic\_array\_increase\_capacity@{dynamic\_array\_increase\_capacity}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_increase\_capacity()}{dynamic\_array\_increase\_capacity()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+increase\+\_\+capacity (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array,  }\item[{const unsigned int}]{new\+\_\+capacity }\end{DoxyParamCaption})}



Reserve additional capacity without changing size. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
{\em new\+\_\+capacity} & Desired capacity. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false on allocation failure. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a860a30efb898e1e20631b95ae544ece9}\label{marigold__dynamic__array_8h_a860a30efb898e1e20631b95ae544ece9} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_is\_empty@{dynamic\_array\_is\_empty}}
\index{dynamic\_array\_is\_empty@{dynamic\_array\_is\_empty}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_is\_empty()}{dynamic\_array\_is\_empty()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+is\+\_\+empty (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Check if the array is empty. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if current\+\_\+size is 0, false otherwise. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_afd8d4acd91ed7b5260881faf93c2e265}\label{marigold__dynamic__array_8h_afd8d4acd91ed7b5260881faf93c2e265} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_is\_thread\_safe@{dynamic\_array\_is\_thread\_safe}}
\index{dynamic\_array\_is\_thread\_safe@{dynamic\_array\_is\_thread\_safe}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_is\_thread\_safe()}{dynamic\_array\_is\_thread\_safe()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+is\+\_\+thread\+\_\+safe (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Check if the array is thread-\/safe. 


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if is\+\_\+multithread\+\_\+safe is set, false otherwise. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a8ffd2d54341aa8daa04fdac517e85b0b}\label{marigold__dynamic__array_8h_a8ffd2d54341aa8daa04fdac517e85b0b} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_pop@{dynamic\_array\_pop}}
\index{dynamic\_array\_pop@{dynamic\_array\_pop}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_pop()}{dynamic\_array\_pop()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+pop (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Remove the last element from the array. 

Decrements current\+\_\+size. Does not free the memory block.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if array is empty. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a0638d6e4c6aba0de9925609de03bd57a}\label{marigold__dynamic__array_8h_a0638d6e4c6aba0de9925609de03bd57a} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_release@{dynamic\_array\_release}}
\index{dynamic\_array\_release@{dynamic\_array\_release}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_release()}{dynamic\_array\_release()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+release (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array }\end{DoxyParamCaption})}



Decrement the owner count for shared ownership. 

If owner\+\_\+count reaches 0, the array is automatically destroyed.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if owner\+\_\+count \texorpdfstring{$>$}{>} 0 after decrement, false if destroyed. 
\end{DoxyReturn}
\Hypertarget{marigold__dynamic__array_8h_a6c315e8471380136e9b4d1b17537481b}\label{marigold__dynamic__array_8h_a6c315e8471380136e9b4d1b17537481b} 
\index{marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}!dynamic\_array\_remove@{dynamic\_array\_remove}}
\index{dynamic\_array\_remove@{dynamic\_array\_remove}!marigold\_dynamic\_array.h@{marigold\_dynamic\_array.h}}
\doxysubsubsection{\texorpdfstring{dynamic\_array\_remove()}{dynamic\_array\_remove()}}
{\footnotesize\ttfamily bool dynamic\+\_\+array\+\_\+remove (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structdynamic__array}{dynamic\+\_\+array}} \texorpdfstring{$\ast$}{*}}]{array,  }\item[{const unsigned int}]{index }\end{DoxyParamCaption})}



Remove an element at the specified index. 

Shifts subsequent elements down to fill the gap.


\begin{DoxyParams}{Parameters}
{\em array} & Pointer to the \doxylink{structdynamic__array}{dynamic\+\_\+array}. \\
\hline
{\em index} & Index of the element to remove. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if index is out of bounds. 
\end{DoxyReturn}
