/usr/share/doc/libwreport-doc/apidocs/structwreport_1_1buffers_1_1CrexInput.html is in libwreport-doc 3.6-1.
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 | <!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>libwreport: wreport::buffers::CrexInput Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libwreport
 <span id="projectnumber">3.6</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</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>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data Structures</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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacewreport.html">wreport</a></li><li class="navelem"><b>buffers</b></li><li class="navelem"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html">CrexInput</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">wreport::buffers::CrexInput Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Text input buffer.
<a href="structwreport_1_1buffers_1_1CrexInput.html#details">More...</a></p>
<p><code>#include <<a class="el" href="crex_8h_source.html">crex.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad216130654b68fbc2adc8fa881298baf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#ad216130654b68fbc2adc8fa881298baf">CrexInput</a> (const std::string &in, const char *<a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a8c853b37eb67b2db54d7f5c192e7f459">fname</a>, size_t <a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a0d0f09171cd6b2dc53e9bf6ee08ccf3d">offset</a>)</td></tr>
<tr class="memdesc:ad216130654b68fbc2adc8fa881298baf"><td class="mdescLeft"> </td><td class="mdescRight">Wrap a string into a <a class="el" href="structwreport_1_1buffers_1_1CrexInput.html" title="Text input buffer. ">CrexInput</a>. <a href="#ad216130654b68fbc2adc8fa881298baf">More...</a><br /></td></tr>
<tr class="separator:ad216130654b68fbc2adc8fa881298baf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af11238f66932b5135f39600328a062c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af11238f66932b5135f39600328a062c1"></a>
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#af11238f66932b5135f39600328a062c1">eof</a> () const </td></tr>
<tr class="memdesc:af11238f66932b5135f39600328a062c1"><td class="mdescLeft"> </td><td class="mdescRight">Return true if the cursor is at the end of the buffer. <br /></td></tr>
<tr class="separator:af11238f66932b5135f39600328a062c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac18d9460c98fde5b462e96e0d5f54ae9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac18d9460c98fde5b462e96e0d5f54ae9"></a>
unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#ac18d9460c98fde5b462e96e0d5f54ae9">remaining</a> () const </td></tr>
<tr class="memdesc:ac18d9460c98fde5b462e96e0d5f54ae9"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of remaining characters until the end of the buffer. <br /></td></tr>
<tr class="separator:ac18d9460c98fde5b462e96e0d5f54ae9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a29c61365e0aa24774d88ebc9193b6931"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a29c61365e0aa24774d88ebc9193b6931"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a29c61365e0aa24774d88ebc9193b6931">parse_error</a> (const char *fmt,...) const <a class="el" href="error_8h.html#ac90261814c6621766ebec4d00df9f794">WREPORT_THROWF_ATTRS</a>(2</td></tr>
<tr class="memdesc:a29c61365e0aa24774d88ebc9193b6931"><td class="mdescLeft"> </td><td class="mdescRight">Throw an <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> at the current decoding location. <br /></td></tr>
<tr class="separator:a29c61365e0aa24774d88ebc9193b6931"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30fd24934942b0f40bae60e9bdd5ca4c"><td class="memItemLeft" align="right" valign="top">void void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a30fd24934942b0f40bae60e9bdd5ca4c">check_eof</a> (const char *expected) const </td></tr>
<tr class="memdesc:a30fd24934942b0f40bae60e9bdd5ca4c"><td class="mdescLeft"> </td><td class="mdescRight">Check if the decoding cursor has reached the end of buffer, throw <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> otherwise. <a href="#a30fd24934942b0f40bae60e9bdd5ca4c">More...</a><br /></td></tr>
<tr class="separator:a30fd24934942b0f40bae60e9bdd5ca4c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2b48a2748c17b097dc97290d01bff1d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a2b48a2748c17b097dc97290d01bff1d0">check_available_data</a> (unsigned datalen, const char *expected) const </td></tr>
<tr class="memdesc:a2b48a2748c17b097dc97290d01bff1d0"><td class="mdescLeft"> </td><td class="mdescRight">Check that the input buffer contains at least <em>datalen</em> characters after the cursor, throw <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> otherwise. <a href="#a2b48a2748c17b097dc97290d01bff1d0">More...</a><br /></td></tr>
<tr class="separator:a2b48a2748c17b097dc97290d01bff1d0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab3aaf0c0b168e3ab3925a19a8528ee79"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3aaf0c0b168e3ab3925a19a8528ee79"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#ab3aaf0c0b168e3ab3925a19a8528ee79">skip_spaces</a> ()</td></tr>
<tr class="memdesc:ab3aaf0c0b168e3ab3925a19a8528ee79"><td class="mdescLeft"> </td><td class="mdescRight">Move the cursor to the next non-space character. <br /></td></tr>
<tr class="separator:ab3aaf0c0b168e3ab3925a19a8528ee79"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af2fa89876c1b27c9a1001f363c667bf3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2fa89876c1b27c9a1001f363c667bf3"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#af2fa89876c1b27c9a1001f363c667bf3">skip_data_and_spaces</a> (unsigned datalen)</td></tr>
<tr class="memdesc:af2fa89876c1b27c9a1001f363c667bf3"><td class="mdescLeft"> </td><td class="mdescRight">Skip <em>datalen</em> characters and all spaces after them. <br /></td></tr>
<tr class="separator:af2fa89876c1b27c9a1001f363c667bf3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a019d0b420d737c54d53cd480c43acadf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a019d0b420d737c54d53cd480c43acadf">mark_section_start</a> (unsigned num)</td></tr>
<tr class="memdesc:a019d0b420d737c54d53cd480c43acadf"><td class="mdescLeft"> </td><td class="mdescRight">Mark the start of the given section. <a href="#a019d0b420d737c54d53cd480c43acadf">More...</a><br /></td></tr>
<tr class="separator:a019d0b420d737c54d53cd480c43acadf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaea7d1e7a80b0d68cb7681a38f5b8eb9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#aaea7d1e7a80b0d68cb7681a38f5b8eb9">read_word</a> (char *buf, size_t len)</td></tr>
<tr class="memdesc:aaea7d1e7a80b0d68cb7681a38f5b8eb9"><td class="mdescLeft"> </td><td class="mdescRight">Read a word into <em>buf</em>. <a href="#aaea7d1e7a80b0d68cb7681a38f5b8eb9">More...</a><br /></td></tr>
<tr class="separator:aaea7d1e7a80b0d68cb7681a38f5b8eb9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa1b9c8cffb4d8a6edbaf8b90e97c1f8b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#aa1b9c8cffb4d8a6edbaf8b90e97c1f8b">parse_value</a> (int len, int is_signed, const char **d_start, const char **d_end)</td></tr>
<tr class="memdesc:aa1b9c8cffb4d8a6edbaf8b90e97c1f8b"><td class="mdescLeft"> </td><td class="mdescRight">Parse a data value from the input buffer. <a href="#aa1b9c8cffb4d8a6edbaf8b90e97c1f8b">More...</a><br /></td></tr>
<tr class="separator:aa1b9c8cffb4d8a6edbaf8b90e97c1f8b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adeba78ed9aba22e623ace61ba733e30c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adeba78ed9aba22e623ace61ba733e30c"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#adeba78ed9aba22e623ace61ba733e30c">debug_dump_next</a> (const char *desc) const </td></tr>
<tr class="memdesc:adeba78ed9aba22e623ace61ba733e30c"><td class="mdescLeft"> </td><td class="mdescRight">Dump to stderr the contents of the next bit of buffer. <br /></td></tr>
<tr class="separator:adeba78ed9aba22e623ace61ba733e30c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:afbfd3585ee2d70a6e068357e0fcf315a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afbfd3585ee2d70a6e068357e0fcf315a"></a>
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#afbfd3585ee2d70a6e068357e0fcf315a">data</a></td></tr>
<tr class="memdesc:afbfd3585ee2d70a6e068357e0fcf315a"><td class="mdescLeft"> </td><td class="mdescRight">Input buffer. <br /></td></tr>
<tr class="separator:afbfd3585ee2d70a6e068357e0fcf315a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae7e6244e037ce9a9bd11940f9bc304f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7e6244e037ce9a9bd11940f9bc304f1"></a>
size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#ae7e6244e037ce9a9bd11940f9bc304f1">data_len</a></td></tr>
<tr class="memdesc:ae7e6244e037ce9a9bd11940f9bc304f1"><td class="mdescLeft"> </td><td class="mdescRight">Input buffer size. <br /></td></tr>
<tr class="separator:ae7e6244e037ce9a9bd11940f9bc304f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c853b37eb67b2db54d7f5c192e7f459"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a8c853b37eb67b2db54d7f5c192e7f459">fname</a></td></tr>
<tr class="memdesc:a8c853b37eb67b2db54d7f5c192e7f459"><td class="mdescLeft"> </td><td class="mdescRight">Input file name (optional). <a href="#a8c853b37eb67b2db54d7f5c192e7f459">More...</a><br /></td></tr>
<tr class="separator:a8c853b37eb67b2db54d7f5c192e7f459"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0d0f09171cd6b2dc53e9bf6ee08ccf3d"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a0d0f09171cd6b2dc53e9bf6ee08ccf3d">offset</a></td></tr>
<tr class="memdesc:a0d0f09171cd6b2dc53e9bf6ee08ccf3d"><td class="mdescLeft"> </td><td class="mdescRight">File offset of the start of the message. <a href="#a0d0f09171cd6b2dc53e9bf6ee08ccf3d">More...</a><br /></td></tr>
<tr class="separator:a0d0f09171cd6b2dc53e9bf6ee08ccf3d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a546ea7778e0eaf117ff95df6edc56882"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a546ea7778e0eaf117ff95df6edc56882"></a>
unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a546ea7778e0eaf117ff95df6edc56882">sec</a> [5]</td></tr>
<tr class="memdesc:a546ea7778e0eaf117ff95df6edc56882"><td class="mdescLeft"> </td><td class="mdescRight">Character offsets of the starts of CREX sections. <br /></td></tr>
<tr class="separator:a546ea7778e0eaf117ff95df6edc56882"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9c4fa9de4216eabe6b10bc445dd2e1e6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c4fa9de4216eabe6b10bc445dd2e1e6"></a>
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a9c4fa9de4216eabe6b10bc445dd2e1e6">cur</a></td></tr>
<tr class="memdesc:a9c4fa9de4216eabe6b10bc445dd2e1e6"><td class="mdescLeft"> </td><td class="mdescRight">Cursor inside in.data() used for decoding. <br /></td></tr>
<tr class="separator:a9c4fa9de4216eabe6b10bc445dd2e1e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8494981aa44e3f50c4b83cc28ce0882d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8494981aa44e3f50c4b83cc28ce0882d"></a>
int </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a8494981aa44e3f50c4b83cc28ce0882d">has_check_digit</a></td></tr>
<tr class="memdesc:a8494981aa44e3f50c4b83cc28ce0882d"><td class="mdescLeft"> </td><td class="mdescRight">True if the CREX message uses the check digit feature. <br /></td></tr>
<tr class="separator:a8494981aa44e3f50c4b83cc28ce0882d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1520855793f0b25f1c85d149e364f95d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1520855793f0b25f1c85d149e364f95d"></a>
int </td><td class="memItemRight" valign="bottom"><a class="el" href="structwreport_1_1buffers_1_1CrexInput.html#a1520855793f0b25f1c85d149e364f95d">expected_check_digit</a></td></tr>
<tr class="memdesc:a1520855793f0b25f1c85d149e364f95d"><td class="mdescLeft"> </td><td class="mdescRight">Value of the next expected check digit. <br /></td></tr>
<tr class="separator:a1520855793f0b25f1c85d149e364f95d"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Text input buffer. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="ad216130654b68fbc2adc8fa881298baf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wreport::buffers::CrexInput::CrexInput </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>fname</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>offset</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrap a string into a <a class="el" href="structwreport_1_1buffers_1_1CrexInput.html" title="Text input buffer. ">CrexInput</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">in</td><td>The string with the data to read </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2b48a2748c17b097dc97290d01bff1d0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wreport::buffers::CrexInput::check_available_data </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>datalen</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>expected</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Check that the input buffer contains at least <em>datalen</em> characters after the cursor, throw <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> otherwise. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">datalen</td><td>number of bytes expected to still be available at the current location </td></tr>
<tr><td class="paramname">expected</td><td>name of what we are about to decode, used for generating nice error messages </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a30fd24934942b0f40bae60e9bdd5ca4c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void void wreport::buffers::CrexInput::check_eof </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>expected</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the decoding cursor has reached the end of buffer, throw <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> otherwise. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">expected</td><td>name of what we are about to decode, used for generating nice error messages </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a019d0b420d737c54d53cd480c43acadf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wreport::buffers::CrexInput::mark_section_start </td>
<td>(</td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>num</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Mark the start of the given section. </p>
<p>This sets sec[num] to the position pointed by the current cursor, and throws <a class="el" href="structwreport_1_1error__parse.html" title="Report an error when parsing informations. ">error_parse</a> if the section starts at the end of the buffer.</p>
<p>There is no need to mark the start of section 0, as it is always at offset 0. </p>
</div>
</div>
<a class="anchor" id="aa1b9c8cffb4d8a6edbaf8b90e97c1f8b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wreport::buffers::CrexInput::parse_value </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>len</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>is_signed</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>d_start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>d_end</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse a data value from the input buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">len</td><td>Length in characters of the value to parse </td></tr>
<tr><td class="paramname">is_signed</td><td>True if the value can be preceded by a + or - sign </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">d_start</td><td>Start of the parsed token </td></tr>
<tr><td class="paramname">d_end</td><td>End of the parsed token </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aaea7d1e7a80b0d68cb7681a38f5b8eb9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wreport::buffers::CrexInput::read_word </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"><em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read a word into <em>buf</em>. </p>
<p>A word ends at the first whitespace or at the end of buffer.</p>
<p>Whitespace after the word is skipped.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">buf</td><td>The buffer that will hold the word. It will always be zero-terminated. </td></tr>
<tr><td class="paramname">len</td><td>Length of the buffer. Since the buffer will always be zero-terminated, the word will be at most <em>len-1</em> characters long. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a8c853b37eb67b2db54d7f5c192e7f459"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* wreport::buffers::CrexInput::fname</td>
</tr>
</table>
</div><div class="memdoc">
<p>Input file name (optional). </p>
<p>If available, it will be used to generate better error messages.</p>
<p>If not available, it is NULL. </p>
</div>
</div>
<a class="anchor" id="a0d0f09171cd6b2dc53e9bf6ee08ccf3d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t wreport::buffers::CrexInput::offset</td>
</tr>
</table>
</div><div class="memdoc">
<p>File offset of the start of the message. </p>
<p>If available, it will be used to generate better error messages.</p>
<p>If not available, it is 0. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="crex_8h_source.html">crex.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 18 2016 13:32:18 for libwreport by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
|