blob: 0cd4a372f897e6478063b25f95cf6613c2cce555 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FTGL: FTCharToGlyphIndexMap class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>FTCharToGlyphIndexMap Class Reference</h1><code>#include &lt;<a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Provides a non-STL alternative to the STL map&lt;unsigned long, unsigned long&gt; which maps character codes to glyph indices inside <a class="el" href="classFTCharmap.html">FTCharmap</a>.
<p>
Implementation:<ul>
<li>NumberOfBuckets buckets are considered.</li><li>Each bucket has BucketSize entries.</li><li>When the glyph index for the character code C has to be stored, the bucket this character belongs to is found using 'C div BucketSize'. If this bucket has not been allocated yet, do it now. The entry in the bucked is found using 'C mod BucketSize'. If it is set to IndexNotFound, then the glyph entry has not been set.</li><li>Try to mimic the calls made to the STL map API.</li></ul>
<p>
Caveats:<ul>
<li>The glyph index is now a signed long instead of unsigned long, so the special value IndexNotFound (= -1) can be used to specify that the glyph index has not been stored yet. </li></ul>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00027">27</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#w0">CharacterCode</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef signed long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#w1">GlyphIndex</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="classFTCharToGlyphIndexMap.html#w5w2">NumberOfBuckets</a> = 256,
<a class="el" href="classFTCharToGlyphIndexMap.html#w5w3">BucketSize</a> = 256,
<a class="el" href="classFTCharToGlyphIndexMap.html#w5w4">IndexNotFound</a> = -1
}</td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#a0">FTCharToGlyphIndexMap</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#a1">~FTCharToGlyphIndexMap</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#a2">clear</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classFTCharToGlyphIndexMap.html#w1">GlyphIndex</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#a3">find</a> (<a class="el" href="classFTCharToGlyphIndexMap.html#w0">CharacterCode</a> c)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classFTCharToGlyphIndexMap.html#a4">insert</a> (<a class="el" href="classFTCharToGlyphIndexMap.html#w0">CharacterCode</a> c, <a class="el" href="classFTCharToGlyphIndexMap.html#w1">GlyphIndex</a> g)</td></tr>
</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="w0" doxytag="FTCharToGlyphIndexMap::CharacterCode" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef unsigned long <a class="el" href="classFTCharToGlyphIndexMap.html#w0">FTCharToGlyphIndexMap::CharacterCode</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00031">31</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.
<p>
Referenced by <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00074">find()</a>, and <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00098">insert()</a>. </td>
</tr>
</table>
<a class="anchor" name="w1" doxytag="FTCharToGlyphIndexMap::GlyphIndex" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> typedef signed long <a class="el" href="classFTCharToGlyphIndexMap.html#w1">FTCharToGlyphIndexMap::GlyphIndex</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00032">32</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.
<p>
Referenced by <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00074">find()</a>, and <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00098">insert()</a>. </td>
</tr>
</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="w5" doxytag="FTCharToGlyphIndexMap::@0" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> anonymous enum
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="w5w2" doxytag="NumberOfBuckets" ></a>NumberOfBuckets</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="w5w3" doxytag="BucketSize" ></a>BucketSize</em>&nbsp;</td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="w5w4" doxytag="IndexNotFound" ></a>IndexNotFound</em>&nbsp;</td><td>
</td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00034">34</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>. </td>
</tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="FTCharToGlyphIndexMap::FTCharToGlyphIndexMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> FTCharToGlyphIndexMap::FTCharToGlyphIndexMap </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00041">41</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="FTCharToGlyphIndexMap::~FTCharToGlyphIndexMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual FTCharToGlyphIndexMap::~<a class="el" href="classFTCharToGlyphIndexMap.html">FTCharToGlyphIndexMap</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00046">46</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="FTCharToGlyphIndexMap::clear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void FTCharToGlyphIndexMap::clear </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00059">59</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.
<p>
References <a class="el" href="classFTCharToGlyphIndexMap.html#w5w2">NumberOfBuckets</a>.
<p>
Referenced by <a class="el" href="FTCharmap_8cpp-source.html#l00024">FTCharmap::CharMap()</a>, and <a class="el" href="FTCharmap_8cpp-source.html#l00018">FTCharmap::~FTCharmap()</a>. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="FTCharToGlyphIndexMap::find" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="classFTCharToGlyphIndexMap.html#w1">GlyphIndex</a> FTCharToGlyphIndexMap::find </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classFTCharToGlyphIndexMap.html#w0">CharacterCode</a>&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>c</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00074">74</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.
<p>
References <a class="el" href="classFTCharToGlyphIndexMap.html#w5w3">BucketSize</a>, <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00031">CharacterCode</a>, <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00032">GlyphIndex</a>, and <a class="el" href="classFTCharToGlyphIndexMap.html#w5w4">IndexNotFound</a>.
<p>
Referenced by <a class="el" href="FTCharmap_8cpp-source.html#l00047">FTCharmap::GlyphListIndex()</a>. </td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="FTCharToGlyphIndexMap::insert" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void FTCharToGlyphIndexMap::insert </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classFTCharToGlyphIndexMap.html#w0">CharacterCode</a>&nbsp;</td>
<td class="mdname" nowrap> <em>c</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="classFTCharToGlyphIndexMap.html#w1">GlyphIndex</a>&nbsp;</td>
<td class="mdname" nowrap> <em>g</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00098">98</a> of file <a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a>.
<p>
References <a class="el" href="classFTCharToGlyphIndexMap.html#w5w3">BucketSize</a>, <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00031">CharacterCode</a>, <a class="el" href="FTCharToGlyphIndexMap_8h-source.html#l00032">GlyphIndex</a>, <a class="el" href="classFTCharToGlyphIndexMap.html#w5w4">IndexNotFound</a>, and <a class="el" href="classFTCharToGlyphIndexMap.html#w5w2">NumberOfBuckets</a>.
<p>
Referenced by <a class="el" href="FTCharmap_8cpp-source.html#l00059">FTCharmap::InsertIndex()</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="FTCharToGlyphIndexMap_8h-source.html">FTCharToGlyphIndexMap.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sun Dec 5 22:24:06 2004 for FTGL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>