<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>GNU CommonC++: misc.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>misc.h</h1><a href="misc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 1999-2005 Open Source Telecom Corporation.</span> <a name="l00002"></a>00002 <span class="comment">//</span> <a name="l00003"></a>00003 <span class="comment">// This program is free software; you can redistribute it and/or modify</span> <a name="l00004"></a>00004 <span class="comment">// it under the terms of the GNU General Public License as published by</span> <a name="l00005"></a>00005 <span class="comment">// the Free Software Foundation; either version 2 of the License, or</span> <a name="l00006"></a>00006 <span class="comment">// (at your option) any later version.</span> <a name="l00007"></a>00007 <span class="comment">//</span> <a name="l00008"></a>00008 <span class="comment">// This program is distributed in the hope that it will be useful,</span> <a name="l00009"></a>00009 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00010"></a>00010 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00011"></a>00011 <span class="comment">// GNU General Public License for more details.</span> <a name="l00012"></a>00012 <span class="comment">//</span> <a name="l00013"></a>00013 <span class="comment">// You should have received a copy of the GNU General Public License</span> <a name="l00014"></a>00014 <span class="comment">// along with this program; if not, write to the Free Software</span> <a name="l00015"></a>00015 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span> <a name="l00016"></a>00016 <span class="comment">//</span> <a name="l00017"></a>00017 <span class="comment">// As a special exception, you may use this file as part of a free software</span> <a name="l00018"></a>00018 <span class="comment">// library without restriction. Specifically, if other files instantiate</span> <a name="l00019"></a>00019 <span class="comment">// templates or use macros or inline functions from this file, or you compile</span> <a name="l00020"></a>00020 <span class="comment">// this file and link it with other files to produce an executable, this</span> <a name="l00021"></a>00021 <span class="comment">// file does not by itself cause the resulting executable to be covered by</span> <a name="l00022"></a>00022 <span class="comment">// the GNU General Public License. This exception does not however</span> <a name="l00023"></a>00023 <span class="comment">// invalidate any other reasons why the executable file might be covered by</span> <a name="l00024"></a>00024 <span class="comment">// the GNU General Public License.</span> <a name="l00025"></a>00025 <span class="comment">//</span> <a name="l00026"></a>00026 <span class="comment">// This exception applies only to the code released under the name GNU</span> <a name="l00027"></a>00027 <span class="comment">// Common C++. If you copy code from other releases into a copy of GNU</span> <a name="l00028"></a>00028 <span class="comment">// Common C++, as the General Public License permits, the exception does</span> <a name="l00029"></a>00029 <span class="comment">// not apply to the code that you add in this way. To avoid misleading</span> <a name="l00030"></a>00030 <span class="comment">// anyone as to the status of such modified files, you must delete</span> <a name="l00031"></a>00031 <span class="comment">// this exception notice from them.</span> <a name="l00032"></a>00032 <span class="comment">//</span> <a name="l00033"></a>00033 <span class="comment">// If you write modifications of your own for GNU Common C++, it is your choice</span> <a name="l00034"></a>00034 <span class="comment">// whether to permit this exception to apply to your modifications.</span> <a name="l00035"></a>00035 <span class="comment">// If you do not wish that, delete this exception notice.</span> <a name="l00036"></a>00036 <span class="comment">//</span> <a name="l00037"></a>00037 <a name="l00044"></a>00044 <span class="preprocessor">#ifndef CCXX_MISC_H_</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_MISC_H_</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00047"></a>00047 <span class="preprocessor">#ifndef CCXX_MISSING_H_</span> <a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="missing_8h.html" title="substitute functions which may be missing in target platform libc.">cc++/missing.h</a>></span> <a name="l00049"></a>00049 <span class="preprocessor">#endif</span> <a name="l00050"></a>00050 <span class="preprocessor"></span> <a name="l00051"></a>00051 <span class="preprocessor">#ifndef CCXX_THREAD_H_</span> <a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="thread_8h.html" title="Synchronization and threading services.">cc++/thread.h</a>></span> <a name="l00053"></a>00053 <span class="preprocessor">#endif</span> <a name="l00054"></a>00054 <span class="preprocessor"></span> <a name="l00055"></a><a class="code" href="misc_8h.html#a00b691e2cbad8d8e0934fb4e91d2beb7">00055</a> <span class="preprocessor">#define KEYDATA_INDEX_SIZE 97</span> <a name="l00056"></a><a class="code" href="misc_8h.html#aeb24e9d3f07ce81643e837de40bf5bd1">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define KEYDATA_PAGER_SIZE 512</span> <a name="l00057"></a>00057 <span class="preprocessor"></span> <a name="l00058"></a>00058 <span class="preprocessor">#if defined(PATH_MAX)</span> <a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#if PATH_MAX > 512</span> <a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define KEYDATA_PATH_SIZE 512</span> <a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define KEYDATA_PATH_SIZE PATH_MAX</span> <a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00065"></a><a class="code" href="misc_8h.html#abf74b99dcd8001dd04a37f346ba70422">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define KEYDATA_PATH_SIZE 256</span> <a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00067"></a>00067 <span class="preprocessor"></span> <a name="l00068"></a>00068 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00069"></a>00069 <span class="preprocessor"></span><span class="keyword">namespace </span>ost { <a name="l00070"></a>00070 <span class="preprocessor">#endif</span> <a name="l00071"></a>00071 <span class="preprocessor"></span> <a name="l00072"></a><a class="code" href="namespaceost.html#adba459b2b0da06fe5e0cbaf2349eaaa5">00072</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent...">Runlist</a>; <a name="l00073"></a><a class="code" href="namespaceost.html#acc2811f07b6cc7ea5d96a90fee539ed2">00073</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a>; <a name="l00074"></a>00074 <a name="l00090"></a><a class="code" href="classost_1_1_mem_pager.html">00090</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a> <a name="l00091"></a>00091 { <a name="l00092"></a>00092 <span class="keyword">private</span>: <a name="l00093"></a><a class="code" href="classost_1_1_mem_pager.html#a7fb804f7dc96dd9f705c84095f37f1ca">00093</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classost_1_1_string.html" title="This is a generic and portable string class.">String</a>; <a name="l00094"></a><a class="code" href="classost_1_1_mem_pager.html#ac5ec8bc6fca4e4e6a8faa45d4b0a9d58">00094</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classost_1_1_mem_pager_object.html" title="This class is used to create derived classes which are constructed within a memory...">MemPagerObject</a>; <a name="l00095"></a>00095 <a name="l00096"></a>00096 <span class="keywordtype">size_t</span> pagesize; <a name="l00097"></a>00097 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pages; <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="keyword">struct </span>_page { <a name="l00100"></a>00100 <span class="keyword">struct </span>_page *next; <a name="l00101"></a>00101 <span class="keywordtype">size_t</span> used; <a name="l00102"></a>00102 } *page; <a name="l00103"></a>00103 <a name="l00104"></a>00104 <span class="keyword">protected</span>: <a name="l00114"></a>00114 <span class="keyword">virtual</span> <span class="keywordtype">void</span>* first(<span class="keywordtype">size_t</span> size); <a name="l00115"></a>00115 <a name="l00123"></a>00123 <span class="keyword">virtual</span> <span class="keywordtype">void</span>* alloc(<span class="keywordtype">size_t</span> size); <a name="l00124"></a>00124 <a name="l00134"></a>00134 <span class="keywordtype">char</span>* first(<span class="keywordtype">char</span> *str); <a name="l00135"></a>00135 <a name="l00145"></a>00145 <span class="keywordtype">char</span>* alloc(<span class="keyword">const</span> <span class="keywordtype">char</span> *str); <a name="l00146"></a>00146 <a name="l00156"></a>00156 <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a>(<span class="keywordtype">size_t</span> pagesize = 4096); <a name="l00157"></a>00157 <a name="l00161"></a>00161 <span class="keywordtype">void</span> purge(<span class="keywordtype">void</span>); <a name="l00162"></a>00162 <a name="l00166"></a>00166 <span class="keywordtype">void</span> clean(<span class="keywordtype">void</span>); <a name="l00167"></a>00167 <a name="l00171"></a>00171 <span class="keyword">virtual</span> ~<a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a>(); <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="keyword">public</span>: <a name="l00180"></a><a class="code" href="classost_1_1_mem_pager.html#a320897ecfca3e92378c45ec70aee58ba">00180</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> getPages(<span class="keywordtype">void</span>) <a name="l00181"></a>00181 {<span class="keywordflow">return</span> pages;}; <a name="l00182"></a>00182 }; <a name="l00183"></a>00183 <a name="l00193"></a><a class="code" href="classost_1_1_stack_pager.html">00193</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_stack_pager.html" title="The StackPager provides a repository to stash and retrieve working data in last-in-first-out...">StackPager</a> : <span class="keyword">protected</span> <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a> <a name="l00194"></a>00194 { <a name="l00195"></a>00195 <span class="keyword">private</span>: <a name="l00196"></a>00196 <span class="keyword">typedef</span> <span class="keyword">struct </span>frame { <a name="l00197"></a>00197 <span class="keyword">struct </span>frame *next; <a name="l00198"></a>00198 <span class="keywordtype">char</span> data[1]; <a name="l00199"></a>00199 } frame_t; <a name="l00200"></a>00200 <a name="l00201"></a>00201 frame_t *stack; <a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="keyword">public</span>: <a name="l00209"></a>00209 <a class="code" href="classost_1_1_stack_pager.html" title="The StackPager provides a repository to stash and retrieve working data in last-in-first-out...">StackPager</a>(<span class="keywordtype">size_t</span> pagesize); <a name="l00210"></a>00210 <a name="l00218"></a>00218 <span class="keywordtype">void</span> *push(<span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keywordtype">object</span>, <span class="keywordtype">size_t</span> size); <a name="l00219"></a>00219 <a name="l00226"></a>00226 <span class="keywordtype">void</span> *push(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>); <a name="l00227"></a>00227 <a name="l00233"></a>00233 <span class="keywordtype">void</span> *pull(<span class="keywordtype">void</span>); <a name="l00234"></a>00234 <a name="l00238"></a>00238 <span class="keywordtype">void</span> purge(<span class="keywordtype">void</span>); <a name="l00239"></a>00239 }; <a name="l00240"></a>00240 <a name="l00249"></a><a class="code" href="classost_1_1_shared_mem_pager.html">00249</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_shared_mem_pager.html" title="The shared mempager uses a mutex to protect key access methods.">SharedMemPager</a> : <span class="keyword">public</span> <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a>, <span class="keyword">public</span> <a class="code" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only...">Mutex</a> <a name="l00250"></a>00250 { <a name="l00251"></a>00251 <span class="keyword">protected</span>: <a name="l00258"></a>00258 <a class="code" href="classost_1_1_shared_mem_pager.html" title="The shared mempager uses a mutex to protect key access methods.">SharedMemPager</a>(<span class="keywordtype">size_t</span> pagesize = 4096, <span class="keyword">const</span> <span class="keywordtype">char</span> *name = NULL); <a name="l00259"></a>00259 <a name="l00263"></a>00263 <span class="keywordtype">void</span> purge(<span class="keywordtype">void</span>); <a name="l00264"></a>00264 <a name="l00271"></a>00271 <span class="keywordtype">void</span>* first(<span class="keywordtype">size_t</span> size); <a name="l00272"></a>00272 <a name="l00279"></a>00279 <span class="keywordtype">void</span>* alloc(<span class="keywordtype">size_t</span> size); <a name="l00280"></a>00280 }; <a name="l00281"></a>00281 <a name="l00282"></a>00282 <a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a4bb7037aecd6112d42d2813b22fa537f">endKeydata</a>(<span class="keywordtype">void</span>); <a name="l00283"></a>00283 <a name="l00351"></a><a class="code" href="classost_1_1_keydata.html">00351</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_keydata.html" title="Keydata objects are used to load and hold &quot;configuration&quot; data for a given...">Keydata</a> : <span class="keyword">protected</span> <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a> <a name="l00352"></a>00352 { <a name="l00353"></a>00353 <span class="keyword">public</span>: <a name="l00354"></a>00354 <span class="preprocessor">#ifdef CCXX_PACKED</span> <a name="l00355"></a>00355 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(1)</span> <a name="l00356"></a>00356 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00357"></a>00357 <span class="preprocessor"></span> <a name="l00358"></a><a class="code" href="structost_1_1_keydata_1_1_keyval.html">00358</a> <span class="keyword">struct </span><a class="code" href="structost_1_1_keydata_1_1_keyval.html">Keyval</a> { <a name="l00359"></a><a class="code" href="structost_1_1_keydata_1_1_keyval.html#a56c0465fb57bdd18e34e4540e9646c68">00359</a> <a class="code" href="structost_1_1_keydata_1_1_keyval.html">Keyval</a> *next; <a name="l00360"></a><a class="code" href="structost_1_1_keydata_1_1_keyval.html#aee9029446f2752c9bbbaab97979700ab">00360</a> <span class="keywordtype">char</span> val[1]; <a name="l00361"></a>00361 }; <a name="l00362"></a>00362 <a name="l00363"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html">00363</a> <span class="keyword">struct </span><a class="code" href="structost_1_1_keydata_1_1_keysym.html">Keysym</a> { <a name="l00364"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html#a8f178676596badd443bfa50284de853a">00364</a> <a class="code" href="structost_1_1_keydata_1_1_keysym.html">Keysym</a> *next; <a name="l00365"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html#ad452f48753e0ce3b31e0df312750981d">00365</a> <a class="code" href="structost_1_1_keydata_1_1_keyval.html">Keyval</a> *data; <a name="l00366"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html#a0cc6f7995d0f1c28dcc6cf8b1dacb696">00366</a> <span class="keyword">const</span> <span class="keywordtype">char</span> **list; <a name="l00367"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html#a1db0ab2780d4699229af769ca8b4cf8f">00367</a> <span class="keywordtype">short</span> count; <a name="l00368"></a><a class="code" href="structost_1_1_keydata_1_1_keysym.html#a5176cb0babcb606a9381642f2197217a">00368</a> <span class="keywordtype">char</span> sym[1]; <a name="l00369"></a>00369 }; <a name="l00370"></a>00370 <a name="l00371"></a><a class="code" href="structost_1_1_keydata_1_1_define.html">00371</a> <span class="keyword">struct </span><a class="code" href="structost_1_1_keydata_1_1_define.html">Define</a> { <a name="l00372"></a><a class="code" href="structost_1_1_keydata_1_1_define.html#ab42cca11d5d9a567cb8f4934950e2417">00372</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword; <a name="l00373"></a><a class="code" href="structost_1_1_keydata_1_1_define.html#a04cdb7590697911ac29c0f90ed3b0010">00373</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *value; <a name="l00374"></a>00374 }; <a name="l00375"></a>00375 <a name="l00376"></a>00376 <span class="preprocessor">#ifdef CCXX_PACKED</span> <a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#pragma pack()</span> <a name="l00378"></a>00378 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00379"></a>00379 <span class="preprocessor"></span> <a name="l00380"></a>00380 <span class="keyword">private</span>: <a name="l00381"></a>00381 <span class="keyword">static</span> std::ifstream *cfgFile; <a name="l00382"></a>00382 <span class="keyword">static</span> <span class="keywordtype">char</span> lastpath[<a class="code" href="misc_8h.html#abf74b99dcd8001dd04a37f346ba70422">KEYDATA_PATH_SIZE</a> + 1]; <a name="l00383"></a>00383 <span class="keyword">static</span> <span class="keywordtype">int</span> count; <a name="l00384"></a>00384 <span class="keyword">static</span> <span class="keywordtype">int</span> sequence; <a name="l00385"></a>00385 <a name="l00386"></a>00386 <span class="keywordtype">int</span> link; <a name="l00387"></a>00387 <a name="l00388"></a>00388 <a class="code" href="structost_1_1_keydata_1_1_keysym.html">Keysym</a> *keys[<a class="code" href="misc_8h.html#a00b691e2cbad8d8e0934fb4e91d2beb7">KEYDATA_INDEX_SIZE</a>]; <a name="l00389"></a>00389 <a name="l00396"></a>00396 <span class="keywordtype">unsigned</span> getIndex(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00397"></a>00397 <a name="l00398"></a>00398 <span class="keyword">protected</span>: <a name="l00399"></a>00399 <a class="code" href="structost_1_1_keydata_1_1_keysym.html">Keysym</a>* getSymbol(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym, <span class="keywordtype">bool</span> create); <a name="l00400"></a>00400 <a name="l00401"></a>00401 <span class="keyword">public</span>: <a name="l00413"></a>00413 <span class="keywordtype">void</span> load(<span class="keyword">const</span> <span class="keywordtype">char</span> *keypath); <a name="l00414"></a>00414 <a name="l00428"></a>00428 <span class="keywordtype">void</span> loadPrefix(<span class="keyword">const</span> <span class="keywordtype">char</span> *prefix, <span class="keyword">const</span> <span class="keywordtype">char</span> *keypath); <a name="l00429"></a>00429 <a name="l00439"></a>00439 <span class="keywordtype">void</span> loadFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *filepath, <span class="keyword">const</span> <span class="keywordtype">char</span> *keys = NULL, <span class="keyword">const</span> <span class="keywordtype">char</span> *pre = NULL); <a name="l00440"></a>00440 <a name="l00449"></a>00449 <span class="keywordtype">void</span> load(<a class="code" href="structost_1_1_keydata_1_1_define.html">Define</a> *pairs); <a name="l00450"></a>00450 <a name="l00454"></a>00454 <a class="code" href="classost_1_1_keydata.html" title="Keydata objects are used to load and hold &quot;configuration&quot; data for a given...">Keydata</a>(); <a name="l00455"></a>00455 <a name="l00463"></a>00463 <a class="code" href="classost_1_1_keydata.html" title="Keydata objects are used to load and hold &quot;configuration&quot; data for a given...">Keydata</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *keypath); <a name="l00464"></a>00464 <a name="l00472"></a>00472 <a class="code" href="classost_1_1_keydata.html" title="Keydata objects are used to load and hold &quot;configuration&quot; data for a given...">Keydata</a>(<a class="code" href="structost_1_1_keydata_1_1_define.html">Define</a> *pairs, <span class="keyword">const</span> <span class="keywordtype">char</span> *keypath = NULL); <a name="l00473"></a>00473 <a name="l00479"></a>00479 <span class="keyword">virtual</span> ~<a class="code" href="classost_1_1_keydata.html" title="Keydata objects are used to load and hold &quot;configuration&quot; data for a given...">Keydata</a>(); <a name="l00480"></a>00480 <a name="l00488"></a>00488 <span class="keywordtype">void</span> unlink(<span class="keywordtype">void</span>); <a name="l00489"></a>00489 <a name="l00498"></a>00498 <span class="keywordtype">int</span> getCount(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00499"></a>00499 <a name="l00507"></a>00507 <span class="keyword">const</span> <span class="keywordtype">char</span>* getFirst(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00508"></a>00508 <a name="l00516"></a>00516 <span class="keyword">const</span> <span class="keywordtype">char</span>* getLast(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00517"></a>00517 <a name="l00524"></a>00524 <span class="keywordtype">bool</span> isKey(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00525"></a>00525 <a name="l00533"></a>00533 <span class="keyword">const</span> <span class="keywordtype">char</span> *getString(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym, <span class="keyword">const</span> <span class="keywordtype">char</span> *def = NULL); <a name="l00534"></a>00534 <a name="l00542"></a>00542 <span class="keywordtype">long</span> getLong(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym, <span class="keywordtype">long</span> def = 0); <a name="l00543"></a>00543 <a name="l00550"></a>00550 <span class="keywordtype">bool</span> getBool(<span class="keyword">const</span> <span class="keywordtype">char</span> *key); <a name="l00551"></a>00551 <a name="l00559"></a>00559 <span class="keywordtype">double</span> getDouble(<span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">double</span> def = 0.); <a name="l00560"></a>00560 <a name="l00569"></a>00569 <span class="keywordtype">unsigned</span> getIndex(<span class="keywordtype">char</span> **data, <span class="keywordtype">unsigned</span> max); <a name="l00570"></a>00570 <a name="l00577"></a>00577 <span class="keywordtype">unsigned</span> getCount(<span class="keywordtype">void</span>); <a name="l00578"></a>00578 <a name="l00587"></a>00587 <span class="keywordtype">void</span> setValue(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym, <span class="keyword">const</span> <span class="keywordtype">char</span> *data); <a name="l00588"></a>00588 <a name="l00596"></a>00596 <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span>* getList(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00597"></a>00597 <a name="l00604"></a>00604 <span class="keywordtype">void</span> clrValue(<span class="keyword">const</span> <span class="keywordtype">char</span> *sym); <a name="l00605"></a>00605 <a name="l00610"></a><a class="code" href="classost_1_1_keydata.html#a1891928115aa1007abe42d81a695c205">00610</a> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *operator[](<span class="keyword">const</span> <span class="keywordtype">char</span> *keyword) <a name="l00611"></a>00611 {<span class="keywordflow">return</span> getLast(keyword);}; <a name="l00612"></a>00612 <a name="l00616"></a>00616 <span class="keyword">static</span> <span class="keywordtype">void</span> end(<span class="keywordtype">void</span>); <a name="l00617"></a>00617 <a name="l00622"></a><a class="code" href="namespaceost.html#a4bb7037aecd6112d42d2813b22fa537f">00622</a> <span class="keyword">friend</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceost.html#a4bb7037aecd6112d42d2813b22fa537f">endKeydata</a>(<span class="keywordtype">void</span>) <a name="l00623"></a>00623 {<a class="code" href="classost_1_1_keydata.html#af16246e1f7c5af075493bf37d7e1b48f" title="static member to end keydata i/o allocations.">Keydata::end</a>();}; <a name="l00624"></a>00624 }; <a name="l00625"></a>00625 <a name="l00633"></a><a class="code" href="classost_1_1_mem_pager_object.html">00633</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_mem_pager_object.html" title="This class is used to create derived classes which are constructed within a memory...">MemPagerObject</a> <a name="l00634"></a>00634 { <a name="l00635"></a>00635 <span class="keyword">public</span>: <a name="l00642"></a><a class="code" href="classost_1_1_mem_pager_object.html#a2bacdd98544fb7be92b1d5ae9b2919d1">00642</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new(<span class="keywordtype">size_t</span> size, <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a> &pager) <a name="l00643"></a>00643 {<span class="keywordflow">return</span> pager.<a class="code" href="classost_1_1_mem_pager.html#a3a03cb50bd4084ddbf6314ec0339d176" title="Allocate memory from either the currently active page, or allocate a new page for...">alloc</a>(size);}; <a name="l00644"></a>00644 <a name="l00651"></a><a class="code" href="classost_1_1_mem_pager_object.html#a7b4c7e265406e5c56fa232276075f493">00651</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> *operator new[](<span class="keywordtype">size_t</span> size, <a class="code" href="classost_1_1_mem_pager.html" title="The memory pager is used to allocate cumulative memory pages for storing object specific...">MemPager</a> &pager) <a name="l00652"></a>00652 {<span class="keywordflow">return</span> pager.<a class="code" href="classost_1_1_mem_pager.html#a3a03cb50bd4084ddbf6314ec0339d176" title="Allocate memory from either the currently active page, or allocate a new page for...">alloc</a>(size);}; <a name="l00653"></a>00653 <a name="l00657"></a><a class="code" href="classost_1_1_mem_pager_object.html#ae039834d73e7dc19be6111eaf52264a7">00657</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classost_1_1_mem_pager_object.html#ae039834d73e7dc19be6111eaf52264a7" title="Mempager delete does nothing; the pool purges.">operator delete</a>(<span class="keywordtype">void</span> *) {}; <a name="l00658"></a>00658 <a name="l00662"></a><a class="code" href="classost_1_1_mem_pager_object.html#a944f0bd3fd0c362cdc1d7d6b31bdcdcd">00662</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classost_1_1_mem_pager_object.html#a944f0bd3fd0c362cdc1d7d6b31bdcdcd" title="Array mempager delete does nothing; the pool purges.">operator delete[]</a>(<span class="keywordtype">void</span> *) {}; <a name="l00663"></a>00663 }; <a name="l00664"></a>00664 <a name="l00673"></a><a class="code" href="classost_1_1_assoc.html">00673</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_assoc.html" title="This class is used to associate (object) pointers with named strings.">Assoc</a> <a name="l00674"></a>00674 { <a name="l00675"></a>00675 <span class="keyword">private</span>: <a name="l00676"></a>00676 <span class="keyword">struct </span>entry { <a name="l00677"></a>00677 <span class="keyword">const</span> <span class="keywordtype">char</span> *id; <a name="l00678"></a>00678 entry *next; <a name="l00679"></a>00679 <span class="keywordtype">void</span> *data; <a name="l00680"></a>00680 }; <a name="l00681"></a>00681 <a name="l00682"></a>00682 entry *entries[<a class="code" href="misc_8h.html#a00b691e2cbad8d8e0934fb4e91d2beb7">KEYDATA_INDEX_SIZE</a>]; <a name="l00683"></a>00683 <a name="l00684"></a>00684 <span class="keyword">protected</span>: <a name="l00685"></a>00685 <a class="code" href="classost_1_1_assoc.html" title="This class is used to associate (object) pointers with named strings.">Assoc</a>(); <a name="l00686"></a>00686 <span class="keyword">virtual</span> ~<a class="code" href="classost_1_1_assoc.html" title="This class is used to associate (object) pointers with named strings.">Assoc</a>(); <a name="l00687"></a>00687 <a name="l00688"></a>00688 <span class="keywordtype">void</span> clear(<span class="keywordtype">void</span>); <a name="l00689"></a>00689 <a name="l00690"></a>00690 <span class="keyword">virtual</span> <span class="keywordtype">void</span> *getMemory(<span class="keywordtype">size_t</span> size) = 0; <a name="l00691"></a>00691 <a name="l00692"></a>00692 <span class="keyword">public</span>: <a name="l00693"></a>00693 <span class="keywordtype">void</span> *getPointer(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>) <span class="keyword">const</span>; <a name="l00694"></a>00694 <span class="keywordtype">void</span> setPointer(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>, <span class="keywordtype">void</span> *data); <a name="l00695"></a>00695 }; <a name="l00696"></a>00696 <a name="l00707"></a><a class="code" href="classost_1_1_runlist.html">00707</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent...">Runlist</a> : <span class="keyword">public</span> <a class="code" href="classost_1_1_mutex.html" title="The Mutex class is used to protect a section of code so that at any given time only...">Mutex</a> <a name="l00708"></a>00708 { <a name="l00709"></a>00709 <span class="keyword">private</span>: <a name="l00710"></a>00710 <a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a> *first, *last; <a name="l00711"></a>00711 <a name="l00712"></a>00712 <span class="keyword">protected</span>: <a name="l00713"></a><a class="code" href="classost_1_1_runlist.html#a6b6d76330d6816dae8fd59fa2ddc80e0">00713</a> <span class="keywordtype">unsigned</span> limit, used; <a name="l00714"></a>00714 <span class="keywordtype">void</span> check(<span class="keywordtype">void</span>); <a name="l00715"></a>00715 <a name="l00716"></a>00716 <span class="keyword">public</span>: <a name="l00722"></a>00722 <a class="code" href="namespaceost.html#adba459b2b0da06fe5e0cbaf2349eaaa5">Runlist</a>(<span class="keywordtype">unsigned</span> count = 1); <a name="l00723"></a>00723 <a name="l00732"></a>00732 <span class="keywordtype">bool</span> add(<a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a> *run); <a name="l00733"></a>00733 <a name="l00740"></a>00740 <span class="keywordtype">void</span> del(<a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a> *run); <a name="l00741"></a>00741 <a name="l00747"></a>00747 <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">unsigned</span> limit); <a name="l00748"></a>00748 }; <a name="l00749"></a>00749 <a name="l00756"></a><a class="code" href="classost_1_1_runable.html">00756</a> <span class="keyword">class </span><a class="code" href="config_8h.html#ad10ef148ba8327bd530fc6c32c1e181c">__EXPORT</a> <a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a> <a name="l00757"></a>00757 { <a name="l00758"></a>00758 <span class="keyword">private</span>: <a name="l00759"></a><a class="code" href="classost_1_1_runable.html#ac53e8802cca4f6d9df833c8f9b558344">00759</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent...">Runlist</a>; <a name="l00760"></a>00760 <a class="code" href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent...">Runlist</a> *list; <a name="l00761"></a>00761 <a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a> *next, *prev; <a name="l00762"></a>00762 <a name="l00763"></a>00763 <span class="keyword">protected</span>: <a name="l00764"></a>00764 <a class="code" href="namespaceost.html#acc2811f07b6cc7ea5d96a90fee539ed2">Runable</a>(); <a name="l00765"></a>00765 <span class="keyword">virtual</span> ~<a class="code" href="classost_1_1_runable.html" title="A container for objects that can be queued against a runlist.">Runable</a>(); <a name="l00766"></a>00766 <a name="l00771"></a>00771 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ready(<span class="keywordtype">void</span>) = 0; <a name="l00772"></a>00772 <a name="l00773"></a>00773 <span class="keyword">public</span>: <a name="l00780"></a>00780 <span class="keywordtype">bool</span> starting(<a class="code" href="classost_1_1_runlist.html" title="A runlist is used to restrict concurrent exection to a limited set of concurrent...">Runlist</a> *list); <a name="l00781"></a>00781 <a name="l00787"></a>00787 <span class="keywordtype">void</span> stoping(<span class="keywordtype">void</span>); <a name="l00788"></a>00788 }; <a name="l00789"></a>00789 <a name="l00790"></a>00790 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00791"></a>00791 <span class="preprocessor"></span>} <a name="l00792"></a>00792 <span class="preprocessor">#endif</span> <a name="l00793"></a>00793 <span class="preprocessor"></span> <a name="l00794"></a>00794 <span class="preprocessor">#endif</span> <a name="l00795"></a>00795 <span class="preprocessor"></span> </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Mar 12 10:07:39 2010 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>