\hypertarget{opal__object_8c}{\section{opal/class/opal\+\_\+object.c File Reference}
\label{opal__object_8c}\index{opal/class/opal\+\_\+object.\+c@{opal/class/opal\+\_\+object.\+c}}
}


Implementation of \hyperlink{structopal__object__t}{opal\+\_\+object\+\_\+t}, the base opal foundation class.  


{\ttfamily \#include \char`\"{}opal\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include \char`\"{}opal/sys/atomic.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/constants.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__object_8c_a8fe3dfaa5699d0f7fa7fdd011344e20a}{static void {\bfseries save\+\_\+class} (\hyperlink{structopal__class__t}{opal\+\_\+class\+\_\+t} $\ast$cls)}\label{opal__object_8c_a8fe3dfaa5699d0f7fa7fdd011344e20a}

\item 
\hypertarget{opal__object_8c_a3ceba0e3a50f82fbfca029a2c5d63f10}{static void {\bfseries expand\+\_\+array} (void)}\label{opal__object_8c_a3ceba0e3a50f82fbfca029a2c5d63f10}

\item 
void \hyperlink{opal__object_8c_a256e9d2e6e548311a1934b2dcb15dd45}{opal\+\_\+class\+\_\+initialize} (\hyperlink{structopal__class__t}{opal\+\_\+class\+\_\+t} $\ast$cls)
\begin{DoxyCompactList}\small\item\em Lazy initialization of class descriptor. \end{DoxyCompactList}\item 
int \hyperlink{opal__object_8c_a116c6db327d3c3442e3731849eb103b3}{opal\+\_\+class\+\_\+finalize} (void)
\begin{DoxyCompactList}\small\item\em Shut down the class system and release all memory. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structopal__class__t}{opal\+\_\+class\+\_\+t} {\bfseries opal\+\_\+object\+\_\+t\+\_\+class}
\item 
\hypertarget{opal__object_8c_ae93ce1ae5955699ad5596636f609cbb4}{static \hyperlink{structopal__atomic__lock__t}{opal\+\_\+atomic\+\_\+lock\+\_\+t} {\bfseries class\+\_\+lock} = \{ \{ O\+P\+A\+L\+\_\+\+A\+T\+O\+M\+I\+C\+\_\+\+U\+N\+L\+O\+C\+K\+E\+D \} \}}\label{opal__object_8c_ae93ce1ae5955699ad5596636f609cbb4}

\item 
\hypertarget{opal__object_8c_aefb3ff221a5ae5decc8423706d1e9c65}{static void $\ast$$\ast$ {\bfseries classes} = N\+U\+L\+L}\label{opal__object_8c_aefb3ff221a5ae5decc8423706d1e9c65}

\item 
\hypertarget{opal__object_8c_a7ff44984cc50a9af5140c3809f62aabf}{static int {\bfseries num\+\_\+classes} = 0}\label{opal__object_8c_a7ff44984cc50a9af5140c3809f62aabf}

\item 
\hypertarget{opal__object_8c_ac6bd9f60727ec54188d7b05573f6b780}{static int {\bfseries max\+\_\+classes} = 0}\label{opal__object_8c_ac6bd9f60727ec54188d7b05573f6b780}

\item 
\hypertarget{opal__object_8c_af4ea0dec1c2f7f72dfb4a94d729fdee6}{static const int {\bfseries increment} = 10}\label{opal__object_8c_af4ea0dec1c2f7f72dfb4a94d729fdee6}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implementation of \hyperlink{structopal__object__t}{opal\+\_\+object\+\_\+t}, the base opal foundation class. 



