Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 1f0b21aa88f3c2c3f7d3ecd7ad1b78e0 > files > 228

festival-speechtools-devel-1.2.96-16.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>template<class TYPE> class  EST_TBuffer</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_TBuffer.h:<TABLE BORDER=0><TR>
<TD VALIGN=TOP><H2>template&lt;class TYPE&gt; class  <A HREF="#DOC.DOCU">EST_TBuffer</A></H2></TD></H2></TD></TR></TABLE>
<BLOCKQUOTE>Extending buffer class.</BLOCKQUOTE>
<HR>

<DL>
<P><TABLE>
<DT><H3>Public Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TBuffer</B> (unsigned int <!1><A HREF="EST_String.html#DOC.75.10">size</A>=<!1><A HREF="TBUFFER_DEFAULT_SIZE.html">TBUFFER_DEFAULT_SIZE</A>, int step=<!1><A HREF="TBUFFER_DEFAULT_STEP.html">TBUFFER_DEFAULT_STEP</A>)<BR>
<I>Create with size and increment.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>~EST_TBuffer</B> (void)<BR>
<I>Destructor.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>unsigned int </TD><TD><B>length</B> (void) const <BR>
<I>Current available space</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set</B> (const TYPE &amp;set_to, int howmany=-1)<BR>
<I>Set to the given value.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Methods to make sure there is enough space. </B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.11.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>ensure</B> (unsigned int req_size)<BR>
<I>Extend if needed, copying existing data</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.11.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>ensure</B> (unsigned int req_size, bool <!1><A HREF="EST_TVector.html#DOC.15.1.7">copy</A>)<BR>
<I>Make sure there is enough space, copying if requested</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.11.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>ensure</B> (unsigned int req_size, const TYPE &amp;set_to, int howmany=-1)<BR>
<I>Make sure there is enough space, setting to a known value</I>
</TD></TR></TABLE></P>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Access to the memory itself. </B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.12.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>TYPE* </TD><TD><B>b</B> (void)<BR>
<I>Simple access as a pointer</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.12.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const TYPE* </TD><TD><B>b</B> (void) const <BR>
<I>Read-only access when the EST_TBuffer is a constant</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.101.5.12.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const TYPE&amp; </TD><TD><B>operator() </B> (unsigned int i) const <BR>
<I>operator () is simple access</I>
</TD></TR></TABLE></P>
</TD></TR></TABLE></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Extending buffer class.
&lt;p&gt;
This class provides the convinience of arrays which change in size
at run time rather more efficiantly than the full EST_TVector class
would.
&lt;p&gt;
Buffers can only be expanded and when a buffer is no longer needed
(i.e. when the variable goes out of scope) the memory is not deleted,
rather it is saved for re-use as a new buffer.
&lt;p&gt;
A typical use would be a buffer to hold a windowed section of a signal
inside a signal processing loop where the size of the window changes from
iteration to iteration.

<P></BLOCKQUOTE>
<DL>

<A NAME="EST_TBuffer"></A>
<A NAME="DOC.101.5.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TBuffer(unsigned int <!1><A HREF="EST_String.html#DOC.75.10">size</A>=<!1><A HREF="TBUFFER_DEFAULT_SIZE.html">TBUFFER_DEFAULT_SIZE</A>, int step=<!1><A HREF="TBUFFER_DEFAULT_STEP.html">TBUFFER_DEFAULT_STEP</A>)</B></TT>
<DD>Create with size and increment. 
Increment can be negative for percentage growth.
&lt;p&gt;
Tries to use a buffer from EST_old_buffers[] if there is one which
is suitable

<DL><DT><DT><B>See Also:</B><DD>EST_old_buffers<BR><DD></DL><P>
<A NAME="~EST_TBuffer"></A>
<A NAME="DOC.101.5.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~EST_TBuffer(void)</B></TT>
<DD>Destructor. Places the memory in EST_old_buffers[] for re-use if there is room.
<DL><DT><DD></DL><P>
<A NAME="length"></A>
<A NAME="DOC.101.5.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int length(void) const </B></TT>
<DD>Current available space
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.101.5.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set(const TYPE &amp;set_to, int howmany=-1)</B></TT>
<DD>Set to the given value. By default sets all values.
<DL><DT><DD></DL><P>
<A NAME="Methods to make sure there is enough space. "></A>
<A NAME="DOC.101.5.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Methods to make sure there is enough space. </B></TT>
<DL><DT><DD></DL><P><DL>

<A NAME="ensure"></A>
<A NAME="DOC.101.5.11.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void ensure(unsigned int req_size)</B></TT>
<DD>Extend if needed, copying existing data
<DL><DT><DD></DL><P>
<A NAME="ensure"></A>
<A NAME="DOC.101.5.11.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void ensure(unsigned int req_size, bool <!1><A HREF="EST_TVector.html#DOC.15.1.7">copy</A>)</B></TT>
<DD>Make sure there is enough space, copying if requested
<DL><DT><DD></DL><P>
<A NAME="ensure"></A>
<A NAME="DOC.101.5.11.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void ensure(unsigned int req_size, const TYPE &amp;set_to, int howmany=-1)</B></TT>
<DD>Make sure there is enough space, setting to a known value
<DL><DT><DD></DL><P></DL>

<A NAME="Access to the memory itself. "></A>
<A NAME="DOC.101.5.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Access to the memory itself. </B></TT>
<DL><DT><DD></DL><P><DL>

<A NAME="b"></A>
<A NAME="DOC.101.5.12.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>TYPE* b(void)</B></TT>
<DD>Simple access as a pointer
<DL><DT><DD></DL><P>
<A NAME="b"></A>
<A NAME="DOC.101.5.12.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const TYPE* b(void) const </B></TT>
<DD>Read-only access when the EST_TBuffer is a constant
<DL><DT><DD></DL><P>
<A NAME="operator() "></A>
<A NAME="DOC.101.5.12.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const TYPE&amp; operator() (unsigned int i) const </B></TT>
<DD>operator () is simple access
<DL><DT><DD></DL><P></DL>
</DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DT><B>See Also:</B><DD><!1><A HREF="EST_TBuffer.h.html">EST_TBuffer.h</A>, Associated definitions.
<BR><!1><A HREF="EST_TVector.html">EST_TVector</A>, class to use for more general uses.
<BR>lpc_analyse, example of use.<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>