| <!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.14"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>Crashpad: crashpad::DelimitedFileReader Class 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="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| <link href="crashpad_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">Crashpad |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.14 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</script> |
| <div id="main-nav"></div> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html">DelimitedFileReader</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="summary"> |
| <a href="#pub-types">Public Types</a> | |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="classcrashpad_1_1DelimitedFileReader-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">crashpad::DelimitedFileReader Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>Reads a file one field or line at a time. |
| <a href="classcrashpad_1_1DelimitedFileReader.html#details">More...</a></p> |
| |
| <p><code>#include "util/file/delimited_file_reader.h"</code></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> |
| Public Types</h2></td></tr> |
| <tr class="memitem:a29c137ed407ee56238fbf74ca2e3e8fc"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">Result</a> </td></tr> |
| <tr class="memdesc:a29c137ed407ee56238fbf74ca2e3e8fc"><td class="mdescLeft"> </td><td class="mdescRight">The result of a <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a6ec6693aed8fd7d5f2176fae5dd2bd27" title="Reads a single field from the file. ">GetDelim()</a> or <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#ab77aae5c11bba81e7ff9713d744eb875" title="Reads a single line from the file. ">GetLine()</a> call. <a href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">More...</a><br /></td></tr> |
| <tr class="separator:a29c137ed407ee56238fbf74ca2e3e8fc"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><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:a38d4a98c5b1b391ab65b354ac5c040ec"><td class="memItemLeft" align="right" valign="top"><a id="a38d4a98c5b1b391ab65b354ac5c040ec"></a> |
|  </td><td class="memItemRight" valign="bottom"><b>DelimitedFileReader</b> (<a class="el" href="classcrashpad_1_1FileReaderInterface.html">FileReaderInterface</a> *file_reader)</td></tr> |
| <tr class="separator:a38d4a98c5b1b391ab65b354ac5c040ec"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a6ec6693aed8fd7d5f2176fae5dd2bd27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a6ec6693aed8fd7d5f2176fae5dd2bd27">GetDelim</a> (char delimiter, std::string *field)</td></tr> |
| <tr class="memdesc:a6ec6693aed8fd7d5f2176fae5dd2bd27"><td class="mdescLeft"> </td><td class="mdescRight">Reads a single field from the file. <a href="#a6ec6693aed8fd7d5f2176fae5dd2bd27">More...</a><br /></td></tr> |
| <tr class="separator:a6ec6693aed8fd7d5f2176fae5dd2bd27"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab77aae5c11bba81e7ff9713d744eb875"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#ab77aae5c11bba81e7ff9713d744eb875">GetLine</a> (std::string *line)</td></tr> |
| <tr class="memdesc:ab77aae5c11bba81e7ff9713d744eb875"><td class="mdescLeft"> </td><td class="mdescRight">Reads a single line from the file. <a href="#ab77aae5c11bba81e7ff9713d744eb875">More...</a><br /></td></tr> |
| <tr class="separator:ab77aae5c11bba81e7ff9713d744eb875"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>Reads a file one field or line at a time. </p> |
| <p>The file is interpreted as a series of fields separated by delimiter characters. When the delimiter character is the newline character (<code>'\n'</code>), the file is interpreted as a series of lines.</p> |
| <p>It is safe to mix <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a6ec6693aed8fd7d5f2176fae5dd2bd27" title="Reads a single field from the file. ">GetDelim()</a> and <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#ab77aae5c11bba81e7ff9713d744eb875" title="Reads a single line from the file. ">GetLine()</a> calls, if appropriate for the format being interpreted.</p> |
| <p>This is a replacement for the standard library’s <code>getdelim()</code> and <code>getline()</code> functions, adapted to work with <a class="el" href="classcrashpad_1_1FileReaderInterface.html" title="An interface to read to files and other file-like objects with semantics matching the underlying plat...">FileReaderInterface</a> objects instead of <code>FILE*</code> streams. </p> |
| </div><h2 class="groupheader">Member Enumeration Documentation</h2> |
| <a id="a29c137ed407ee56238fbf74ca2e3e8fc"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a29c137ed407ee56238fbf74ca2e3e8fc">◆ </a></span>Result</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">enum <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">crashpad::DelimitedFileReader::Result</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">strong</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The result of a <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a6ec6693aed8fd7d5f2176fae5dd2bd27" title="Reads a single field from the file. ">GetDelim()</a> or <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#ab77aae5c11bba81e7ff9713d744eb875" title="Reads a single line from the file. ">GetLine()</a> call. </p> |
| <table class="fieldtable"> |
| <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a29c137ed407ee56238fbf74ca2e3e8fcae3587c730cc1aa530fa4ddc9c4204e97"></a>kError </td><td class="fielddoc"><p>An error occurred, and a message was logged. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="a29c137ed407ee56238fbf74ca2e3e8fca8c632159fa131f09d04f94e3cbcd8782"></a>kSuccess </td><td class="fielddoc"><p>A field or line was read from the file. </p> |
| </td></tr> |
| <tr><td class="fieldname"><a id="a29c137ed407ee56238fbf74ca2e3e8fca81ee170e2d4ce75d1ff04872b0a4fe04"></a>kEndOfFile </td><td class="fielddoc"><p>The end of the file was encountered. </p> |
| </td></tr> |
| </table> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a id="a6ec6693aed8fd7d5f2176fae5dd2bd27"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a6ec6693aed8fd7d5f2176fae5dd2bd27">◆ </a></span>GetDelim()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">DelimitedFileReader::Result</a> crashpad::DelimitedFileReader::GetDelim </td> |
| <td>(</td> |
| <td class="paramtype">char </td> |
| <td class="paramname"><em>delimiter</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">std::string * </td> |
| <td class="paramname"><em>field</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Reads a single field from the file. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">delimiter</td><td>The delimiter character that terminates the field. It is safe to call this method multiple times while changing the value of this parameter, if appropriate for the format being interpreted. </td></tr> |
| <tr><td class="paramdir">[out]</td><td class="paramname">field</td><td>The field read from the file. This parameter will include the field’s terminating delimiter character unless the field was at the end of the file and was read without such a character. This parameter will not be empty.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc" title="The result of a GetDelim() or GetLine() call. ">Result</a> value. <em>field</em> is only valid when <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fca8c632159fa131f09d04f94e3cbcd8782" title="A field or line was read from the file. ">Result::kSuccess</a> is returned. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ab77aae5c11bba81e7ff9713d744eb875"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ab77aae5c11bba81e7ff9713d744eb875">◆ </a></span>GetLine()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc">DelimitedFileReader::Result</a> crashpad::DelimitedFileReader::GetLine </td> |
| <td>(</td> |
| <td class="paramtype">std::string * </td> |
| <td class="paramname"><em>line</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Reads a single line from the file. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[out]</td><td class="paramname">line</td><td>The line read from the file. This parameter will include the line terminating delimiter character unless the line was at the end of the file and was read without such a character. This parameter will not be empty.</td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fc" title="The result of a GetDelim() or GetLine() call. ">Result</a> value. <em>line</em> is only valid when <a class="el" href="classcrashpad_1_1DelimitedFileReader.html#a29c137ed407ee56238fbf74ca2e3e8fca8c632159fa131f09d04f94e3cbcd8782" title="A field or line was read from the file. ">Result::kSuccess</a> is returned. </dd></dl> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following files:<ul> |
| <li>util/file/delimited_file_reader.h</li> |
| <li>util/file/delimited_file_reader.cc</li> |
| </ul> |
| </div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.14 |
| </small></address> |
| </body> |
| </html> |