\subsection{Function Documentation}
\hypertarget{opal__object_8c_a116c6db327d3c3442e3731849eb103b3}{\index{opal\+\_\+object.\+c@{opal\+\_\+object.\+c}!opal\+\_\+class\+\_\+finalize@{opal\+\_\+class\+\_\+finalize}}
\index{opal\+\_\+class\+\_\+finalize@{opal\+\_\+class\+\_\+finalize}!opal\+\_\+object.\+c@{opal\+\_\+object.\+c}}
\subsubsection[{opal\+\_\+class\+\_\+finalize}]{\setlength{\rightskip}{0pt plus 5cm}int opal\+\_\+class\+\_\+finalize (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{opal__object_8c_a116c6db327d3c3442e3731849eb103b3}


Shut down the class system and release all memory. 

This function should be invoked as the A\+B\+S\+O\+L\+U\+T\+E L\+A\+S\+T function to use the class subsystem. It frees all associated memory with A\+L\+L classes, rendering all of them inoperable. It is here so that tools like valgrind and purify don't report still-\/reachable memory upon process termination. 

Referenced by opal\+\_\+finalize\+\_\+util().

\hypertarget{opal__object_8c_a256e9d2e6e548311a1934b2dcb15dd45}{\index{opal\+\_\+object.\+c@{opal\+\_\+object.\+c}!opal\+\_\+class\+\_\+initialize@{opal\+\_\+class\+\_\+initialize}}
\index{opal\+\_\+class\+\_\+initialize@{opal\+\_\+class\+\_\+initialize}!opal\+\_\+object.\+c@{opal\+\_\+object.\+c}}
\subsubsection[{opal\+\_\+class\+\_\+initialize}]{\setlength{\rightskip}{0pt plus 5cm}void opal\+\_\+class\+\_\+initialize (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+class\+\_\+t} $\ast$}]{}
\end{DoxyParamCaption}
)}}\label{opal__object_8c_a256e9d2e6e548311a1934b2dcb15dd45}


Lazy initialization of class descriptor. 

Specifically cache arrays of function pointers for the constructor and destructor hierarchies for this class.


\begin{DoxyParams}{Parameters}
{\em class} & Pointer to class descriptor \\
\hline
\end{DoxyParams}


References opal\+\_\+class\+\_\+t\+::cls\+\_\+construct, opal\+\_\+class\+\_\+t\+::cls\+\_\+construct\+\_\+array, opal\+\_\+class\+\_\+t\+::cls\+\_\+depth, opal\+\_\+class\+\_\+t\+::cls\+\_\+destruct, opal\+\_\+class\+\_\+t\+::cls\+\_\+destruct\+\_\+array, opal\+\_\+class\+\_\+t\+::cls\+\_\+initialized, opal\+\_\+class\+\_\+t\+::cls\+\_\+parent, opal\+\_\+atomic\+\_\+lock(), and opal\+\_\+atomic\+\_\+unlock().



Referenced by opal\+\_\+obj\+\_\+new().



\subsection{Variable Documentation}
\hypertarget{opal__object_8c_a76c8034ad8d70d633116395a241436d3}{\index{opal\+\_\+object.\+c@{opal\+\_\+object.\+c}!opal\+\_\+object\+\_\+t\+\_\+class@{opal\+\_\+object\+\_\+t\+\_\+class}}
\index{opal\+\_\+object\+\_\+t\+\_\+class@{opal\+\_\+object\+\_\+t\+\_\+class}!opal\+\_\+object.\+c@{opal\+\_\+object.\+c}}
\subsubsection[{opal\+\_\+object\+\_\+t\+\_\+class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf opal\+\_\+class\+\_\+t} opal\+\_\+object\+\_\+t\+\_\+class}}\label{opal__object_8c_a76c8034ad8d70d633116395a241436d3}
{\bfseries Initial value\+:}
\begin{DoxyCode}
= \{
    \textcolor{stringliteral}{"opal\_object\_t"},      
    NULL,                 
    NULL,                 
    NULL,                 
    1,                    
    0,                    
    NULL,                 
    NULL,                 
    \textcolor{keyword}{sizeof}(\hyperlink{structopal__object__t}{opal\_object\_t}) 
\}
\end{DoxyCode}
