<!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>misc.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.10 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>misc.h</h1><a href="misc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">// Copyright (C) 1999-2001 Open Source Telecom Corporation.</font> 00002 <font class="comment">// </font> 00003 <font class="comment">// This program is free software; you can redistribute it and/or modify</font> 00004 <font class="comment">// it under the terms of the GNU General Public License as published by</font> 00005 <font class="comment">// the Free Software Foundation; either version 2 of the License, or</font> 00006 <font class="comment">// (at your option) any later version.</font> 00007 <font class="comment">// </font> 00008 <font class="comment">// This program is distributed in the hope that it will be useful,</font> 00009 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font> 00010 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</font> 00011 <font class="comment">// GNU General Public License for more details.</font> 00012 <font class="comment">// </font> 00013 <font class="comment">// You should have received a copy of the GNU General Public License</font> 00014 <font class="comment">// along with this program; if not, write to the Free Software </font> 00015 <font class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</font> 00016 <font class="comment">// </font> 00017 <font class="comment">// As a special exception to the GNU General Public License, permission is </font> 00018 <font class="comment">// granted for additional uses of the text contained in its release </font> 00019 <font class="comment">// of Common C++.</font> 00020 <font class="comment">// </font> 00021 <font class="comment">// The exception is that, if you link the Common C++ library with other</font> 00022 <font class="comment">// files to produce an executable, this does not by itself cause the</font> 00023 <font class="comment">// resulting executable to be covered by the GNU General Public License.</font> 00024 <font class="comment">// Your use of that executable is in no way restricted on account of</font> 00025 <font class="comment">// linking the Common C++ library code into it.</font> 00026 <font class="comment">// </font> 00027 <font class="comment">// This exception does not however invalidate any other reasons why</font> 00028 <font class="comment">// the executable file might be covered by the GNU General Public License.</font> 00029 <font class="comment">// </font> 00030 <font class="comment">// This exception applies only to the code released under the </font> 00031 <font class="comment">// name Common C++. If you copy code from other releases into a copy of</font> 00032 <font class="comment">// Common C++, as the General Public License permits, the exception does</font> 00033 <font class="comment">// not apply to the code that you add in this way. To avoid misleading</font> 00034 <font class="comment">// anyone as to the status of such modified files, you must delete</font> 00035 <font class="comment">// this exception notice from them.</font> 00036 <font class="comment">// </font> 00037 <font class="comment">// If you write modifications of your own for Common C++, it is your choice</font> 00038 <font class="comment">// whether to permit this exception to apply to your modifications.</font> 00039 <font class="comment">// If you do not wish that, delete this exception notice. </font> 00040 00041 <font class="preprocessor">#ifndef CCXX_MISC_H_</font> 00042 <font class="preprocessor"></font><font class="preprocessor">#define CCXX_MISC_H_</font> 00043 <font class="preprocessor"></font> 00044 <font class="preprocessor">#ifndef CCXX_CONFIG_H_</font> 00045 <font class="preprocessor"></font><font class="preprocessor">#include <cc++/config.h></font> 00046 <font class="preprocessor">#endif</font> 00047 <font class="preprocessor"></font> 00048 <font class="preprocessor">#ifndef CCXX_THREAD_H_</font> 00049 <font class="preprocessor"></font><font class="preprocessor">#include <<a class="code" href="thread_8h.html">cc++/thread.h</a>></font> 00050 <font class="preprocessor">#endif</font> 00051 <font class="preprocessor"></font> 00052 <font class="preprocessor">#include <fstream></font> 00053 <font class="preprocessor">#include <iostream></font> 00054 <a name="l00055"></a><a class="code" href="misc_8h.html#a0">00055</a> <font class="preprocessor">#define KEYDATA_INDEX_SIZE 97</font> <a name="l00056"></a><a class="code" href="misc_8h.html#a1">00056</a> <font class="preprocessor"></font><font class="preprocessor">#define KEYDATA_PAGER_SIZE 512</font> <a name="l00057"></a><a class="code" href="misc_8h.html#a2">00057</a> <font class="preprocessor"></font><font class="preprocessor">#define KEYDATA_PATH_SIZE 256</font> 00058 <font class="preprocessor"></font> 00059 <font class="preprocessor">#ifdef CCXX_NAMESPACES</font> 00060 <font class="preprocessor"></font><font class="keyword">namespace </font>ost { 00061 <font class="preprocessor">#endif</font> 00062 <font class="preprocessor"></font> 00063 <font class="preprocessor">#if defined(__GNUC__) || !defined(__hpux)</font> 00064 <font class="preprocessor"></font><font class="preprocessor">#pragma pack(1)</font> 00065 <font class="preprocessor"></font><font class="preprocessor">#endif</font> 00066 <font class="preprocessor"></font> <a name="l00067"></a><a class="code" href="structost_1_1__keyval.html">00067</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>_keyval 00068 { <a name="l00069"></a><a class="code" href="structost_1_1__keyval.html#m0">00069</a> <font class="keyword">struct </font>_keyval *next; <a name="l00070"></a><a class="code" href="structost_1_1__keyval.html#m1">00070</a> <font class="keywordtype">char</font> val[1]; 00071 } keyval_t; 00072 <a name="l00073"></a><a class="code" href="structost_1_1__keysym.html">00073</a> <font class="keyword">typedef</font> <font class="keyword">struct </font>_keysym 00074 { <a name="l00075"></a><a class="code" href="structost_1_1__keysym.html#m0">00075</a> <font class="keyword">struct </font>_keysym *next; <a name="l00076"></a><a class="code" href="structost_1_1__keysym.html#m1">00076</a> <font class="keyword">struct </font>_keyval *data; <a name="l00077"></a><a class="code" href="structost_1_1__keysym.html#m2">00077</a> <font class="keyword">const</font> <font class="keywordtype">char</font> **list; <a name="l00078"></a><a class="code" href="structost_1_1__keysym.html#m3">00078</a> <font class="keywordtype">short</font> count; <a name="l00079"></a><a class="code" href="structost_1_1__keysym.html#m4">00079</a> <font class="keywordtype">char</font> sym[1]; 00080 } keysym_t; 00081 <a name="l00082"></a><a class="code" href="structost_1_1_k_e_y_d_e_f.html">00082</a> <font class="keyword">typedef</font> <font class="keyword">struct</font> 00083 <font class="keyword"></font>{ <a name="l00084"></a><a class="code" href="structost_1_1_k_e_y_d_e_f.html#m0">00084</a> <font class="keywordtype">char</font> *keyword; <a name="l00085"></a><a class="code" href="structost_1_1_k_e_y_d_e_f.html#m1">00085</a> <font class="keywordtype">char</font> *value; 00086 } KEYDEF; 00087 00088 <font class="preprocessor">#if defined(__GNUC__) || !defined(__hpux)</font> 00089 <font class="preprocessor"></font><font class="preprocessor">#pragma pack()</font> 00090 <font class="preprocessor"></font><font class="preprocessor">#endif</font> 00091 <font class="preprocessor"></font> 00092 <font class="preprocessor">#ifdef WIN32</font> 00093 <font class="preprocessor"></font><font class="keyword">class </font>CCXX_CLASS_EXPORT MemPager; 00094 <font class="keyword">class </font>CCXX_CLASS_EXPORT SharedMemPager; 00095 <font class="preprocessor">#endif</font> 00096 <font class="preprocessor"></font> <a name="l00112"></a><a class="code" href="classost_1_1_mem_pager.html">00112</a> <font class="keyword">class </font>MemPager 00113 { 00114 <font class="keyword">private</font>: 00115 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> pagesize; 00116 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> pages; 00117 00118 <font class="keyword">struct </font>_page 00119 { 00120 <font class="keyword">struct </font>_page *next; 00121 <font class="keywordtype">int</font> used; 00122 } *page; 00123 00124 <font class="keyword">protected</font>: 00134 <font class="keyword">virtual</font> <font class="keywordtype">void</font>* <a class="code" href="classost_1_1_mem_pager.html#b0">first</a>(size_t size); 00135 00143 <font class="keyword">virtual</font> <font class="keywordtype">void</font>* <a class="code" href="classost_1_1_mem_pager.html#b1">alloc</a>(size_t size); 00144 00154 <font class="keywordtype">char</font>* <a class="code" href="classost_1_1_mem_pager.html#b0">first</a>(<font class="keywordtype">char</font> *str); 00155 00165 <font class="keywordtype">char</font>* <a class="code" href="classost_1_1_mem_pager.html#b1">alloc</a>(<font class="keywordtype">char</font> *str); 00166 00176 <a class="code" href="classost_1_1_mem_pager.html#b4">MemPager</a>(<font class="keywordtype">int</font> pagesize = 4096); 00177 00181 <font class="keywordtype">void</font> <a class="code" href="classost_1_1_mem_pager.html#b5">purge</a>(<font class="keywordtype">void</font>); 00182 00186 <font class="keyword">virtual</font> <a class="code" href="classost_1_1_mem_pager.html#b6">~MemPager</a>(); 00187 00188 <font class="keyword">public</font>: <a name="l00195"></a><a class="code" href="classost_1_1_mem_pager.html#a0">00195</a> <font class="keyword">inline</font> <font class="keywordtype">int</font> <a class="code" href="classost_1_1_mem_pager.html#a0">getPages</a>(<font class="keywordtype">void</font>)<font class="keyword"></font> 00196 <font class="keyword"> </font>{<font class="keywordflow">return</font> pages;}; 00197 }; 00198 <a name="l00207"></a><a class="code" href="classost_1_1_shared_mem_pager.html">00207</a> <font class="keyword">class </font>SharedMemPager : <font class="keyword">public</font> MemPager, <font class="keyword">public</font> Mutex 00208 { 00209 <font class="keyword">protected</font>: 00215 <a class="code" href="classost_1_1_shared_mem_pager.html#b0">SharedMemPager</a>(<font class="keywordtype">int</font> pg = 4096); 00216 00220 <font class="keywordtype">void</font> <a class="code" href="classost_1_1_shared_mem_pager.html#b1">purge</a>(<font class="keywordtype">void</font>); 00221 00228 <font class="keywordtype">void</font>* <a class="code" href="classost_1_1_shared_mem_pager.html#b2">first</a>(size_t size); 00229 00236 <font class="keywordtype">void</font>* <a class="code" href="classost_1_1_shared_mem_pager.html#b3">alloc</a>(size_t size); 00237 }; 00238 <a name="l00306"></a><a class="code" href="classost_1_1_keydata.html">00306</a> <font class="keyword">class </font>Keydata : <font class="keyword">protected</font> MemPager 00307 { 00308 <font class="keyword">private</font>: 00309 <font class="keyword">static</font> std::ifstream cfgFile; 00310 <font class="keyword">static</font> <font class="keywordtype">char</font> lastpath[KEYDATA_PATH_SIZE + 1]; 00311 <font class="keyword">static</font> <font class="keywordtype">int</font> count, sequence; 00312 00313 <font class="keywordtype">int</font> link; 00314 00315 keysym_t *keys[KEYDATA_INDEX_SIZE]; 00316 00323 <font class="keywordtype">unsigned</font> <a class="code" href="classost_1_1_keydata.html#a7">getIndex</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00324 00325 <font class="keyword">protected</font>: 00326 CCXX_MEMBER_EXPORT(keysym_t*) <a class="code" href="classost_1_1_keydata.html#b0">getSymbol</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym, <font class="keywordtype">bool</font> create); 00327 00339 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#b1">Load</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *keypath, 00340 <font class="keyword">const</font> <font class="keywordtype">char</font> *environment = <font class="stringliteral">"CONFIG_KEYDATA"</font>); 00341 00354 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#b2">LoadPrefix</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *prefix, 00355 <font class="keyword">const</font> <font class="keywordtype">char</font> *keypath, <font class="keyword">const</font> <font class="keywordtype">char</font> *environment = <font class="stringliteral">"CONFIG_KEYDATA"</font>); 00356 00365 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#b1">Load</a>(KEYDEF *pairs); 00366 00367 <font class="keyword">public</font>: 00371 CCXX_MEMBER_EXPORT(CCXX_EMPTY) <a class="code" href="classost_1_1_keydata.html#a0">Keydata</a>(); 00372 00379 CCXX_MEMBER_EXPORT(CCXX_EMPTY) <a class="code" href="classost_1_1_keydata.html#a0">Keydata</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *keypath, <font class="keyword">const</font> <font class="keywordtype">char</font> *environment=<font class="stringliteral">"CONFIG_KEYDATA"</font>); 00380 00386 CCXX_MEMBER_EXPORT(<font class="keyword">virtual</font>) <a class="code" href="classost_1_1_keydata.html#a2">~Keydata</a>(); 00387 00395 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#a3">Unlink</a>(<font class="keywordtype">void</font>); 00396 00405 CCXX_MEMBER_EXPORT(<font class="keywordtype">int</font>) <a class="code" href="classost_1_1_keydata.html#a4">getCount</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00406 00414 CCXX_MEMBER_EXPORT(<font class="keyword">const</font> <font class="keywordtype">char</font>*) <a class="code" href="classost_1_1_keydata.html#a5">getFirst</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00415 00423 CCXX_MEMBER_EXPORT(<font class="keyword">const</font> <font class="keywordtype">char</font>*) <a class="code" href="classost_1_1_keydata.html#a6">getLast</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00424 00433 CCXX_MEMBER_EXPORT(<font class="keywordtype">int</font>) <a class="code" href="classost_1_1_keydata.html#a7">getIndex</a>(<font class="keywordtype">char</font> **data, <font class="keywordtype">int</font> max); 00434 00443 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#a8">setValue</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym, <font class="keyword">const</font> <font class="keywordtype">char</font> *data); 00444 00452 CCXX_MEMBER_EXPORT(<font class="keyword">const</font> <font class="keywordtype">char</font> * <font class="keyword">const</font>*) <a class="code" href="classost_1_1_keydata.html#a9">getList</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00453 00460 CCXX_MEMBER_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#a10">clrValue</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *sym); 00461 <a name="l00466"></a><a class="code" href="classost_1_1_keydata.html#a11">00466</a> <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="classost_1_1_keydata.html#a11">operator[]</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *keyword)<font class="keyword"></font> 00467 <font class="keyword"> </font>{<font class="keywordflow">return</font> <a class="code" href="classost_1_1_keydata.html#a6">getLast</a>(keyword);}; 00468 00473 <font class="keyword">friend</font> CCXX_EXPORT(<font class="keywordtype">void</font>) <a class="code" href="classost_1_1_keydata.html#l0">endKeydata</a>(<font class="keywordtype">void</font>); 00474 }; 00475 <a name="l00519"></a><a class="code" href="classost_1_1_string_tokenizer.html">00519</a> <font class="keyword">class </font>CCXX_CLASS_EXPORT StringTokenizer { 00520 <font class="keyword">public</font>: <a name="l00526"></a><a class="code" href="classost_1_1_string_tokenizer.html#p0">00526</a> <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">char</font> * <font class="keyword">const</font> SPACE; 00527 00537 <font class="comment">// maybe move more global ?</font> <a name="l00538"></a><a class="code" href="classost_1_1_string_tokenizer_1_1_no_such_element_exception.html">00538</a> <font class="keyword">class </font>NoSuchElementException { }; 00539 <a name="l00544"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html">00544</a> <font class="keyword">class </font>CCXX_CLASS_EXPORT iterator { <a name="l00545"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#l0">00545</a> <font class="keyword">friend</font> <font class="keyword">class </font>StringTokenizer; <font class="comment">// access our private constructors</font> 00546 <font class="keyword">private</font>: 00547 <font class="keyword">const</font> StringTokenizer *myTok; <font class="comment">// my StringTokenizer</font> 00548 <font class="keyword">const</font> <font class="keywordtype">char</font> *start; <font class="comment">// start of current token</font> 00549 <font class="keyword">const</font> <font class="keywordtype">char</font> *tokEnd; <font class="comment">// end of current token (->nxDelimiter)</font> 00550 <font class="keyword">const</font> <font class="keywordtype">char</font> *endp; <font class="comment">// one before next token</font> 00551 <font class="keywordtype">char</font> *token; <font class="comment">// allocated token, if requested</font> 00552 00553 <font class="comment">// for initialization of the itEnd iterator</font> 00554 <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a0">iterator</a>(<font class="keyword">const</font> StringTokenizer &tok, <font class="keyword">const</font> <font class="keywordtype">char</font> *end) 00555 : myTok(&tok),tokEnd(0),endp(end),token(0) {} 00556 00557 <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a0">iterator</a>(<font class="keyword">const</font> StringTokenizer &tok) 00558 : myTok(&tok),tokEnd(0),endp(myTok->str-1),token(0) { 00559 ++(*this); <font class="comment">// init first token.</font> 00560 } 00561 <font class="keyword">public</font>: <a name="l00562"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a0">00562</a> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a0">iterator</a>() : myTok(0),start(0),tokEnd(0),endp(0),token(0) {} 00563 00564 <font class="comment">// see also: comment in implementation of operator++</font> <a name="l00565"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a1">00565</a> <font class="keyword">virtual</font> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a1">~iterator</a>()<font class="keyword"> </font>{ <font class="keywordflow">if</font> (token) *token=<font class="charliteral">'\0'</font>; <font class="keyword">delete</font> token; } 00566 00570 <font class="comment">// everything, but not responsible for the allocated token.</font> <a name="l00571"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a2">00571</a> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a0">iterator</a>(<font class="keyword">const</font> iterator& i) : 00572 myTok(i.myTok),start(i.start),tokEnd(i.tokEnd), 00573 endp(i.endp),token(0) {} 00574 00578 <font class="comment">// everything, but not responsible for the allocated token.</font> <a name="l00579"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a3">00579</a> iterator &<a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a3">operator = </a>(<font class="keyword">const</font> iterator &i)<font class="keyword"> </font>{ 00580 myTok = i.myTok; 00581 start = i.start; endp = i.endp; tokEnd = i.tokEnd; 00582 token = 0; 00583 <font class="keywordflow">return</font> *<font class="keyword">this</font>; 00584 } 00585 00589 iterator &<a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a4">operator ++ </a>() THROWS (NoSuchElementException); 00590 00599 <font class="keyword">const</font> <font class="keywordtype">char</font>* <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a5">operator * </a>() THROWS (NoSuchElementException); 00600 <a name="l00607"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a6">00607</a> <font class="keyword">inline</font> <font class="keywordtype">char</font> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a6">nextDelimiter</a>()<font class="keyword"> const </font>{ 00608 <font class="keywordflow">return</font> (tokEnd) ? *tokEnd : <font class="charliteral">'\0'</font>; 00609 } 00610 00615 <font class="comment">// only compare the end-position. speed.</font> <a name="l00616"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a7">00616</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a7">operator == </a>(<font class="keyword">const</font> iterator &other)<font class="keyword"> const </font>{ 00617 <font class="keywordflow">return</font> (endp == other.endp); 00618 } 00619 00624 <font class="comment">// only compare the end position. speed.</font> <a name="l00625"></a><a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a8">00625</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classost_1_1_string_tokenizer_1_1iterator.html#a8">operator != </a>(<font class="keyword">const</font> iterator &other)<font class="keyword"> const </font>{ 00626 <font class="keywordflow">return</font> (endp != other.endp); 00627 } 00628 }; 00629 <font class="keyword">private</font>: 00630 <font class="keyword">friend</font> <font class="keyword">class </font>StringTokenizer::iterator; 00631 const char *str; 00632 const char *delim; 00633 bool skipAll, trim; 00634 iterator itEnd; 00635 00636 <font class="keyword">public</font>: 00675 StringTokenizer (const char *str, 00676 const char *delim, 00677 bool skipAllDelim = false, 00678 bool trim = false); 00679 00689 StringTokenizer (const char *s); 00690 <a name="l00694"></a><a class="code" href="classost_1_1_string_tokenizer.html#a2">00694</a> iterator begin() const { 00695 <font class="keywordflow">return</font> iterator(*<font class="keyword">this</font>); 00696 } 00697 <a name="l00702"></a><a class="code" href="classost_1_1_string_tokenizer.html#a3">00702</a> <font class="keywordtype">void</font> <a class="code" href="classost_1_1_string_tokenizer.html#a3">setDelimiters</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *d)<font class="keyword"> </font>{ 00703 delim = d; 00704 } 00705 <a name="l00710"></a><a class="code" href="classost_1_1_string_tokenizer.html#a4">00710</a> iterator <a class="code" href="classost_1_1_string_tokenizer.html#a2">begin</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *d)<font class="keyword"> </font>{ 00711 delim = d; 00712 <font class="keywordflow">return</font> iterator(*<font class="keyword">this</font>); 00713 } 00714 <a name="l00718"></a><a class="code" href="classost_1_1_string_tokenizer.html#a5">00718</a> <font class="keyword">const</font> iterator& <a class="code" href="classost_1_1_string_tokenizer.html#a5">end</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> itEnd; } 00719 }; 00720 00721 <font class="preprocessor">#ifdef CCXX_NAMESPACES</font> 00722 <font class="preprocessor"></font>}; 00723 <font class="preprocessor">#endif</font> 00724 <font class="preprocessor"></font> 00725 <font class="preprocessor">#endif</font> 00726 <font class="preprocessor"></font> </pre></div><hr><address><small>Generated at Fri Jan 4 18:51:45 2002 for CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>