⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dict_8h-source.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>dict.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>dict.h</h1><a href="dict_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * dict.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Dictionary (hash table) Container classes.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 1993-1998 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Portions are Copyright (C) 1993 Free Software Foundation, Inc.</span>00025 <span class="comment"> * All Rights Reserved.</span>00026 <span class="comment"> *</span>00027 <span class="comment"> * Contributor(s): ______________________________________.</span>00028 <span class="comment"> *</span>00029 <span class="comment"> * $Log: dict.h,v $</span>00030 <span class="comment"> * Revision 1.33  2004/04/09 03:42:34  csoutheren</span>00031 <span class="comment"> * Removed all usages of "virtual inline" and "inline virtual"</span>00032 <span class="comment"> *</span>00033 <span class="comment"> * Revision 1.32  2004/04/03 23:53:09  csoutheren</span>00034 <span class="comment"> * Added various changes to improce compatibility with the Sun Forte compiler</span>00035 <span class="comment"> *   Thanks to Brian Cameron</span>00036 <span class="comment"> * Added detection of readdir_r version</span>00037 <span class="comment"> *</span>00038 <span class="comment"> * Revision 1.31  2003/09/17 01:18:02  csoutheren</span>00039 <span class="comment"> * Removed recursive include file system and removed all references</span>00040 <span class="comment"> * to deprecated coooperative threading support</span>00041 <span class="comment"> *</span>00042 <span class="comment"> * Revision 1.30  2003/03/31 01:23:56  robertj</span>00043 <span class="comment"> * Added ReadFrom functions for standard container classes such as</span>00044 <span class="comment"> *   PIntArray and PStringList etc</span>00045 <span class="comment"> *</span>00046 <span class="comment"> * Revision 1.29  2002/10/04 01:47:29  robertj</span>00047 <span class="comment"> * Added various increment and decrement operators to POrdinalKey.</span>00048 <span class="comment"> *</span>00049 <span class="comment"> * Revision 1.28  2002/09/16 01:08:59  robertj</span>00050 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00051 <span class="comment"> *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00052 <span class="comment"> *</span>00053 <span class="comment"> * Revision 1.27  2002/06/14 13:22:12  robertj</span>00054 <span class="comment"> * Fixed ability to remove elements from a PSet by value.</span>00055 <span class="comment"> * Added by value add and remove functions to a PSet.</span>00056 <span class="comment"> * Added a POrdinalSet class.</span>00057 <span class="comment"> * Fixed some documentation.</span>00058 <span class="comment"> *</span>00059 <span class="comment"> * Revision 1.26  2002/02/06 00:53:25  robertj</span>00060 <span class="comment"> * Fixed missing const on PSet::Contains and operator[], thanks Francisco Olarte Sanz</span>00061 <span class="comment"> *</span>00062 <span class="comment"> * Revision 1.25  1999/11/30 00:22:54  robertj</span>00063 <span class="comment"> * Updated documentation for doc++</span>00064 <span class="comment"> *</span>00065 <span class="comment"> * Revision 1.24  1999/08/22 12:13:43  robertj</span>00066 <span class="comment"> * Fixed warning when using inlines on older GNU compiler</span>00067 <span class="comment"> *</span>00068 <span class="comment"> * Revision 1.23  1999/03/09 02:59:49  robertj</span>00069 <span class="comment"> * Changed comments to doc++ compatible documentation.</span>00070 <span class="comment"> *</span>00071 <span class="comment"> * Revision 1.22  1999/02/16 08:07:11  robertj</span>00072 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00073 <span class="comment"> *</span>00074 <span class="comment"> * Revision 1.21  1998/09/23 06:20:27  robertj</span>00075 <span class="comment"> * Added open source copyright license.</span>00076 <span class="comment"> *</span>00077 <span class="comment"> * Revision 1.20  1998/01/05 10:39:34  robertj</span>00078 <span class="comment"> * Fixed "typesafe" templates/macros for dictionaries, especially on GNU.</span>00079 <span class="comment"> *</span>00080 <span class="comment"> * Revision 1.19  1997/12/11 10:27:16  robertj</span>00081 <span class="comment"> * Added type correct Contains() function to dictionaries.</span>00082 <span class="comment"> *</span>00083 <span class="comment"> * Revision 1.18  1997/07/08 13:15:05  robertj</span>00084 <span class="comment"> * DLL support.</span>00085 <span class="comment"> *</span>00086 <span class="comment"> * Revision 1.17  1997/06/08 04:49:11  robertj</span>00087 <span class="comment"> * Fixed non-template class descendent order.</span>00088 <span class="comment"> *</span>00089 <span class="comment"> * Revision 1.16  1996/08/17 10:00:22  robertj</span>00090 <span class="comment"> * Changes for Windows DLL support.</span>00091 <span class="comment"> *</span>00092 <span class="comment"> * Revision 1.15  1996/03/31 08:44:10  robertj</span>00093 <span class="comment"> * Added RemoveAt() function to remove entries from dictionaries.</span>00094 <span class="comment"> *</span>00095 <span class="comment"> * Revision 1.14  1996/02/08 11:50:01  robertj</span>00096 <span class="comment"> * Moved Contains function from PSet to PHashTable so available for dictionaries.</span>00097 <span class="comment"> * Added print for dictionaries key=data\n.</span>00098 <span class="comment"> * Added GetAt(PINDEX) to template classes to make identical to macro.</span>00099 <span class="comment"> *</span>00100 <span class="comment"> * Revision 1.13  1996/02/03 11:00:28  robertj</span>00101 <span class="comment"> * Temporary removal of SetAt() and GetAt() functions in dictionary macro.</span>00102 <span class="comment"> *</span>00103 <span class="comment"> * Revision 1.12  1996/01/24 14:43:11  robertj</span>00104 <span class="comment"> * Added initialisers to string dictionaries.</span>00105 <span class="comment"> *</span>00106 <span class="comment"> * Revision 1.11  1996/01/23 13:11:12  robertj</span>00107 <span class="comment"> * Mac Metrowerks compiler support.</span>00108 <span class="comment"> *</span>00109 <span class="comment"> * Revision 1.10  1995/06/17 11:12:29  robertj</span>00110 <span class="comment"> * Documentation update.</span>00111 <span class="comment"> *</span>00112 <span class="comment"> * Revision 1.9  1995/06/04 08:45:57  robertj</span>00113 <span class="comment"> * Better C++ compatibility (with BC++)</span>00114 <span class="comment"> *</span>00115 <span class="comment"> * Revision 1.8  1995/03/14 12:41:19  robertj</span>00116 <span class="comment"> * Updated documentation to use HTML codes.</span>00117 <span class="comment"> *</span>00118 <span class="comment"> * Revision 1.7  1995/02/22  10:50:29  robertj</span>00119 <span class="comment"> * Changes required for compiling release (optimised) version.</span>00120 <span class="comment"> *</span>00121 <span class="comment"> * Revision 1.6  1995/02/11  04:10:35  robertj</span>00122 <span class="comment"> * Fixed dictionary MACRO for templates.</span>00123 <span class="comment"> *</span>00124 <span class="comment"> * Revision 1.5  1995/02/05  00:48:03  robertj</span>00125 <span class="comment"> * Fixed template version.</span>00126 <span class="comment"> *</span>00127 <span class="comment"> * Revision 1.4  1995/01/09  12:35:31  robertj</span>00128 <span class="comment"> * Removed unnecesary return value from I/O functions.</span>00129 <span class="comment"> * Changes due to Mac port.</span>00130 <span class="comment"> *</span>00131 <span class="comment"> * Revision 1.3  1994/12/21  11:52:51  robertj</span>00132 <span class="comment"> * Documentation and variable normalisation.</span>00133 <span class="comment"> *</span>00134 <span class="comment"> * Revision 1.2  1994/12/17  01:36:57  robertj</span>00135 <span class="comment"> * Fixed memory leak in PStringSet</span>00136 <span class="comment"> *</span>00137 <span class="comment"> * Revision 1.1  1994/12/12  09:59:32  robertj</span>00138 <span class="comment"> * Initial revision</span>00139 <span class="comment"> *</span>00140 <span class="comment"> */</span>00141 00142 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00143 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00144 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00145 <span class="preprocessor"></span>00146 00148 <span class="comment">// PDictionary classes</span>00149 <a name="l00153"></a><a class="code" href="classPOrdinalKey.html">00153</a> <span class="keyword">class </span><a class="code" href="classPOrdinalKey.html">POrdinalKey</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00154 {00155   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPOrdinalKey.html">POrdinalKey</a>, <a class="code" href="classPObject.html">PObject</a>);00156 00157   <span class="keyword">public</span>:00162     <a class="code" href="object_8h.html#a2">PINLINE</a> <a class="code" href="classPOrdinalKey.html#z81_0">POrdinalKey</a>(00163       PINDEX newKey = 0   00164     );00165 00168     <a class="code" href="object_8h.html#a2">PINLINE</a> <a class="code" href="classPOrdinalKey.html">POrdinalKey</a> &amp; <a class="code" href="classPOrdinalKey.html#z81_1">operator=</a>(PINDEX);00170 00173 00174     <span class="keyword">virtual</span> <a class="code" href="classPObject.html">PObject</a> * <a class="code" href="classPOrdinalKey.html#z83_0">Clone</a>() <span class="keyword">const</span>;00175 00176     <span class="comment">/* Get the relative rank of the ordinal index. This is a simpel comparison</span>00177 <span class="comment">       of the objects PINDEX values.</span>00178 <span class="comment"></span>00179 <span class="comment">       @return</span>00180 <span class="comment">       comparison of the two objects, #EqualTo# for same,</span>00181 <span class="comment">       #LessThan# for #obj# logically less than the</span>00182 <span class="comment">       object and #GreaterThan# for #obj# logically</span>00183 <span class="comment">       greater than the object.</span>00184 <span class="comment">     */</span>00185     <span class="keyword">virtual</span> <a class="code" href="classPObject.html#z199_0">Comparison</a> <a class="code" href="classPOrdinalKey.html#z83_1">Compare</a>(<span class="keyword">const</span> <a class="code" href="classPObject.html">PObject</a> &amp; obj) <span class="keyword">const</span>;00186 00193     <span class="keyword">virtual</span> PINDEX <a class="code" href="classPOrdinalKey.html#z83_2">HashFunction</a>() <span class="keyword">const</span>;00194 00201     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPOrdinalKey.html#z83_3">PrintOn</a>(ostream &amp; strm) <span class="keyword">const</span>;00203 00208     <a class="code" href="object_8h.html#a2">PINLINE</a> <a class="code" href="classPOrdinalKey.html#z85_0">operator PINDEX</a>() <span class="keyword">const</span>;00209 00212     <a class="code" href="object_8h.html#a2">PINLINE</a> PINDEX <a class="code" href="classPOrdinalKey.html#z85_1">operator++</a>();00213 00216     <a class="code" href="object_8h.html#a2">PINLINE</a> PINDEX <a class="code" href="classPOrdinalKey.html#z85_1">operator++</a>(<span class="keywordtype">int</span>);00217 00220     <a class="code" href="object_8h.html#a2">PINLINE</a> PINDEX <a class="code" href="classPOrdinalKey.html#z85_3">operator--</a>();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -