interface_8c.tex 2.43 KB
\hypertarget{interface_8c}{
\section{src/interface.c File Reference}
\label{interface_8c}\index{src/interface.c@{src/interface.c}}
}
{\ttfamily \#include $<$sys/types.h$>$}\par
{\ttfamily \#include $<$stdlib.h$>$}\par
{\ttfamily \#include \char`\"{}interface.h\char`\"{}}\par
Include dependency graph for interface.c:
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{interface_8c_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}~1
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structinterface}{interface} $\ast$ \hyperlink{interface_8c_a3592671f742071d6b215f46ba58f53ab}{interfaceGet} (\hyperlink{structiface__impl}{iface\_\-impl\_\-ptr} \hyperlink{structiface__impl}{iface\_\-impl}, const \hyperlink{structinterface}{iface\_\-ptr} \_\-iface)
\end{DoxyCompactItemize}


\subsection{Define Documentation}
\hypertarget{interface_8c_aa8cecfc5c5c054d2875c03e77b7be15d}{
\index{interface.c@{interface.c}!TRUE@{TRUE}}
\index{TRUE@{TRUE}!interface.c@{interface.c}}
\subsubsection[{TRUE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TRUE~1}}
\label{interface_8c_aa8cecfc5c5c054d2875c03e77b7be15d}


Definition at line 7 of file interface.c.



\subsection{Function Documentation}
\hypertarget{interface_8c_a3592671f742071d6b215f46ba58f53ab}{
\index{interface.c@{interface.c}!interfaceGet@{interfaceGet}}
\index{interfaceGet@{interfaceGet}!interface.c@{interface.c}}
\subsubsection[{interfaceGet}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf interface}$\ast$ interfaceGet (
\begin{DoxyParamCaption}
\item[{{\bf iface\_\-impl\_\-ptr}}]{iface\_\-impl, }
\item[{const {\bf iface\_\-ptr}}]{\_\-iface}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}read\mbox{]}}}}
\label{interface_8c_a3592671f742071d6b215f46ba58f53ab}
this one is important in selector functions to get the correct interface implementation of a class. 

Definition at line 25 of file interface.c.


\begin{DoxyCode}
{
        const iface_ptr * iface = &_iface;
        void *            dummy;

    if (! iface_impl->simpl) {
        qsort((void**)(iface_impl->impl), iface_impl->nimpl, sizeof(iface_ptr), c
      omp);
        iface_impl->simpl=TRUE;
    }

    dummy = bsearch(
                        &iface,
                        iface_impl->impl,
                        iface_impl->nimpl,
                        sizeof(iface_ptr),
                        comp);

        return dummy? *(struct interface **)dummy : dummy;
}
\end{DoxyCode}