📄 contain_8h-source.html
字号:
00149 <span class="comment"> * Synchronisation.</span>00150 <span class="comment"> *</span>00151 <span class="comment"> * Revision 1.28 1994/07/25 03:33:50 robertj</span>00152 <span class="comment"> * Extra memory tests.</span>00153 <span class="comment"> *</span>00154 <span class="comment"> * Revision 1.27 1994/07/17 10:46:06 robertj</span>00155 <span class="comment"> * Added functions to strings in containers.</span>00156 <span class="comment"> *</span>00157 <span class="comment"> * Revision 1.26 1994/07/02 03:03:49 robertj</span>00158 <span class="comment"> * Addition of container searching facilities.</span>00159 <span class="comment"> *</span>00160 <span class="comment"> * Revision 1.25 1994/06/25 11:55:15 robertj</span>00161 <span class="comment"> * Unix version synchronisation.</span>00162 <span class="comment"> *</span>00163 <span class="comment"> * Revision 1.24 1994/04/20 12:17:44 robertj</span>00164 <span class="comment"> * Added code to assert</span>00165 <span class="comment"> *</span>00166 <span class="comment"> * Revision 1.23 1994/04/11 14:17:27 robertj</span>00167 <span class="comment"> * Made standard operators new and delete only declared for GNU C++</span>00168 <span class="comment"> *</span>00169 <span class="comment"> * Revision 1.22 1994/04/01 14:09:46 robertj</span>00170 <span class="comment"> * Removed PDECLARE_ABSTRACT_CONTAINER.</span>00171 <span class="comment"> * Added string stream class.</span>00172 <span class="comment"> * Added string containers.</span>00173 <span class="comment"> *</span>00174 <span class="comment"> * Revision 1.21 1994/03/07 07:38:19 robertj</span>00175 <span class="comment"> * Major enhancementsacross the board.</span>00176 <span class="comment"> *</span>00177 <span class="comment"> * Revision 1.20 1994/01/13 08:42:29 robertj</span>00178 <span class="comment"> * Fixed missing copy constuctor and assignment operator for PString.</span>00179 <span class="comment"> *</span>00180 <span class="comment"> * Revision 1.19 1994/01/13 05:33:41 robertj</span>00181 <span class="comment"> * Added contructor to get caseless string from ordinary string.</span>00182 <span class="comment"> *</span>00183 <span class="comment"> * Revision 1.18 1994/01/03 04:42:23 robertj</span>00184 <span class="comment"> * Mass changes to common container classes and interactors etc etc etc.</span>00185 <span class="comment"> *</span>00186 <span class="comment"> * Revision 1.17 1993/12/31 06:40:34 robertj</span>00187 <span class="comment"> * Made inlines optional for debugging purposes.</span>00188 <span class="comment"> * Added default to DeleteObjects() function.</span>00189 <span class="comment"> *</span>00190 <span class="comment"> * Revision 1.16 1993/12/24 04:20:52 robertj</span>00191 <span class="comment"> * Mac CFront port.</span>00192 <span class="comment"> *</span>00193 <span class="comment"> * Revision 1.15 1993/12/16 00:51:46 robertj</span>00194 <span class="comment"> * Made some container functions const.</span>00195 <span class="comment"> *</span>00196 <span class="comment"> * Revision 1.14 1993/12/15 21:10:10 robertj</span>00197 <span class="comment"> * Changes to fix inadequate reference system for containers.</span>00198 <span class="comment"> *</span>00199 <span class="comment"> * Revision 1.13 1993/12/14 18:44:56 robertj</span>00200 <span class="comment"> * Added RemoveAll() to collection classes.</span>00201 <span class="comment"> * Fixed incorrect destruction of objects in containers.</span>00202 <span class="comment"> *</span>00203 <span class="comment"> * Revision 1.12 1993/12/04 05:23:58 robertj</span>00204 <span class="comment"> * Added more string functions</span>00205 <span class="comment"> *</span>00206 <span class="comment"> * Revision 1.11 1993/09/27 16:35:25 robertj</span>00207 <span class="comment"> * Fixed bug in sorted lists.</span>00208 <span class="comment"> * Changed simple function for array of strings to a constructor.</span>00209 <span class="comment"> * Capitalised all macros.</span>00210 <span class="comment"> *</span>00211 <span class="comment"> * Revision 1.10 1993/08/27 18:17:47 robertj</span>00212 <span class="comment"> * Fixed bug with default number of elements in a collection.</span>00213 <span class="comment"> * Added missing Compare function to PAbstractSortedList</span>00214 <span class="comment"> * Added inline keywords for CFront compatibility.</span>00215 <span class="comment"> *</span>00216 <span class="comment"> * Revision 1.9 1993/08/21 01:50:33 robertj</span>00217 <span class="comment"> * Made Clone() function optional, default will assert if called.</span>00218 <span class="comment"> *</span>00219 <span class="comment"> * Revision 1.8 1993/08/19 18:00:32 robertj</span>00220 <span class="comment"> * Added two more standard base array classes</span>00221 <span class="comment"> *</span>00222 <span class="comment"> * Revision 1.7 1993/08/01 14:05:27 robertj</span>00223 <span class="comment"> * Added const to ToLower() and ToUpper() in the PString class.</span>00224 <span class="comment"> *</span>00225 <span class="comment"> * Revision 1.6 1993/07/16 14:40:55 robertj</span>00226 <span class="comment"> * Added PString constructor for individual characters.</span>00227 <span class="comment"> * Added string to C style literal format.</span>00228 <span class="comment"> *</span>00229 <span class="comment"> * Revision 1.5 1993/07/15 05:02:57 robertj</span>00230 <span class="comment"> * Removed redundant word in PString enum for string types.</span>00231 <span class="comment"> *</span>00232 <span class="comment"> * Revision 1.4 1993/07/15 04:23:39 robertj</span>00233 <span class="comment"> * Added constructor to PString to allow conversion from other string formats.</span>00234 <span class="comment"> * Fixed problem with variable parameter lists in sprintf() functions.</span>00235 <span class="comment"> *</span>00236 <span class="comment"> * Revision 1.3 1993/07/14 12:49:16 robertj</span>00237 <span class="comment"> * Fixed RCS keywords.</span>00238 <span class="comment"> *</span>00239 <span class="comment"> */</span>00240 00241 <span class="preprocessor">#ifndef _CONTAIN_H</span>00242 <span class="preprocessor"></span><span class="preprocessor">#define _CONTAIN_H</span>00243 <span class="preprocessor"></span>00244 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00245 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00246 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00247 <span class="preprocessor"></span>00248 <span class="preprocessor">#include <<a class="code" href="object_8h.html">ptlib/object.h</a>></span>00249 <span class="preprocessor">#include <<a class="code" href="critsec_8h.html">ptlib/critsec.h</a>></span>00250 00252 <span class="comment">// Abstract container class</span>00253 <a name="l00276"></a><a class="code" href="classPContainer.html">00276</a> <span class="keyword">class </span><a class="code" href="classPContainer.html">PContainer</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00277 {00278 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPContainer.html">PContainer</a>, <a class="code" href="classPObject.html">PObject</a>);00279 00280 <span class="keyword">public</span>:00285 <a class="code" href="classPContainer.html#z67_0">PContainer</a>(00286 PINDEX initialSize = 0 00287 );00288 00293 <a class="code" href="classPContainer.html#z67_0">PContainer</a>(00294 <span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> & cont 00295 );00296 00304 <a class="code" href="classPContainer.html">PContainer</a> & <a class="code" href="classPContainer.html#z67_2">operator=</a>(00305 <span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> & cont 00306 );00307 <a name="l00312"></a><a class="code" href="classPContainer.html#z67_3">00312</a> <span class="keyword">virtual</span> <a class="code" href="classPContainer.html#z67_3">~PContainer</a>()00313 { <a class="code" href="classPContainer.html#b5">Destruct</a>(); }00314 00316 00325 <span class="keyword">virtual</span> PINDEX <a class="code" href="classPContainer.html#z69_0">GetSize</a>() <span class="keyword">const</span>;00326 00340 <span class="keyword">virtual</span> BOOL <a class="code" href="classPContainer.html#z69_1">SetSize</a>(00341 PINDEX newSize 00342 ) = 0;00343 00349 BOOL <a class="code" href="classPContainer.html#z69_2">SetMinSize</a>(00350 PINDEX minSize 00351 );00352 00359 <span class="keyword">virtual</span> BOOL <a class="code" href="classPContainer.html#z69_3">IsEmpty</a>() <span class="keyword">const</span>;00360 00367 BOOL <a class="code" href="classPContainer.html#z69_4">IsUnique</a>() <span class="keyword">const</span>;00368 00377 <span class="keyword">virtual</span> BOOL <a class="code" href="classPContainer.html#z69_5">MakeUnique</a>();00379 00380 <span class="keyword">protected</span>:00391 <a class="code" href="classPContainer.html#z67_0">PContainer</a>(00392 <span class="keywordtype">int</span> dummy, 00393 <span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> * cont 00394 );00395 00406 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPContainer.html#b1">DestroyContents</a>() = 0;00407 00417 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPContainer.html#b2">AssignContents</a>(<span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> & c);00418 00430 <span class="keywordtype">void</span> <a class="code" href="classPContainer.html#b3">CopyContents</a>(<span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> & c);00431 00448 <span class="keywordtype">void</span> <a class="code" href="classPContainer.html#b4">CloneContents</a>(<span class="keyword">const</span> <a class="code" href="classPContainer.html">PContainer</a> * src);00449 00453 <span class="keywordtype">void</span> <a class="code" href="classPContainer.html#b5">Destruct</a>();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -