/usr/share/doc/libdballe-doc/c_api/classdballe_1_1File.html is in libdballe-doc 5.18-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 | <!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"/>
<title>libdballe: dballe::File Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">libdballe
 <span id="projectnumber">5.18</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</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"><b>dballe</b> </li>
<li class="navelem"><a class="el" href="classdballe_1_1File.html">File</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">dballe::File Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="dballe::File" --><div class="dynheader">
Inheritance diagram for dballe::File:</div>
<div class="dyncontent">
<div class="center">
<img src="classdballe_1_1File.png" usemap="#dballe::File_map" alt=""/>
<map id="dballe::File_map" name="dballe::File_map">
<area href="classdballe_1_1AofFile.html" alt="dballe::AofFile" shape="rect" coords="0,56,106,80"/>
<area href="classdballe_1_1ArrayFile.html" alt="dballe::ArrayFile" shape="rect" coords="116,56,222,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab29b674bdad40de29206cfb5e821a79e"></a><!-- doxytag: member="dballe::File::File" ref="ab29b674bdad40de29206cfb5e821a79e" args="(const std::string &name, FILE *fd, bool close_on_exit=true)" -->
 </td><td class="memItemRight" valign="bottom"><b>File</b> (const std::string &<a class="el" href="classdballe_1_1File.html#a24d08a70d3368c50de13b3c713ecd1c5">name</a>, FILE *<a class="el" href="classdballe_1_1File.html#a09702eada45561679782437703e11d20">fd</a>, bool <a class="el" href="classdballe_1_1File.html#ae5d95362984888e84b0a7f938394f676">close_on_exit</a>=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeca3a5c2b2501edf3756ec97bfce14fe"></a><!-- doxytag: member="dballe::File::stream" ref="aeca3a5c2b2501edf3756ec97bfce14fe" args="() const " -->
FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#aeca3a5c2b2501edf3756ec97bfce14fe">stream</a> () const throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the file stream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#a24d08a70d3368c50de13b3c713ecd1c5">name</a> () const throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the type of the dba_file. <a href="#a24d08a70d3368c50de13b3c713ecd1c5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Encoding </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#a61536a2e395bf056f4bf40b913f38b93">type</a> () const =0 throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the name of the dba_file. <a href="#a61536a2e395bf056f4bf40b913f38b93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#a30dd5e36456c0b0196a2fcaef111302f">read</a> (<a class="el" href="structdballe_1_1Rawmsg.html">Rawmsg</a> &msg)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read a message from the file. <a href="#a30dd5e36456c0b0196a2fcaef111302f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#ab8e31a095fe0c65431bdfd614e410bb6">write</a> (const <a class="el" href="structdballe_1_1Rawmsg.html">Rawmsg</a> &msg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write the encoded message data to the file. <a href="#ab8e31a095fe0c65431bdfd614e410bb6"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::auto_ptr< <a class="el" href="classdballe_1_1File.html">File</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#a6254f3c9cd58b78457b0c63dbd23ee74">create</a> (Encoding <a class="el" href="classdballe_1_1File.html#a61536a2e395bf056f4bf40b913f38b93">type</a>, const std::string &<a class="el" href="classdballe_1_1File.html#a24d08a70d3368c50de13b3c713ecd1c5">name</a>, const char *mode)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a dba_file structure. <a href="#a6254f3c9cd58b78457b0c63dbd23ee74"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcf502ded2807c6f3c005b0137a50b60"></a><!-- doxytag: member="dballe::File::m_name" ref="adcf502ded2807c6f3c005b0137a50b60" args="" -->
std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#adcf502ded2807c6f3c005b0137a50b60">m_name</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the file. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09702eada45561679782437703e11d20"></a><!-- doxytag: member="dballe::File::fd" ref="a09702eada45561679782437703e11d20" args="" -->
FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#a09702eada45561679782437703e11d20">fd</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">FILE structure used to read or write to the file. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5d95362984888e84b0a7f938394f676"></a><!-- doxytag: member="dballe::File::close_on_exit" ref="ae5d95362984888e84b0a7f938394f676" args="" -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#ae5d95362984888e84b0a7f938394f676">close_on_exit</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set to true if fd should be closed when dba_file_delete() is called. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa70ccf2d1408c0bb8bfa620d26a09d8b"></a><!-- doxytag: member="dballe::File::idx" ref="aa70ccf2d1408c0bb8bfa620d26a09d8b" args="" -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdballe_1_1File.html#aa70ccf2d1408c0bb8bfa620d26a09d8b">idx</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Index of the last message read from the file or written to the file. <br/></td></tr>
</table>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6254f3c9cd58b78457b0c63dbd23ee74"></a><!-- doxytag: member="dballe::File::create" ref="a6254f3c9cd58b78457b0c63dbd23ee74" args="(Encoding type, const std::string &name, const char *mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::auto_ptr<<a class="el" href="classdballe_1_1File.html">File</a>> <a class="el" href="classdballe_1_1File.html#a6254f3c9cd58b78457b0c63dbd23ee74">dballe::File::create</a> </td>
<td>(</td>
<td class="paramtype">Encoding </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>mode</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a dba_file structure. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The type of data contained in the file. If -1 is passed, then create will attempt to autodetect the file type from its first byte. </td></tr>
<tr><td class="paramname">name</td><td>The name of the file to access. "(stdin)", "(stdout)" and "(stderr)" are special file names, that will use the corresponding stream instead of open a file. </td></tr>
<tr><td class="paramname">mode</td><td>The opening mode of the file, as used by fopen. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The newly allocated <a class="el" href="classdballe_1_1File.html">File</a>, that needs to be deleted by the caller. </dd></dl>
</div>
</div>
<a class="anchor" id="a24d08a70d3368c50de13b3c713ecd1c5"></a><!-- doxytag: member="dballe::File::name" ref="a24d08a70d3368c50de13b3c713ecd1c5" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::string& <a class="el" href="classdballe_1_1File.html#a24d08a70d3368c50de13b3c713ecd1c5">dballe::File::name</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the type of the dba_file. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The file encoding. </dd></dl>
<p>References <a class="el" href="classdballe_1_1File.html#adcf502ded2807c6f3c005b0137a50b60">m_name</a>.</p>
</div>
</div>
<a class="anchor" id="a30dd5e36456c0b0196a2fcaef111302f"></a><!-- doxytag: member="dballe::File::read" ref="a30dd5e36456c0b0196a2fcaef111302f" args="(Rawmsg &msg)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool <a class="el" href="classdballe_1_1File.html#a30dd5e36456c0b0196a2fcaef111302f">dballe::File::read</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structdballe_1_1Rawmsg.html">Rawmsg</a> & </td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a message from the file. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The <a class="el" href="structdballe_1_1Rawmsg.html" title="Annotated string buffer for encoded messages.">Rawmsg</a> that will hold the data. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if a message has been found in the file, else false. </dd></dl>
<p>Implemented in <a class="el" href="classdballe_1_1AofFile.html#a028af01aa21721be531ec0b26ef0e067">dballe::AofFile</a>, and <a class="el" href="classdballe_1_1ArrayFile.html#a4cc1c83b8c15c7ca5e425b73feecafa5">dballe::ArrayFile</a>.</p>
</div>
</div>
<a class="anchor" id="a61536a2e395bf056f4bf40b913f38b93"></a><!-- doxytag: member="dballe::File::type" ref="a61536a2e395bf056f4bf40b913f38b93" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual Encoding <a class="el" href="classdballe_1_1File.html#a61536a2e395bf056f4bf40b913f38b93">dballe::File::type</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const throw ()<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the name of the dba_file. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The file name. </dd></dl>
<p>Implemented in <a class="el" href="classdballe_1_1AofFile.html#a5d3643dfba8526c1683ec30669aa902e">dballe::AofFile</a>, and <a class="el" href="classdballe_1_1ArrayFile.html#ad3f41e98ec0fec523ca8d50b75abfb19">dballe::ArrayFile</a>.</p>
</div>
</div>
<a class="anchor" id="ab8e31a095fe0c65431bdfd614e410bb6"></a><!-- doxytag: member="dballe::File::write" ref="ab8e31a095fe0c65431bdfd614e410bb6" args="(const Rawmsg &msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void <a class="el" href="classdballe_1_1File.html#ab8e31a095fe0c65431bdfd614e410bb6">dballe::File::write</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structdballe_1_1Rawmsg.html">Rawmsg</a> & </td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write the encoded message data to the file. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">msg</td><td>The ::dba_rawmsg with the encoded data to write </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="classdballe_1_1AofFile.html#aab6723d95d2f2aa1d1f5fe5ff412a23e">dballe::AofFile</a>, and <a class="el" href="classdballe_1_1ArrayFile.html#ac6f945a050316e79ed0ed00d2b2edc5f">dballe::ArrayFile</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="file_8h_source.html">file.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 24 2012 21:04:10 for libdballe by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>
|