<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>class EST_TrackMap</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_TrackMap.h:<TABLE BORDER=0><TR> <TD VALIGN=TOP><H2>class <A HREF="#DOC.DOCU">EST_TrackMap</A></H2></TD></H2></TD></TR></TABLE> <BLOCKQUOTE>Track maps provide a mapping from symbolic track names to the actual position of the information within a track frame.</BLOCKQUOTE> <HR> <H2>Inheritance:</H2> <APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65> <param name=classes value="CEST_Handleable,MEST_Handleable.html,CEST_TrackMap,MEST_TrackMap.html"> <param name=before value="M,M"> <param name=after value="Md_,M"> <param name=indent value="0,1"> <param name=arrowdir value="down"> </APPLET> <HR> <DL> <P><TABLE> <DT><H3>Public Classes</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.94.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>ChannelMapping</B> <BR> <I></I> <P><TABLE> <TR> <TD VALIGN=TOP><A HREF="#DOC.94.1.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>struct </TD><TD><B>ChannelMappingElement</B> <BR> <I>structure for the table</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.1.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Table of type to position pairs</B> <BR> <I></I> </TD></TR></TABLE></P> </TD></TR></TABLE></P> <P><TABLE> <DT><H3>Public Methods</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.94.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TrackMap</B> (void)<BR> <I>Default constructor</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TrackMap</B> (<!1><A HREF="EST_TrackMap.html#DOC.94.13">EST_TrackMap</A> &from, int refcount)<BR> <I>Copy the mapping</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TrackMap</B> (struct <!1><A HREF="EST_TrackMap.html#DOC.94.1.1">ChannelMappingElement</A> <!1><A HREF="EST_THash.html#DOC.91.3.15">map</A>[])<BR> <I>Create from static table</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>clear</B> (void)<BR> <I>Empty the map</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set</B> (<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>, short <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>)<BR> <I>Record the position of a channel</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>short </TD><TD><B>get</B> (<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const <BR> <I>Get the position of a channel</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>short </TD><TD><B>operator() </B> (<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const <BR> <I>Get the position of a channel</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool </TD><TD><B>has_channel</B> (<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const <BR> <I>Does the mapping contain a position for this channel?</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.20"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>short </TD><TD><B>last_channel</B> (void) const <BR> <I>Returns the index of the last known channel</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.21"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> </TD><TD><B>channel_type</B> (unsigned short <!1><A HREF="EST_Track.html#DOC.71.4.2">channel</A>) const <BR> <I>Returns the type of the channel at the given position</I> </TD></TR></TABLE></P> <P><TABLE> <DT><H3>Public</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.94.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>#define </TD><TD><B>NO_SUCH_CHANNEL</B> (-1)<BR> <I>Returned if we ask for a channel not in the map</I> </TD></TR></TABLE></P> <P><TABLE> <DT><H3>Protected Methods</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.94.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TrackMap</B> (int refcount)<BR> <I>Creation function used by friends to create refcounted maps</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TrackMap</B> (const <!1><A HREF="EST_TrackMap.html#DOC.94.9">EST_TrackMap</A>* <!1><A HREF="parent.html">parent</A>, int offset, int refcount)<BR> <I>Creation function used by friends to create sub-trak maps</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy</B> (<!1><A HREF="EST_TrackMap.html">EST_TrackMap</A> &from)<BR> <I>copy an exiting map</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.94.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>init</B> (void)<BR> <I>Initialise the map</I> </TD></TR></TABLE></P> <P><TABLE> <DT><H3>Protected</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.94.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>#define </TD><TD><B>EST_TM_REFCOUNTED</B> (1)<BR> <I>Pass to creation function to turn on refcounting</I> </TD></TR></TABLE></P> </DL> <HR><H3>Inherited from <A HREF="EST_Handleable.html">EST_Handleable</A>:</H3> <DL> </DL> <A NAME="DOC.DOCU"></A> <HR> <H2>Documentation</H2> <BLOCKQUOTE>Track maps provide a mapping from symbolic track names to the actual position of the information within a track frame. The symbolic names are defined by the EST_ChannelType enumerated type. <P>Track maps can be declared statically by code which always uses tracks of a given style, or they can be built at run time as is done by lpc_analysis to record whichinformation the user has requested. Finally they can be constructed by the Track itself from the names of the channels, for instance when a track has just been read in from a file. <P></BLOCKQUOTE> <DL> <A NAME="ChannelMapping"></A> <A NAME="DOC.94.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ChannelMapping</B></TT> <DD>An auxiliary type used just to define static EST_TrackMaps. Defining one of these and then converting it to an EST_TrackMap is, unfortunatly, the only way C++ allows to define a constant EST_TrackMap. <DL><DT><DD></DL><P><DL> <A NAME="ChannelMappingElement"></A> <A NAME="DOC.94.1.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>struct ChannelMappingElement</B></TT> <DD>structure for the table <DL><DT><DD></DL><P> <A NAME="Table of type to position pairs"></A> <A NAME="DOC.94.1.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Table of type to position pairs</B></TT> <DD>Table of type to position pairs <DL><DT><DD></DL><P></DL> <A NAME="NO_SUCH_CHANNEL"></A> <A NAME="DOC.94.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>#define NO_SUCH_CHANNEL(-1)</B></TT> <DD>Returned if we ask for a channel not in the map <DL><DT><DD></DL><P> <A NAME="EST_TM_REFCOUNTED"></A> <A NAME="DOC.94.7"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>#define EST_TM_REFCOUNTED(1)</B></TT> <DD>Pass to creation function to turn on refcounting <DL><DT><DD></DL><P> <A NAME="EST_TrackMap"></A> <A NAME="DOC.94.8"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TrackMap(int refcount)</B></TT> <DD>Creation function used by friends to create refcounted maps <DL><DT><DD></DL><P> <A NAME="EST_TrackMap"></A> <A NAME="DOC.94.9"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TrackMap(const <!1><A HREF="EST_TrackMap.html#DOC.94.9">EST_TrackMap</A>* <!1><A HREF="parent.html">parent</A>, int offset, int refcount)</B></TT> <DD>Creation function used by friends to create sub-trak maps <DL><DT><DD></DL><P> <A NAME="copy"></A> <A NAME="DOC.94.10"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy(<!1><A HREF="EST_TrackMap.html">EST_TrackMap</A> &from)</B></TT> <DD>copy an exiting map <DL><DT><DD></DL><P> <A NAME="init"></A> <A NAME="DOC.94.11"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void init(void)</B></TT> <DD>Initialise the map <DL><DT><DD></DL><P> <A NAME="EST_TrackMap"></A> <A NAME="DOC.94.12"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TrackMap(void)</B></TT> <DD>Default constructor <DL><DT><DD></DL><P> <A NAME="EST_TrackMap"></A> <A NAME="DOC.94.13"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TrackMap(<!1><A HREF="EST_TrackMap.html#DOC.94.13">EST_TrackMap</A> &from, int refcount)</B></TT> <DD>Copy the mapping <DL><DT><DD></DL><P> <A NAME="EST_TrackMap"></A> <A NAME="DOC.94.14"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TrackMap(struct <!1><A HREF="EST_TrackMap.html#DOC.94.1.1">ChannelMappingElement</A> <!1><A HREF="EST_THash.html#DOC.91.3.15">map</A>[])</B></TT> <DD>Create from static table <DL><DT><DD></DL><P> <A NAME="clear"></A> <A NAME="DOC.94.15"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void clear(void)</B></TT> <DD>Empty the map <DL><DT><DD></DL><P> <A NAME="set"></A> <A NAME="DOC.94.16"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set(<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>, short <!1><A HREF="EST_TIterator.html#DOC.128.2">pos</A>)</B></TT> <DD>Record the position of a channel <DL><DT><DD></DL><P> <A NAME="get"></A> <A NAME="DOC.94.17"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>short get(<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const </B></TT> <DD>Get the position of a channel <DL><DT><DD></DL><P> <A NAME="operator() "></A> <A NAME="DOC.94.18"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>short operator() (<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const </B></TT> <DD>Get the position of a channel <DL><DT><DD></DL><P> <A NAME="has_channel"></A> <A NAME="DOC.94.19"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool has_channel(<!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <!1><A HREF="EST_Val.html#DOC.102.2.1">type</A>) const </B></TT> <DD>Does the mapping contain a position for this channel? <DL><DT><DD></DL><P> <A NAME="last_channel"></A> <A NAME="DOC.94.20"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>short last_channel(void) const </B></TT> <DD>Returns the index of the last known channel <DL><DT><DD></DL><P> <A NAME="channel_type"></A> <A NAME="DOC.94.21"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> channel_type(unsigned short <!1><A HREF="EST_Track.html#DOC.71.4.2">channel</A>) const </B></TT> <DD>Returns the type of the channel at the given position <DL><DT><DD></DL><P></DL> <HR><DL><DT><B>This class has no child classes.</B></DL> <DL><DT><DT><B>Friends:</B><DD> class <!1><A HREF="EST_Track.html">EST_Track</A><BR> ostream& operator << (ostream &st, const <!1><A HREF="EST_TrackMap.html">EST_TrackMap</A> &m)<BR><DT><B>Author:</B><DD>Richard Caley <rjc@cstr.ed.ac.uk> <DT><B>Version:</B><DD><IMG BORDER=0 SRC=g000009.gif> <DT><B>See Also:</B><DD><!1><A HREF="EST_Track.html">EST_Track</A> <BR><!1><A HREF="EST_ChannelType.html">EST_ChannelType</A> <BR>EST_TrackMap: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>