<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>template<class BoxT, class ObjectT> class EST_THandle</TITLE> <META NAME="GENERATOR" CONTENT="DOC++ 3.4.6"> </HEAD> <body bgcolor="#ffffff" link="#0000ff" vlink="#dd0000" text="#000088" alink="9000ff"> <A HREF = "http://www.cstr.ed.ac.uk/"> <IMG align=left BORDER=0 SRC = "cstr.gif"></A> <A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html"> <IMG BORDER=0 ALIGN=right SRC="est.jpg" width=150 height=93></A> <br> <br clear=left> <p align=right> In file ../include/EST_THandle.h:<TABLE BORDER=0><TR> <TD VALIGN=TOP><H2>template<class BoxT, class ObjectT> class <A HREF="#DOC.DOCU">EST_THandle</A></H2></TD></H2></TD></TR></TABLE> <BLOCKQUOTE>A `smart' pointer which does reference counting.</BLOCKQUOTE> <A NAME="DOC.DOCU"></A> <HR> <H2>Documentation</H2> <BLOCKQUOTE>A `smart' pointer which does reference counting. <P>Behaves almost like a pointer as far as naive code is concerned, but keeps count of how many handles are holding on to the conents and deletes it when there are none. <P>You need to be careful there are no dumb C++ pointers to things which are being handled this way. <P>Things to be handled should implement the same interface as EST_Handleable (either by taking that as a superclass or by reimplementing it) and in addition define <TT>object_ptr()</TT>. See EST_TBox for an example. <P>There are two parameter types. In most cases the thing which contains the reference count and the data it represents will be the same object, but in the case of boxed values it may not be, so you can specify the type of both independently. <P></BLOCKQUOTE> <HR><DL><DT><B>This class has no child classes.</B></DL> <DL><DT><DT><B>Friends:</B><DD> int operator == (const <!1><A HREF="EST_THandle.html">EST_THandle</A>< BoxT, ObjectT > &<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, const <!1><A HREF="EST_THandle.html">EST_THandle</A>< BoxT, ObjectT > & <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>)<BR> int operator != (const <!1><A HREF="EST_THandle.html">EST_THandle</A>< BoxT, ObjectT > &<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, const <!1><A HREF="EST_THandle.html">EST_THandle</A>< BoxT, ObjectT > & <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>)<BR> ostream & operator << (ostream &s, const <!1><A HREF="EST_THandle.html">EST_THandle</A>< BoxT, ObjectT > &<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)<BR><DT><B>Author:</B><DD>Richard Caley <rjc@cstr.ed.ac.uk> <DT><B>Version:</B><DD><IMG BORDER=0 SRC=g000016.gif> <DT><B>See Also:</B><DD><!1><A HREF="EST_Handleable.html">EST_Handleable</A> <BR><!1><A HREF="EST_TBox.html">EST_TBox</A> <BR>EST_THandle:example <BR><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> <A HREF = "http://www.ed.ac.uk/"> <IMG align=right BORDER=0 SRC = "edcrest.gif"></A> <P Align=left><I>This page is part of the <A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html"> Edinburgh Speech Tools Library</A> documentation <br> Copyright <A HREF="http://www.ed.ac.uk"> University of Edinburgh</A> 1997 <br> Contact: <A HREF="mailto:speech_toolss@cstr.ed.ac.uk"> speech_tools@cstr.ed.ac.uk </a> </P> <br clear=right>