\doxysection{vset.\+h}
\label{a00032_source}\index{vset.h@{vset.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#ifndef\ \_VSET\_H\_}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#define\ \_VSET\_H\_}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#include\ <maloc/maloc\_base.h>}}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#include\ <maloc/vnm.h>}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#include\ <maloc/vmem.h>}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{comment}{/*}}
\DoxyCodeLine{00047\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00048\ \textcolor{comment}{\ *\ Class\ Vset:\ Parameters\ and\ datatypes}}
\DoxyCodeLine{00049\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00050\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00057\ \textcolor{keyword}{struct\ }sVset\ \{}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00060\ \ \ \ \ Vmem\ *vmem;\ \ \ \ \ \ }
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{int}\ \ iMadeVmem;\ \ }
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{int}\ curT;}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{char}\ nameT[VMAX\_ARGLEN];}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keywordtype}{int}\ sizeT;\ \ \ \ \ }
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{int}\ numBlocks;\ \ }
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordtype}{int}\ numT;\ \ \ \ \ \ \ }
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordtype}{int}\ prtT;\ \ \ \ \ \ \ \ }
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{int}\ maxObjects;\ \ \ }
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keywordtype}{int}\ blockPower;\ \ }
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{int}\ blockSize;\ }
\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordtype}{int}\ blockMax;\ \ }
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordtype}{int}\ blockModulo;\ \ }
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{char}\ **table;\ \ \ \ }
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ \};}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00100\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }sVset\ Vset;}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \textcolor{comment}{/****************************************************************/}}
\DoxyCodeLine{00103\ \textcolor{comment}{/*\ Class\ Vset:\ Inlineable\ method\ (vset.c)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00104\ \textcolor{comment}{/****************************************************************/}}
\DoxyCodeLine{00105\ }
\DoxyCodeLine{00106\ \textcolor{preprocessor}{\#if\ !defined(VINLINE\_MALOC)}}
\DoxyCodeLine{00115\ \ \ \ \ \textcolor{keywordtype}{int}\ Vset\_num(Vset\ *thee);}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00126\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_access(Vset\ *thee,\ \textcolor{keywordtype}{int}\ i);}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00136\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_create(Vset\ *thee);}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_first(Vset\ *thee);}
\DoxyCodeLine{00147\ }
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_last(Vset\ *thee);}
\DoxyCodeLine{00157\ }
\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_next(Vset\ *thee);}
\DoxyCodeLine{00167\ }
\DoxyCodeLine{00176\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_prev(Vset\ *thee);}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_peekFirst(Vset\ *thee);}
\DoxyCodeLine{00187\ }
\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordtype}{char}\ *Vset\_peekLast(Vset\ *thee);}
\DoxyCodeLine{00197\ }
\DoxyCodeLine{00206\ \ \ \ \ \textcolor{keywordtype}{void}\ Vset\_destroy(Vset\ *thee);}
\DoxyCodeLine{00207\ \textcolor{preprocessor}{\#else\ }\textcolor{comment}{/*\ if\ defined(VINLINE\_MALOC)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00216\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_num(thee)\ ((thee)-\/>numT)}}
\DoxyCodeLine{00217\ }
\DoxyCodeLine{00227\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_access(thee,i)\ (\ \(\backslash\)}}
\DoxyCodeLine{00228\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ((i\ >=\ 0)\ \&\&\ (i\ <\ thee-\/>numT))\ \(\backslash\)}}
\DoxyCodeLine{00229\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ?\ \&((thee)-\/>table[\ (i)>>(thee)-\/>blockPower\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\ \(\backslash\)}}
\DoxyCodeLine{00230\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [\ (thee)-\/>sizeT*((i)\&(thee)-\/>blockModulo)\ ])\ \(\backslash\)}}
\DoxyCodeLine{00231\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ :\ VNULL\ \(\backslash\)}}
\DoxyCodeLine{00232\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00233\ }
\DoxyCodeLine{00242\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_create(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00243\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (\ \ ((((thee)-\/>numT)>>(thee)-\/>blockPower)\ >=\ (thee)-\/>numBlocks)\ \(\backslash\)}}
\DoxyCodeLine{00244\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ||\ ((((thee)-\/>numT+1)\%(thee)-\/>prtT)\ ==\ 0)\ )\ \(\backslash\)}}
\DoxyCodeLine{00245\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ?\ (Vset\_createLast((thee)))\ \(\backslash\)}}
\DoxyCodeLine{00246\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ :\ (++((thee)-\/>numT),\ (Vset\_access((thee),(thee)-\/>numT-\/1)))\ \(\backslash\)}}
\DoxyCodeLine{00247\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00248\ }
\DoxyCodeLine{00257\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_first(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00258\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (thee)-\/>curT\ =\ 0,\ \(\backslash\)}}
\DoxyCodeLine{00259\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ Vset\_access((thee),\ (thee)-\/>curT)\ \(\backslash\)}}
\DoxyCodeLine{00260\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00261\ }
\DoxyCodeLine{00270\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_last(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00271\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (thee)-\/>curT\ =\ (thee)-\/>numT-\/1,\ \(\backslash\)}}
\DoxyCodeLine{00272\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ Vset\_access((thee),\ (thee)-\/>curT)\ \(\backslash\)}}
\DoxyCodeLine{00273\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00274\ }
\DoxyCodeLine{00283\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_next(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00284\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (thee)-\/>curT++,\ \(\backslash\)}}
\DoxyCodeLine{00285\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ((thee)-\/>curT\ <\ (thee)-\/>numT)\ \(\backslash\)}}
\DoxyCodeLine{00286\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ?\ Vset\_access((thee),\ (thee)-\/>curT)\ \(\backslash\)}}
\DoxyCodeLine{00287\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ :\ VNULL\ \(\backslash\)}}
\DoxyCodeLine{00288\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00289\ }
\DoxyCodeLine{00298\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_prev(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00299\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (thee)-\/>curT-\/-\/,\ \(\backslash\)}}
\DoxyCodeLine{00300\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ((thee)-\/>curT\ >=\ 0)\ \(\backslash\)}}
\DoxyCodeLine{00301\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ?\ Vset\_access((thee),\ (thee)-\/>curT)\ \(\backslash\)}}
\DoxyCodeLine{00302\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ :\ VNULL\ \(\backslash\)}}
\DoxyCodeLine{00303\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00304\ }
\DoxyCodeLine{00313\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_peekFirst(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00314\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ Vset\_access((thee),\ 0)\ \(\backslash\)}}
\DoxyCodeLine{00315\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00316\ }
\DoxyCodeLine{00325\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_peekLast(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00326\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ Vset\_access((thee),\ (thee)-\/>numT-\/1)\ \(\backslash\)}}
\DoxyCodeLine{00327\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00328\ }
\DoxyCodeLine{00337\ \textcolor{preprocessor}{\#\ \ \ define\ Vset\_destroy(thee)\ (\ \(\backslash\)}}
\DoxyCodeLine{00338\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (\ ((((thee)-\/>numT-\/1)>>(thee)-\/>blockPower)\ <\ (thee)-\/>numBlocks-\/1)\ \(\backslash\)}}
\DoxyCodeLine{00339\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ ||\ ((thee)-\/>numT\ ==\ 1)\ ||\ ((((thee)-\/>numT)\%(thee)-\/>prtT)\ ==\ 0)\ )\ \(\backslash\)}}
\DoxyCodeLine{00340\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ ?\ (Vset\_destroyLast((thee)))\ :\ (void)(((thee)-\/>numT)-\/-\/)\ \(\backslash\)}}
\DoxyCodeLine{00341\ \textcolor{preprocessor}{\ \ \ \ )}}
\DoxyCodeLine{00342\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ if\ !defined(VINLINE\_MALOC)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00343\ }
\DoxyCodeLine{00356\ Vset*\ Vset\_ctor(Vmem\ *vmem,}
\DoxyCodeLine{00357\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *tname,\ \textcolor{keywordtype}{int}\ tsize,\ \textcolor{keywordtype}{int}\ tmaxNum,\ \textcolor{keywordtype}{int}\ ioKey);}
\DoxyCodeLine{00358\ }
\DoxyCodeLine{00367\ \textcolor{keywordtype}{void}\ Vset\_dtor(Vset\ **thee);}
\DoxyCodeLine{00368\ }
\DoxyCodeLine{00377\ \textcolor{keywordtype}{char}\ *Vset\_createLast(Vset\ *thee);}
\DoxyCodeLine{00378\ }
\DoxyCodeLine{00387\ \textcolor{keywordtype}{void}\ Vset\_destroyLast(Vset\ *thee);}
\DoxyCodeLine{00388\ }
\DoxyCodeLine{00397\ \textcolor{keywordtype}{void}\ Vset\_initData(Vset\ *thee);}
\DoxyCodeLine{00398\ }
\DoxyCodeLine{00407\ \textcolor{keywordtype}{void}\ Vset\_reset(Vset\ *thee);}
\DoxyCodeLine{00408\ }
\DoxyCodeLine{00422\ \textcolor{keywordtype}{void}\ Vset\_check(Vset\ *thee,}
\DoxyCodeLine{00423\ \ \ \ \ \textcolor{keywordtype}{int}\ *tnum,\ \textcolor{keywordtype}{int}\ *tsize,\ \textcolor{keywordtype}{int}\ *tVecUse,\ \textcolor{keywordtype}{int}\ *tVecMal,\ \textcolor{keywordtype}{int}\ *tVecOhd);}
\DoxyCodeLine{00424\ }
\DoxyCodeLine{00433\ \textcolor{keywordtype}{void}\ Vset\_memChk(Vset\ *thee);}
\DoxyCodeLine{00434\ }
\DoxyCodeLine{00435\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ \_VSET\_H\_\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00436\ }

\end{DoxyCode}
