class_8c.tex 2.21 KB
\hypertarget{class_8c}{
\section{src/class.c File Reference}
\label{class_8c}\index{src/class.c@{src/class.c}}
}
{\ttfamily \#include $<$stdarg.h$>$}\par
{\ttfamily \#include $<$stdlib.h$>$}\par
{\ttfamily \#include \char`\"{}class.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}interface.h\char`\"{}}\par
Include dependency graph for class.c:
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \hyperlink{class_8c_a30ee53043e30a6f7517952a07b9dad83}{class\_\-getInterface} (\hyperlink{structclass}{class\_\-ptr} $\ast$\hyperlink{structclass}{class}, \hyperlink{structinterface}{iface\_\-ptr} \_\-iface)
\item 
\hyperlink{structclass}{class\_\-ptr} \hyperlink{class_8c_a4571582148d8bd8a9387e89843e1904a}{class\_\-getClass} (void $\ast$object)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{class_8c_a4571582148d8bd8a9387e89843e1904a}{
\index{class.c@{class.c}!class\_\-getClass@{class\_\-getClass}}
\index{class\_\-getClass@{class\_\-getClass}!class.c@{class.c}}
\subsubsection[{class\_\-getClass}]{\setlength{\rightskip}{0pt plus 5cm}{\bf class\_\-ptr} class\_\-getClass (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{object}
\end{DoxyParamCaption}
)}}
\label{class_8c_a4571582148d8bd8a9387e89843e1904a}


Definition at line 21 of file class.c.


\begin{DoxyCode}
{
        return *(class_ptr *)(object - sizeof(void*));
}
\end{DoxyCode}


Here is the caller graph for this function:


\hypertarget{class_8c_a30ee53043e30a6f7517952a07b9dad83}{
\index{class.c@{class.c}!class\_\-getInterface@{class\_\-getInterface}}
\index{class\_\-getInterface@{class\_\-getInterface}!class.c@{class.c}}
\subsubsection[{class\_\-getInterface}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ class\_\-getInterface (
\begin{DoxyParamCaption}
\item[{{\bf class\_\-ptr} $\ast$}]{class, }
\item[{{\bf iface\_\-ptr}}]{\_\-iface}
\end{DoxyParamCaption}
)}}
\label{class_8c_a30ee53043e30a6f7517952a07b9dad83}


Definition at line 8 of file class.c.


\begin{DoxyCode}
{
        void * iface = (void *)IFACE_GET(*class, _iface);

        while(NULL == iface && HAS_PARENT(*class)) {
                *class = (*class)->parent;
                iface = (void *)IFACE_GET(*class, _iface);
        }

        return iface;
}
\end{DoxyCode}