This file is indexed.

/usr/share/doc/libucommon-dev/a00194_source.html is in libucommon-doc 3.2.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!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>UCommon: ucommon/keydata.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="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>ucommon/keydata.h</h1><a href="a00194.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) 2006-2010 David Sugar, Tycho Softworks.</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This file is part of GNU uCommon C++.</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">// GNU uCommon C++ is free software: you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">// it under the terms of the GNU Lesser General Public License as published </span>
<a name="l00007"></a>00007 <span class="comment">// by the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">// (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// GNU uCommon C++ is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">// GNU Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00016"></a>00016 <span class="comment">// along with GNU uCommon C++.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00017"></a>00017 
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef _UCOMMON_KEYDATA_H_</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define _UCOMMON_KEYDATA_H_</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#ifndef _UCOMMON_CONFIG_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00201.html" title="Various miscelanous platform specific headers and defines.">ucommon/platform.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#endif</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef  _UCOMMON_LINKED_H_</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00195.html" title="Linked objects, lists, templates, and containers.">ucommon/linked.h</a>&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#ifndef  _UCOMMON_MEMORY_H_</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00197.html" title="Private heaps, pools, and associations.">ucommon/memory.h</a>&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 NAMESPACE_UCOMMON
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">class </span>keyfile;
<a name="l00048"></a>00048 
<a name="l00057"></a><a class="code" href="a00060.html">00057</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> : <span class="keyword">public</span> <a class="code" href="a00100.html" title="A linked object base class for ordered objects.">OrderedObject</a>
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 <span class="keyword">private</span>:
<a name="l00060"></a>00060     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a>;
<a name="l00061"></a>00061     <a class="code" href="a00099.html" title="An index container for maintaining an ordered list of objects.">OrderedIndex</a> index;
<a name="l00062"></a>00062     <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a>(<a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a> *file);
<a name="l00063"></a>00063     <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a>(<a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a> *file, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>);
<a name="l00064"></a>00064     <span class="keyword">const</span> <span class="keywordtype">char</span> *name;
<a name="l00065"></a>00065     <a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a> *root;
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="keyword">public</span>:
<a name="l00073"></a><a class="code" href="a00061.html">00073</a>     <span class="keyword">class </span>__LOCAL <a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a> : <span class="keyword">public</span> <a class="code" href="a00100.html" title="A linked object base class for ordered objects.">OrderedObject</a>
<a name="l00074"></a>00074     {
<a name="l00075"></a>00075     <span class="keyword">private</span>:
<a name="l00076"></a>00076         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a>;
<a name="l00077"></a>00077         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a>;
<a name="l00078"></a>00078         <a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a>(<a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a> *allocator, <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *section, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *data);
<a name="l00079"></a>00079     <span class="keyword">public</span>:
<a name="l00080"></a>00080         <span class="keyword">const</span> <span class="keywordtype">char</span> *id;
<a name="l00081"></a>00081         <span class="keyword">const</span> <span class="keywordtype">char</span> *value;
<a name="l00082"></a>00082     };
<a name="l00083"></a>00083 
<a name="l00084"></a>00084     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a>;
<a name="l00085"></a>00085 
<a name="l00091"></a>00091     <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">get</span>(<span class="keyword">const</span> <span class="keywordtype">char</span> *id) <span class="keyword">const</span>;
<a name="l00092"></a>00092 
<a name="l00098"></a><a class="code" href="a00060.html#a4aad8912c35c9b115c19d544ac220e35">00098</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> *<span class="keywordtype">id</span>)<span class="keyword"> const</span>
<a name="l00099"></a>00099 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">get</span>(id);};
<a name="l00100"></a>00100 
<a name="l00108"></a>00108     <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> <span class="keywordtype">char</span> *id, <span class="keyword">const</span> <span class="keywordtype">char</span> *value);
<a name="l00109"></a>00109 
<a name="l00115"></a>00115     <span class="keywordtype">void</span> clear(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">id</span>);
<a name="l00116"></a>00116     
<a name="l00121"></a><a class="code" href="a00060.html#a07d1f55d5711cd5fc174ec36c5ecf2fb">00121</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">get</span>(void) <span class="keyword">const</span>
<a name="l00122"></a>00122         {<span class="keywordflow">return</span> name;};
<a name="l00123"></a>00123 
<a name="l00128"></a><a class="code" href="a00060.html#a7b0f6926773755514bb7cacb5364dffb">00128</a>     <span class="keyword">inline</span> <a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a> *begin(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00129"></a>00129 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a> *)index.begin();};
<a name="l00130"></a>00130 
<a name="l00135"></a><a class="code" href="a00060.html#ac386670bf4abae6d9776c86414b5c651">00135</a>     <span class="keyword">inline</span> <a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a> *end(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00136"></a><a class="code" href="a00060.html#aa452deb9693febcc38536d48ed1a877f">00136</a> <span class="keyword">        </span>{<span class="keywordflow">return</span> (<a class="code" href="a00061.html" title="A key value set is used for iterative access.">keyvalue</a>*)index.end();};
<a name="l00137"></a>00137 
<a name="l00141"></a>00141     <span class="keyword">typedef</span> <a class="code" href="a00066.html" title="A templated smart pointer for iterating linked lists.">linked_pointer&lt;keyvalue&gt;</a> iterator;
<a name="l00142"></a>00142 };  
<a name="l00143"></a>00143 
<a name="l00150"></a><a class="code" href="a00062.html">00150</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a> : <span class="keyword">public</span> <a class="code" href="a00080.html" title="An alternate memory pager private heap manager.">memalloc</a>
<a name="l00151"></a>00151 {
<a name="l00152"></a>00152 <span class="keyword">private</span>:
<a name="l00153"></a>00153     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a>;
<a name="l00154"></a>00154     <a class="code" href="a00099.html" title="An index container for maintaining an ordered list of objects.">OrderedIndex</a> index;
<a name="l00155"></a>00155     <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *defaults;
<a name="l00156"></a>00156 
<a name="l00157"></a>00157     <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *create(<span class="keyword">const</span> <span class="keywordtype">char</span> *section);
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="keyword">public</span>:
<a name="l00164"></a>00164     <a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a>(<span class="keywordtype">size_t</span> pagesize = 0);
<a name="l00165"></a>00165 
<a name="l00171"></a>00171     <a class="code" href="a00062.html" title="Traditional keypair config file parsing class.">keyfile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">size_t</span> pagesize = 0);
<a name="l00172"></a>00172 
<a name="l00179"></a>00179     <span class="keywordtype">void</span> load(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00180"></a>00180 
<a name="l00186"></a>00186     <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *<span class="keyword">get</span>(<span class="keyword">const</span> <span class="keywordtype">char</span> *section) <span class="keyword">const</span>;
<a name="l00187"></a>00187 
<a name="l00188"></a>00188     <span class="keyword">inline</span> <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *operator()(<span class="keyword">const</span> <span class="keywordtype">char</span> *section)<span class="keyword"> const</span>
<a name="l00189"></a>00189 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">get</span>(section);};
<a name="l00190"></a>00190 
<a name="l00191"></a>00191     <span class="keyword">inline</span> <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *operator[](<span class="keyword">const</span> <span class="keywordtype">char</span> *section)<span class="keyword"> const</span>
<a name="l00192"></a>00192 <span class="keyword">        </span>{<span class="keywordflow">return</span> <span class="keyword">get</span>(section);};
<a name="l00193"></a>00193 
<a name="l00198"></a><a class="code" href="a00062.html#a6e09a638632e705f37f7d3109ac03c3b">00198</a>     <span class="keyword">inline</span> <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *<span class="keyword">get</span>(void) <span class="keyword">const</span>
<a name="l00199"></a>00199         {<span class="keywordflow">return</span> defaults;};
<a name="l00200"></a>00200 
<a name="l00205"></a><a class="code" href="a00062.html#a6cccc5706520cb54509093d0f110a7bc">00205</a>     <span class="keyword">inline</span> <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *begin(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00206"></a>00206 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *)index.begin();};
<a name="l00207"></a>00207 
<a name="l00212"></a><a class="code" href="a00062.html#a2b14608863e05bd1a2e0206ece781fb9">00212</a>     <span class="keyword">inline</span> <a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *end(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00213"></a><a class="code" href="a00062.html#a959fe87a68855c5220fffe12289b8e1d">00213</a> <span class="keyword">        </span>{<span class="keywordflow">return</span> (<a class="code" href="a00060.html" title="Data keys parsed from a keyfile.">keydata</a> *)index.end();};
<a name="l00214"></a>00214     
<a name="l00218"></a>00218     <span class="keyword">typedef</span> <a class="code" href="a00066.html" title="A templated smart pointer for iterating linked lists.">linked_pointer&lt;keydata&gt;</a> iterator;
<a name="l00219"></a>00219 };
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 END_NAMESPACE
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:01 2010 for UCommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>