OpenSceneGraph/doc/doc++/osg/ref_ptr.html
2003-07-23 11:27:31 +00:00

191 lines
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>template<class T> class osg::ref_ptr</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>template&lt;class <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>&gt; class <A HREF="#DOC.DOCU">osg::ref_ptr</A></H2></H2><BLOCKQUOTE>Smart pointer for handling referenced counted objects</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.225.2">ref_ptr</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.225.3">ref_ptr</A></B>(<!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="ImpostorSprite.html#DOC.2.90.25">t</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.225.4">ref_ptr</A></B>(const <!1><A HREF="ref_ptr.html#DOC.2.225.4">ref_ptr</A>&amp; rp)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.225.5">~ref_ptr</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; <B><A HREF="#DOC.2.225.6">operator = </A></B>(const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; <B><A HREF="#DOC.2.225.7">operator = </A></B>(<!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.8">operator == </A></B>(const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.9">operator != </A></B>(const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.10">operator < </A></B>(const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.11">operator > </A></B>(const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.12">operator == </A></B>(const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.13">operator != </A></B>(const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.14">operator < </A></B>(const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.15">operator > </A></B>(const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>&amp; <B><A HREF="#DOC.2.225.16">operator*</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>&amp; <B><A HREF="#DOC.2.225.17">operator*</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.18">operator-></A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.19">operator-></A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.20">operator!</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.225.21">valid</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.22">get</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.23">get</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.24">take</A></B>()
<DD><I>take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0, return the pointer to the object.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <B><A HREF="#DOC.2.225.25">release</A></B>()
</DL></P>
<P><DL>
<DT><H3>Public Members</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A> <B><A HREF="#DOC.2.225.1">element_type</A></B>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Smart pointer for handling referenced counted objects</BLOCKQUOTE>
<DL>
<A NAME="element_type"></A>
<A NAME="DOC.2.225.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A> element_type</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ref_ptr"></A>
<A NAME="DOC.2.225.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ref_ptr()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ref_ptr"></A>
<A NAME="DOC.2.225.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ref_ptr(<!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="ImpostorSprite.html#DOC.2.90.25">t</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ref_ptr"></A>
<A NAME="DOC.2.225.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ref_ptr(const <!1><A HREF="ref_ptr.html#DOC.2.225.4">ref_ptr</A>&amp; rp)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="~ref_ptr"></A>
<A NAME="DOC.2.225.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~ref_ptr()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.2.225.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; operator = (const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator = "></A>
<A NAME="DOC.2.225.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; operator = (<!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator == "></A>
<A NAME="DOC.2.225.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator != "></A>
<A NAME="DOC.2.225.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator < "></A>
<A NAME="DOC.2.225.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator > "></A>
<A NAME="DOC.2.225.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator > (const <!1><A HREF="ref_ptr.html">ref_ptr</A>&amp; rp) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator == "></A>
<A NAME="DOC.2.225.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator != "></A>
<A NAME="DOC.2.225.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator < "></A>
<A NAME="DOC.2.225.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator > "></A>
<A NAME="DOC.2.225.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator > (const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* <!1><A HREF="Vec4.html#DOC.2.217.8">ptr</A>) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator*"></A>
<A NAME="DOC.2.225.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>&amp; operator*()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator*"></A>
<A NAME="DOC.2.225.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>&amp; operator*() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator->"></A>
<A NAME="DOC.2.225.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* operator->()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator->"></A>
<A NAME="DOC.2.225.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* operator->() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator!"></A>
<A NAME="DOC.2.225.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator!() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="valid"></A>
<A NAME="DOC.2.225.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool valid() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="get"></A>
<A NAME="DOC.2.225.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* get()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="get"></A>
<A NAME="DOC.2.225.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* get() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="take"></A>
<A NAME="DOC.2.225.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* take()</B></TT>
<DD>take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0,
return the pointer to the object.
Note, do not use this unless you are 100% sure your code handles the deletion of the object correctly, and
only use when absolutely required.
<DL><DT><DD></DL><P>
<A NAME="release"></A>
<A NAME="DOC.2.225.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="TexGen.html#DOC.2.191.11.2">T</A>* release()</B></TT>
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>