next up previous contents
Next: Faster bitwise operators Up: Accessing the mask from Previous: Registering a new type   Contents

Setting and checking mask states

The state of the mask at a given point is set using the function:

$\textstyle \parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
void Sp...
...
\item[\emph{state\_name}] The particular state to be set.
\end{description}}}$

The state of the mask at a given point can be checked using:

$\textstyle \parbox{\linewidth}{
\vspace{\baselineskip}\noindent\texttt{
int Spa...
...em[\emph{state\_name}] The particular state to be compared.
\end{description}}}$

The return value is 1 if the given state_name has been set at the point, or 0 otherwise.