1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<HTML>
<HEAD>
<TITLE>class TranslatorFactory</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class TranslatorFactory</h1>
</TD>
<TD valign="top" align="right" colspan="1">An unidirectional data translator (codec). <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH colspan="2">Contains pure virtuals</TH></TR><TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::TranslatorFactory</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="yatephone_h.html">yatephone.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__GenObject.html">TelEngine::GenObject</A> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__TranslatorFactory.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>virtual <b><A HREF="#ref2">~TranslatorFactory</A></b> ()
</LI>
<LI>virtual void <b><A HREF="#ref3">removed</A></b> (const TranslatorFactory* factory)
</LI>
<LI>virtual DataTranslator* <b><i><A HREF="#ref4">create</A></i></b> (const DataFormat& sFormat, const DataFormat& dFormat)
</LI>
<LI>virtual const TranslatorCaps* <b><i><A HREF="#ref5">getCapabilities</A></i></b> () const
</LI>
<LI>virtual bool <b><A HREF="#ref6">converts</A></b> (const DataFormat& sFormat, const DataFormat& dFormat) const
</LI>
<LI>virtual unsigned int <b><A HREF="#ref7">length</A></b> () const
</LI>
<LI>virtual bool <b><A HREF="#ref8">intermediate</A></b> (const FormatInfo* info) const
</LI>
<LI>virtual const FormatInfo* <b><A HREF="#ref9">intermediate</A></b> () const
</LI>
</ul><h4>Protected Methods</h4><ul><LI>inline <b><A HREF="#ref1">TranslatorFactory</A></b> ()
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
A factory for constructing data translators by format name
conversion of data from one type to another
</p>
<A NAME="TranslatorFactory"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline <strong>TranslatorFactory</strong> ()
<br></td><td align="right"><h3><strong>TranslatorFactory</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
Constructor - registers the factory in the global list
</p>
<A NAME="~TranslatorFactory"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~TranslatorFactory</strong> ()
<br></td><td align="right"><h3><strong>~TranslatorFactory</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Destructor - unregisters from the global list
</p>
<A NAME="removed"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>removed</strong> (const TranslatorFactory* factory)
<br></td><td align="right"><h3><strong>removed</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Notification that another factory was removed from the list
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>factory</i></TD><TD align="left" valign="top">Pointer to the factory that just got removed
</TD></TR>
</TABLE></P>
<A NAME="create"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> DataTranslator* <i><strong>create</strong></i> (const DataFormat& sFormat, const DataFormat& dFormat)
<br></td><td align="right"><h3><i><strong>create</strong></i></h3></td></tr></table><p> <small>[pure virtual]</small></p><p>
Creates a translator given the source and destination format names
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>sFormat</i></TD><TD align="left" valign="top">Name of the source format (data received from the consumer)
</TD></TR>
<TR><TD align="left" valign="top"><i>dFormat</i></TD><TD align="left" valign="top">Name of the destination format (data supplied to the source)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A pointer to the end of a DataTranslator chain or NULL
</p>
<A NAME="getCapabilities"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const TranslatorCaps* <i><strong>getCapabilities</strong></i> ()
<br></td><td align="right"><h3><i><strong>getCapabilities</strong></i></h3></td></tr></table><p> <small>[const pure virtual]</small></p><p>
Get the capabilities table of this translator
</p>
<p><b>Returns</b>: A pointer to the first element of the capabilities table
</p>
<A NAME="converts"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>converts</strong> (const DataFormat& sFormat, const DataFormat& dFormat)
<br></td><td align="right"><h3><strong>converts</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Check if this factory can build a translator for given data formats
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>sFormat</i></TD><TD align="left" valign="top">Name of the source format
</TD></TR>
<TR><TD align="left" valign="top"><i>dFormat</i></TD><TD align="left" valign="top">Name of the destination format
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a conversion between formats is possible
</p>
<A NAME="length"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> unsigned int <strong>length</strong> ()
<br></td><td align="right"><h3><strong>length</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Get the length of the translator chain built by this factory
</p>
<p><b>Returns</b>: How many translators will build the factory
</p>
<A NAME="intermediate"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>intermediate</strong> (const FormatInfo* info)
<br></td><td align="right"><h3><strong>intermediate</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Check if a data format is used as intermediate in a translator chain
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>info</i></TD><TD align="left" valign="top">Format to check for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if the format is used internally as intermediate
</p>
<A NAME="intermediate"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const FormatInfo* <strong>intermediate</strong> ()
<br></td><td align="right"><h3><strong>intermediate</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Get the intermediate format used by a translator chain
</p>
<p><b>Returns</b>: Pointer to intermediate format or NULL
</p>
<HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|