\hypertarget{group__scopevariables}{}\doxysection{SVM variables scope}
\label{group__scopevariables}\index{SVM variables scope@{SVM variables scope}}


This module contains API functions to handle the scope of variables.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global}} (const void $\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}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local}} (const void $\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}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+shared}} (const void $\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}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void \mbox{\hyperlink{group__scopevariables_gadebc8a75cea04e2377f751435610e650}{svm\+\_\+variable\+\_\+scope\+\_\+reset\+\_\+shared}} (const void $\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}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__scopevariables_gafd1d7ec0cdfa094637cc1a6551913a9c}{svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+shared}} (const void $\ast$svm, const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} variable)
\begin{DoxyCompactList}\small\item\em This function checks whether a variable is shared. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__scopevariables_ga882d4b2dfa483a46ccc1b29706bb5031}{svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+local}} (const void $\ast$svm, const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} variable)
\begin{DoxyCompactList}\small\item\em This function checks whether a variable is local. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} \mbox{\hyperlink{group__scopevariables_ga69e2ac1c72e87cf9348da0c05c2f9ee4}{svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+global}} (const void $\ast$svm, const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}} variable)
\begin{DoxyCompactList}\small\item\em This function checks whether a variable is global. \end{DoxyCompactList}\end{DoxyCompactItemize}


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



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__scopevariables_ga69e2ac1c72e87cf9348da0c05c2f9ee4}\label{group__scopevariables_ga69e2ac1c72e87cf9348da0c05c2f9ee4}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_is\_global@{svm\_variable\_scope\_is\_global}}
\index{svm\_variable\_scope\_is\_global@{svm\_variable\_scope\_is\_global}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_is\_global()}{svm\_variable\_scope\_is\_global()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+global (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}}}]{variable }\end{DoxyParamCaption})}



This function checks whether a variable is global. 


\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 check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TRUE when the variable is global, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.)\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+shared}} 

\mbox{\hyperlink{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global}} 

\mbox{\hyperlink{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local}} 

\mbox{\hyperlink{group__scopevariables_ga882d4b2dfa483a46ccc1b29706bb5031}{svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+local}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__scopevariables_ga882d4b2dfa483a46ccc1b29706bb5031}\label{group__scopevariables_ga882d4b2dfa483a46ccc1b29706bb5031}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_is\_local@{svm\_variable\_scope\_is\_local}}
\index{svm\_variable\_scope\_is\_local@{svm\_variable\_scope\_is\_local}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_is\_local()}{svm\_variable\_scope\_is\_local()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+local (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}}}]{variable }\end{DoxyParamCaption})}



This function checks whether a variable is local. 


\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 check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TRUE when the variable is local, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.)\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+shared}} 

\mbox{\hyperlink{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global}} 

\mbox{\hyperlink{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local}} 

\mbox{\hyperlink{group__scopevariables_ga69e2ac1c72e87cf9348da0c05c2f9ee4}{svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+global}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__scopevariables_gafd1d7ec0cdfa094637cc1a6551913a9c}\label{group__scopevariables_gafd1d7ec0cdfa094637cc1a6551913a9c}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_is\_shared@{svm\_variable\_scope\_is\_shared}}
\index{svm\_variable\_scope\_is\_shared@{svm\_variable\_scope\_is\_shared}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_is\_shared()}{svm\_variable\_scope\_is\_shared()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} svm\+\_\+variable\+\_\+scope\+\_\+is\+\_\+shared (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_gad01adf1b14e8f8309ff0c059b2a51196}{SVM\+\_\+\+Variable}}}]{variable }\end{DoxyParamCaption})}



This function checks whether a variable is shared. 


\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 check.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TRUE when the variable is shared, FALSE otherwise.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.)\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+shared}} 

\mbox{\hyperlink{group__scopevariables_gadebc8a75cea04e2377f751435610e650}{svm\+\_\+variable\+\_\+scope\+\_\+reset\+\_\+shared}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__scopevariables_gadebc8a75cea04e2377f751435610e650}\label{group__scopevariables_gadebc8a75cea04e2377f751435610e650}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_reset\_shared@{svm\_variable\_scope\_reset\_shared}}
\index{svm\_variable\_scope\_reset\_shared@{svm\_variable\_scope\_reset\_shared}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_reset\_shared()}{svm\_variable\_scope\_reset\_shared()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+variable\+\_\+scope\+\_\+reset\+\_\+shared (\begin{DoxyParamCaption}\item[{const void $\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 downgrade as regular variable.\\
\hline
\end{DoxyParams}
When a variable is reset as regular, svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global and svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local API function calls become idempotents. If svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global is called several times on the same variable, only one call to svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local will set the variable as local.


\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.)\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global}} 

\mbox{\hyperlink{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}\label{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_set\_global@{svm\_variable\_scope\_set\_global}}
\index{svm\_variable\_scope\_set\_global@{svm\_variable\_scope\_set\_global}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_set\_global()}{svm\_variable\_scope\_set\_global()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global (\begin{DoxyParamCaption}\item[{const void $\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 upgrade as global variable.\\
\hline
\end{DoxyParams}
This variable becomes visible in all further callbacks of the plugin, until either svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local or svm\+\_\+variable\+\_\+delete is called on the same variable.

The object associated to this variable is also kept alive when its scope is set global.


\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}\label{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_set\_local@{svm\_variable\_scope\_set\_local}}
\index{svm\_variable\_scope\_set\_local@{svm\_variable\_scope\_set\_local}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_set\_local()}{svm\_variable\_scope\_set\_local()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local (\begin{DoxyParamCaption}\item[{const void $\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 downgrade as local variable.\\
\hline
\end{DoxyParams}
This variable becomes visible only in the current callback of the plugin, unless svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global is called on the same variable before the end of the callback.

The object associated to this variable may be deleted when the callback reaches its end.

\begin{DoxyNote}{Note}
This scope is the default one. This allows automatic clean-\/up of all transient values created during a plugin callback call.
\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}
\mbox{\Hypertarget{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}\label{group__scopevariables_gadc7d8602e97aeed50141d6431b9a29b7}} 
\index{SVM variables scope@{SVM variables scope}!svm\_variable\_scope\_set\_shared@{svm\_variable\_scope\_set\_shared}}
\index{svm\_variable\_scope\_set\_shared@{svm\_variable\_scope\_set\_shared}!SVM variables scope@{SVM variables scope}}
\doxysubsubsection{\texorpdfstring{svm\_variable\_scope\_set\_shared()}{svm\_variable\_scope\_set\_shared()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} void svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+shared (\begin{DoxyParamCaption}\item[{const void $\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 upgrade as shared variable.\\
\hline
\end{DoxyParams}
When a variable is set as shared, svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global and svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local API function calls are no longer idempotents. If svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global is called several times on the same variable, it will require the same number of calls to svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local to set the variable as local.

This mechanism allows a variable to be shared by several C/\+C++ structures within a plugin.

\begin{DoxyNote}{Note}
If the variable is already global when passed to shared, all previous calls to svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global are counted as one unique call.
\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}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__scopevariables_gaffc2e6ad99d8346dd50e6ab0f6f72543}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+global}} 

\mbox{\hyperlink{group__scopevariables_ga0b8d98a971d0ec7cb0d1ea3f71af3647}{svm\+\_\+variable\+\_\+scope\+\_\+set\+\_\+local}} 
\end{DoxySeeAlso}
