Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 731

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

\section{ost::Ref\-Object Class Reference}
\label{classost_1_1_ref_object}\index{ost::RefObject@{ost::RefObject}}
A reference countable object.Object managed by smart pointer reference count.  


{\tt \#include $<$object.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void $\ast$ {\bf get\-Object} (void)=0
\begin{CompactList}\small\item\em The actual object being managed can be returned by this method as a void and then recast to the actual type. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Ref\-Object} ()
\begin{CompactList}\small\item\em The constructor simply initializes the count. \item\end{CompactList}\item 
virtual {\bf $\sim$Ref\-Object} ()
\begin{CompactList}\small\item\em The destructor is called when the reference count returns to zero. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
unsigned {\bf ref\-Count}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Ref\-Pointer}
\end{CompactItemize}


\subsection{Detailed Description}
A reference countable object.Object managed by smart pointer reference count. 

This is used in association with smart pointers ({\bf Ref\-Pointer}{\rm (p.\,\pageref{classost_1_1_ref_pointer})}).

\begin{Desc}
\item[Author:]David Sugar $<${\tt dyfet@gnutelephony.org}$>$ \end{Desc}




\subsection{Constructor \& Destructor Documentation}
\index{ost::RefObject@{ost::Ref\-Object}!RefObject@{RefObject}}
\index{RefObject@{RefObject}!ost::RefObject@{ost::Ref\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Ref\-Object::Ref\-Object ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classost_1_1_ref_object_7dabeed59ecca372353f66284be97dd8}


The constructor simply initializes the count. 

\index{ost::RefObject@{ost::Ref\-Object}!~RefObject@{$\sim$RefObject}}
\index{~RefObject@{$\sim$RefObject}!ost::RefObject@{ost::Ref\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::Ref\-Object::$\sim$Ref\-Object ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classost_1_1_ref_object_7c174b0ec5861a42e13daf1801ed0277}


The destructor is called when the reference count returns to zero. 

This is done through a virtual destructor. 

\subsection{Member Function Documentation}
\index{ost::RefObject@{ost::Ref\-Object}!getObject@{getObject}}
\index{getObject@{getObject}!ost::RefObject@{ost::Ref\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void$\ast$ ost::Ref\-Object::get\-Object (void)\hspace{0.3cm}{\tt  [pure virtual]}}\label{classost_1_1_ref_object_43b6a22fa4ab33a53ce2da72877c9edb}


The actual object being managed can be returned by this method as a void and then recast to the actual type. 

This removes the need to dynamic cast from {\bf Ref\-Object}{\rm (p.\,\pageref{classost_1_1_ref_object})} and the dependence on rtti this implies.

\begin{Desc}
\item[Returns:]underlying object being referenced. \end{Desc}


\subsection{Friends And Related Function Documentation}
\index{ost::RefObject@{ost::Ref\-Object}!RefPointer@{RefPointer}}
\index{RefPointer@{RefPointer}!ost::RefObject@{ost::Ref\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Ref\-Pointer}\hspace{0.3cm}{\tt  [friend]}}\label{classost_1_1_ref_object_0cdd998cac4e2907eb6a4e7d80ea69df}




\subsection{Member Data Documentation}
\index{ost::RefObject@{ost::Ref\-Object}!refCount@{refCount}}
\index{refCount@{refCount}!ost::RefObject@{ost::Ref\-Object}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned {\bf ost::Ref\-Object::ref\-Count}\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_ref_object_7887ae684391ece66186f3dfbc6a35a9}




The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf object.h}\end{CompactItemize}