\doxysection{SVM variables}
\hypertarget{group__variables}{}\label{group__variables}\index{SVM variables@{SVM variables}}


This module contains API functions to handle variables.  


\doxysubsubsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__scopevariables}{SVM variables scope}}
\begin{DoxyCompactList}\small\item\em This module contains API functions to handle the scope of variables. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__detectvariables}{SVM variables detection}}
\begin{DoxyCompactList}\small\item\em This module contains API functions to detect variable types. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__variables_ga19211ca4a56f7e4c976e76dc05328b44}{svm\+\_\+variable\+\_\+array\+\_\+new}} (const void \texorpdfstring{$\ast$}{*}svm, \mbox{\hyperlink{group__api__types_gaab347fe7005c87722bd7d80cfe94333c}{SVM\+\_\+\+Size}} size)
\begin{DoxyCompactList}\small\item\em This function creates an array of variables. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__variables_ga5dba265f37ba41add5a7ffd7dfdb3243}{svm\+\_\+variable\+\_\+delete}} (const void \texorpdfstring{$\ast$}{*}svm, const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} variable)
\begin{DoxyCompactList}\small\item\em This function alters the scope of the given variable. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This module contains API functions to handle variables. 

A variable in this API refers to a generic pointer used as a key associated to an object internally managed by the virtual machine.

There are two ways to obtain a variable\+:
\begin{DoxyItemize}
\item Instruction and function parameters are variables,
\item API function return values are variables when the indicated type corresponds to a variable type.
\end{DoxyItemize}

The scope of a variable can be\+:
\begin{DoxyItemize}
\item Limited to the plugin callback call (local variable)\+: The variable will not be available in a subsequent plugin callback call,
\item Extended to all plugin callback calls (global variable)\+: The variable will be available in a subsequent plugin callback call within the same plugin.
\end{DoxyItemize}

The scope of the object associated to a variable can be different when\+:
\begin{DoxyItemize}
\item Several variables refer to the same object,
\item The object is used by the virtual machine outside the scope of variables.
\end{DoxyItemize}

Variables are equally comparable\+: Two variables being equal refer to the same associated object\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__api__types_gabbfa54994e431fe68d4f6580c112e1a0}{SVM\_Process}}\ process;}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group__api__types_gaf37a7c40972a9dabfa18b14127c34fb1}{SVM\_Value}}\ instruction\_one(\textcolor{keyword}{const}\ \textcolor{keywordtype}{void}\ *svm,\ \mbox{\hyperlink{group__api__types_gaab347fe7005c87722bd7d80cfe94333c}{SVM\_Size}}\ argc,\ \mbox{\hyperlink{group__api__types_gab05a82304ba262cf3ae97b0c5f8ab707}{SVM\_Parameter}}\ argv[])}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ process\ =\ \mbox{\hyperlink{group__getprocesses_gab65c1662923bb41bd23071ef15422f68}{svm\_process\_get\_current}}(svm);}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group__api__types_gaf37a7c40972a9dabfa18b14127c34fb1}{SVM\_Value}}\ instruction\_two(\textcolor{keyword}{const}\ \textcolor{keywordtype}{void}\ *svm,\ \mbox{\hyperlink{group__api__types_gaab347fe7005c87722bd7d80cfe94333c}{SVM\_Size}}\ argc,\ \mbox{\hyperlink{group__api__types_gab05a82304ba262cf3ae97b0c5f8ab707}{SVM\_Parameter}}\ argv[])}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group__getprocesses_gab65c1662923bb41bd23071ef15422f68}{svm\_process\_get\_current}}(svm)\ ==\ process)}
\DoxyCodeLine{\ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ we\ get\ here\ only\ in\ the\ last\ process\ which\ invoked\ instruction\ one!}}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{\}}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\doxylink{group__types}{SVM types} 
\end{DoxySeeAlso}


\doxysubsection{Function Documentation}
\Hypertarget{group__variables_ga19211ca4a56f7e4c976e76dc05328b44}\label{group__variables_ga19211ca4a56f7e4c976e76dc05328b44} 
\index{SVM variables@{SVM variables}!svm\_variable\_array\_new@{svm\_variable\_array\_new}}
\index{svm\_variable\_array\_new@{svm\_variable\_array\_new}!SVM variables@{SVM variables}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_array\_new()}{svm\_variable\_array\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} \texorpdfstring{$\ast$}{*} svm\+\_\+variable\+\_\+array\+\_\+new (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{\mbox{\hyperlink{group__api__types_gaab347fe7005c87722bd7d80cfe94333c}{SVM\+\_\+\+Size}}}]{size }\end{DoxyParamCaption})}



This function creates an array of variables. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em size} & The size of the array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to a C array of SVM\+\_\+\+Variable. Every cell of the array has to be initialised by a value before being passed to an API function.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
The returned array is a valid SVM variable\+: its scope can be changed if needed, and the pointer shall not be freed explicitely.
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
\end{DoxyExceptions}
\Hypertarget{group__variables_ga5dba265f37ba41add5a7ffd7dfdb3243}\label{group__variables_ga5dba265f37ba41add5a7ffd7dfdb3243} 
\index{SVM variables@{SVM variables}!svm\_variable\_delete@{svm\_variable\_delete}}
\index{svm\_variable\_delete@{svm\_variable\_delete}!SVM variables@{SVM variables}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_delete()}{svm\_variable\_delete()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+variable\+\_\+delete (\begin{DoxyParamCaption}\item[{const void \texorpdfstring{$\ast$}{*}}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}}}]{variable }\end{DoxyParamCaption})}



This function alters the scope of the given variable. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em variable} & The variable to free.\\
\hline
\end{DoxyParams}
This variable becomes immediately invisible.

The object associated to this variable may be deleted immediately.


\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
\end{DoxyExceptions}
\input{group__scopevariables}
\input{group__detectvariables}
