\doxysection{marigold\+\_\+dynamic\+\_\+array.\+h}
\hypertarget{marigold__dynamic__array_8h_source}{}\label{marigold__dynamic__array_8h_source}\index{source\_code/MODULE\_marigold\_dynamic\_array/marigold\_dynamic\_array.h@{source\_code/MODULE\_marigold\_dynamic\_array/marigold\_dynamic\_array.h}}
\mbox{\hyperlink{marigold__dynamic__array_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ DYNAMIC\_ARRAY\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ DYNAMIC\_ARRAY\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structdynamic__array}{dynamic\_array}}}
\DoxyCodeLine{00009\ \{}
\DoxyCodeLine{00010\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ \mbox{\hyperlink{structdynamic__array_a3b19d692a6b8539bc58551e39bf6dfaa}{item\_size}};}
\DoxyCodeLine{00011\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}*\ \mbox{\hyperlink{structdynamic__array_a2fec64b33dac49cedbc5888cd8e8a846}{memory\_block\_pointer}};}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structdynamic__array_ac33ca1e3db1d4229852b9f36b62f2e08}{starting\_capacity}};}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structdynamic__array_a633fcea60fb454a78a7a058e3bda0bbe}{current\_capacity}};}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structdynamic__array_ae7da5f21eb2bfdeff0e05b53598185c5}{current\_size}};}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{short}\ \mbox{\hyperlink{structdynamic__array_a105f76026911ac2665bf25a73ecf30a6}{owner\_count}};}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{char}\ \mbox{\hyperlink{structdynamic__array_aa3d42a1672d2015f89d8c607124fa3e5}{growth\_factor}};}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structdynamic__array_affeb533fae8aa1d8d80abc61e3380cc1}{is\_multithread\_safe}};}
\DoxyCodeLine{00021\ \}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}};}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00036\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ \mbox{\hyperlink{marigold__dynamic__array_8h_a12a619cb69a69466342cf46c4ed32ca0}{dynamic\_array\_create}}(\textcolor{keywordtype}{size\_t}\ item\_size,}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ starting\_capacity,}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{char}\ growth\_factor,}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ is\_multithread\_safe);}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00047\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{marigold__dynamic__array_8h_af82db6ce1a4c0277250ac4545b992517}{dynamic\_array\_get\_occupancy}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00055\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a97aef4192e7bf8bc6601a485b975e8a1}{dynamic\_array\_get\_capacity}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00064\ \textcolor{keywordtype}{void}*\ \mbox{\hyperlink{marigold__dynamic__array_8h_aa716a8b7cc3e7e4f2776445956b6f20c}{dynamic\_array\_get\_pointer\_to\_index}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ index);}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00074\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}*\ \mbox{\hyperlink{marigold__dynamic__array_8h_a54614709f28d2da67d1349b39d449a64}{dynamic\_array\_get\_const\_pointer\_to\_index}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array,}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ index);}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00086\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a41f398054650aba92c3cf66e6278273f}{dynamic\_array\_append}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array,}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}*\ element);}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00097\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a8ffd2d54341aa8daa04fdac517e85b0b}{dynamic\_array\_pop}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00108\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a6c315e8471380136e9b4d1b17537481b}{dynamic\_array\_remove}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array,}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ index);}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00118\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a263862e1f35e8bde17a1ba9307b60785}{dynamic\_array\_clear}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00126\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a860a30efb898e1e20631b95ae544ece9}{dynamic\_array\_is\_empty}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00135\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_ab10002f58472dcb5f04c04c56790640d}{dynamic\_array\_increase\_capacity}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array,}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ new\_capacity);}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00144\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_af813494ee16c94e4f9d031be1665d2be}{dynamic\_array\_acquire}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00154\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_a0638d6e4c6aba0de9925609de03bd57a}{dynamic\_array\_release}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00162\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{short}\ \mbox{\hyperlink{marigold__dynamic__array_8h_ac0fcc3f5599e1fbb2b14f48dc8cf1551}{dynamic\_array\_get\_owner\_count}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00170\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_afd8d4acd91ed7b5260881faf93c2e265}{dynamic\_array\_is\_thread\_safe}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ array);}
\DoxyCodeLine{00171\ }
\DoxyCodeLine{00180\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{marigold__dynamic__array_8h_ab26fb7035357345d1db2d2619a96112f}{dynamic\_array\_clone}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ original\_array,}
\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structdynamic__array}{dynamic\_array}}*\ new\_array);}
\DoxyCodeLine{00182\ }
\DoxyCodeLine{00183\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ DYNAMIC\_ARRAY\_H\ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
