/usr/share/doc/libucommon-dev/a00092.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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | <!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: ucc::Number Class Reference</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 Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><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="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00092.html">Number</a>
</div>
</div>
<div class="contents">
<h1>ucc::Number Class Reference</h1><!-- doxytag: class="ucc::Number" -->
<p>A number manipulation class.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00198_source.html">numbers.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::Number:</div>
<div class="dynsection">
<div class="center"><img src="a00459.png" border="0" usemap="#ucc_1_1_number_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1_number_inherit__map" id="ucc_1_1_number_inherit__map">
<area shape="rect" id="node3" href="a00046.html" title="A number class that manipulates a string buffer that is also a date." alt="" coords="5,83,139,112"/><area shape="rect" id="node5" href="a00184.html" title="A number manipulation class that maintains a zero lead filled string." alt="" coords="163,83,277,112"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a19aa5ec7e641b11bd9cf558b4c70d83d">c_str</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get string buffer representing the number. <a href="#a19aa5ec7e641b11bd9cf558b4c70d83d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#ad64296c6e00a8e3fd0d54c5aa66ad87d">get</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get value of string buffer as a long integer. <a href="#ad64296c6e00a8e3fd0d54c5aa66ad87d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a764879ad982611762b16038e6290e4e9">Number</a> (char *buffer, unsigned size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an instance of a number. <a href="#a764879ad982611762b16038e6290e4e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#aa82e7ae5da6e4cdb349aeadaee91b55e">operator char *</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast object as a string to retrieve buffer. <a href="#aa82e7ae5da6e4cdb349aeadaee91b55e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a5ab84a2c2dccec7194a98f7c42ebc175">operator long</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast string as long integer and get value of buffer. <a href="#a5ab84a2c2dccec7194a98f7c42ebc175"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#acdb0e50f24ad517fc9bb15e893e23e31">operator()</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get value of string buffer as expression of object. <a href="#acdb0e50f24ad517fc9bb15e893e23e31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#aa8bac49941b7d9d0079f9b856349f704">operator++</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Increment the number object. <a href="#aa8bac49941b7d9d0079f9b856349f704"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#aab15f3c31dfea62ca1b73e4195a326be">operator+=</a> (const long value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a value to the number. <a href="#aab15f3c31dfea62ca1b73e4195a326be"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a821c1f022c027623308736adc4112b58">operator--</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Decrement the number object. <a href="#a821c1f022c027623308736adc4112b58"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#ac10e73805e4f508da5e7212300677f94">operator-=</a> (const long value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract a value from the number. <a href="#ac10e73805e4f508da5e7212300677f94"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#abc93b12443a29ff374fe0e8d879f9076">operator=</a> (const <a class="el" href="a00092.html">Number</a> &number)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assign another number to this number. <a href="#abc93b12443a29ff374fe0e8d879f9076"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a80e442677d7bf486f9bf0c71decc31a7">operator=</a> (long value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assign a value to the number. <a href="#a80e442677d7bf486f9bf0c71decc31a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#af76258087db5ba6dccc42a2f715716dd">set</a> (long value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set string based on a new value. <a href="#af76258087db5ba6dccc42a2f715716dd"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf73789a0d0106167e63230bb1c046ff"></a><!-- doxytag: member="ucc::Number::buffer" ref="adf73789a0d0106167e63230bb1c046ff" args="" -->
char * </td><td class="memItemRight" valign="bottom"><b>buffer</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13348586727f062df8e8de88940469d6"></a><!-- doxytag: member="ucc::Number::size" ref="a13348586727f062df8e8de88940469d6" args="" -->
unsigned </td><td class="memItemRight" valign="bottom"><b>size</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A number manipulation class. </p>
<p>This is used to extract, convert, and manage simple numbers that are represented in C ascii strings in a very quick and optimal way. This class modifies the string representation each time the value is changed. No math expressions or explicit comparison operators are supported for the Numbers class because these are best done by casting to long first.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> number manipulation. </dd></dl>
<p>Definition at line <a class="el" href="a00198_source.html#l00046">46</a> of file <a class="el" href="a00198_source.html">numbers.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a764879ad982611762b16038e6290e4e9"></a><!-- doxytag: member="ucc::Number::Number" ref="a764879ad982611762b16038e6290e4e9" args="(char *buffer, unsigned size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::Number::Number </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create an instance of a number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>or NULL if created internally. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of field if not null terminated. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a19aa5ec7e641b11bd9cf558b4c70d83d"></a><!-- doxytag: member="ucc::Number::c_str" ref="a19aa5ec7e641b11bd9cf558b4c70d83d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* ucc::Number::c_str </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get string buffer representing the number. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>string buffer. </dd></dl>
<p>Definition at line <a class="el" href="a00198_source.html#l00070">70</a> of file <a class="el" href="a00198_source.html">numbers.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad64296c6e00a8e3fd0d54c5aa66ad87d"></a><!-- doxytag: member="ucc::Number::get" ref="ad64296c6e00a8e3fd0d54c5aa66ad87d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::get </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get value of string buffer as a long integer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>long interger value of string buffer. </dd></dl>
</div>
</div>
<a class="anchor" id="aa82e7ae5da6e4cdb349aeadaee91b55e"></a><!-- doxytag: member="ucc::Number::operator char *" ref="aa82e7ae5da6e4cdb349aeadaee91b55e" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::Number::operator char * </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Cast object as a string to retrieve buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>string buffer of value. </dd></dl>
<p>Definition at line <a class="el" href="a00198_source.html#l00097">97</a> of file <a class="el" href="a00198_source.html">numbers.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5ab84a2c2dccec7194a98f7c42ebc175"></a><!-- doxytag: member="ucc::Number::operator long" ref="a5ab84a2c2dccec7194a98f7c42ebc175" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::Number::operator long </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Cast string as long integer and get value of buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>long integer value of string buffer. </dd></dl>
<p>Definition at line <a class="el" href="a00198_source.html#l00090">90</a> of file <a class="el" href="a00198_source.html">numbers.h</a>.</p>
</div>
</div>
<a class="anchor" id="acdb0e50f24ad517fc9bb15e893e23e31"></a><!-- doxytag: member="ucc::Number::operator()" ref="acdb0e50f24ad517fc9bb15e893e23e31" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator() </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get value of string buffer as expression of object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>long interger value of string buffer. </dd></dl>
<p>Definition at line <a class="el" href="a00198_source.html#l00083">83</a> of file <a class="el" href="a00198_source.html">numbers.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa8bac49941b7d9d0079f9b856349f704"></a><!-- doxytag: member="ucc::Number::operator++" ref="aa8bac49941b7d9d0079f9b856349f704" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator++ </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Increment the number object. </p>
<p>This rewrites the string buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object. </dd></dl>
</div>
</div>
<a class="anchor" id="aab15f3c31dfea62ca1b73e4195a326be"></a><!-- doxytag: member="ucc::Number::operator+=" ref="aab15f3c31dfea62ca1b73e4195a326be" args="(const long value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator+= </td>
<td>(</td>
<td class="paramtype">const long </td>
<td class="paramname"> <em>value</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add a value to the number. </p>
<p>This rewrites the string buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>to add. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object. </dd></dl>
</div>
</div>
<a class="anchor" id="a821c1f022c027623308736adc4112b58"></a><!-- doxytag: member="ucc::Number::operator--" ref="a821c1f022c027623308736adc4112b58" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator-- </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Decrement the number object. </p>
<p>This rewrites the string buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object. </dd></dl>
</div>
</div>
<a class="anchor" id="ac10e73805e4f508da5e7212300677f94"></a><!-- doxytag: member="ucc::Number::operator-=" ref="ac10e73805e4f508da5e7212300677f94" args="(const long value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator-= </td>
<td>(</td>
<td class="paramtype">const long </td>
<td class="paramname"> <em>value</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Subtract a value from the number. </p>
<p>This rewrites the string buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>to subtract. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object. </dd></dl>
</div>
</div>
<a class="anchor" id="abc93b12443a29ff374fe0e8d879f9076"></a><!-- doxytag: member="ucc::Number::operator=" ref="abc93b12443a29ff374fe0e8d879f9076" args="(const Number &number)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="a00092.html">Number</a> & </td>
<td class="paramname"> <em>number</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assign another number to this number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>number</em> </td><td>to assign to assign. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object assigned. </dd></dl>
</div>
</div>
<a class="anchor" id="a80e442677d7bf486f9bf0c71decc31a7"></a><!-- doxytag: member="ucc::Number::operator=" ref="a80e442677d7bf486f9bf0c71decc31a7" args="(long value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long ucc::Number::operator= </td>
<td>(</td>
<td class="paramtype">long </td>
<td class="paramname"> <em>value</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assign a value to the number. </p>
<p>This rewrites the string buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>to assign. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new value of number object assigned. </dd></dl>
<p>Reimplemented in <a class="el" href="a00184.html#a9dbf2cfaa19e644a0f1d94b1133cf68d">ucc::ZNumber</a>.</p>
</div>
</div>
<a class="anchor" id="af76258087db5ba6dccc42a2f715716dd"></a><!-- doxytag: member="ucc::Number::set" ref="af76258087db5ba6dccc42a2f715716dd" args="(long value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::Number::set </td>
<td>(</td>
<td class="paramtype">long </td>
<td class="paramname"> <em>value</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set string based on a new value. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>to set. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="a00184.html#aa3003b54f12251f720be0027f5e6805f">ucc::ZNumber</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00198_source.html">numbers.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:36 2010 for UCommon 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>
|