| <!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>Skia: SkFDStream 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.1 --> |
| <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>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| </ul> |
| </div> |
| <div class="tabs"> |
| <ul> |
| <li><a href="annotated.html"><span>Class List</span></a></li> |
| <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class Members</span></a></li> |
| </ul> |
| </div> |
| </div> |
| <div class="contents"> |
| <h1>SkFDStream Class Reference</h1><!-- doxytag: class="SkFDStream" --><!-- doxytag: inherits="SkStream" --> |
| <p><code>#include <<a class="el" href="_sk_stream_8h_source.html">SkStream.h</a>></code></p> |
| |
| <p>Inherits <a class="el" href="class_sk_stream.html">SkStream</a>.</p> |
| <div class="dynheader"> |
| Collaboration diagram for SkFDStream:</div> |
| <div class="dynsection"> |
| <div class="center"><img src="class_sk_f_d_stream__coll__graph.png" border="0" usemap="#_sk_f_d_stream_coll__map" alt="Collaboration graph"/></div> |
| <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> |
| |
| <p><a href="class_sk_f_d_stream-members.html">List of all members.</a></p> |
| <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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#a2a31324d7ff691870ec325b3560976a3">SkFDStream</a> (int fileDesc, bool closeWhenDone)</td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#a9b1d4ace55f1115ed723a063a08139fe">~SkFDStream</a> ()</td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#a8aa9fcac709c69b76e0edce26c63388c">isValid</a> () const </td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#ad74443d11cd59351a2d9b70d75423faa">rewind</a> ()</td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#a065160c39cccce2a80c589c63981ae9e">read</a> (void *buffer, size_t size)</td></tr> |
| <tr><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_f_d_stream.html#a6a0dc81fb30d74e0ce57d8146f052847">getFileName</a> ()</td></tr> |
| </table> |
| <hr/><a name="_details"></a><h2>Detailed Description</h2> |
| <p>A stream that reads from a file descriptor </p> |
| |
| <p>Definition at line <a class="el" href="_sk_stream_8h_source.html#l00140">140</a> of file <a class="el" href="_sk_stream_8h_source.html">SkStream.h</a>.</p> |
| <hr/><h2>Constructor & Destructor Documentation</h2> |
| <a class="anchor" id="a2a31324d7ff691870ec325b3560976a3"></a><!-- doxytag: member="SkFDStream::SkFDStream" ref="a2a31324d7ff691870ec325b3560976a3" args="(int fileDesc, bool closeWhenDone)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">SkFDStream::SkFDStream </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"> <em>fileDesc</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">bool </td> |
| <td class="paramname"> <em>closeWhenDone</em></td><td> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td><td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| <p>Initialize the stream with a dup() of the specified file descriptor. If closeWhenDone is true, then the descriptor will be closed in the destructor. </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a9b1d4ace55f1115ed723a063a08139fe"></a><!-- doxytag: member="SkFDStream::~SkFDStream" ref="a9b1d4ace55f1115ed723a063a08139fe" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual SkFDStream::~SkFDStream </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td><code> [virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| </div> |
| </div> |
| <hr/><h2>Member Function Documentation</h2> |
| <a class="anchor" id="a6a0dc81fb30d74e0ce57d8146f052847"></a><!-- doxytag: member="SkFDStream::getFileName" ref="a6a0dc81fb30d74e0ce57d8146f052847" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual const char* SkFDStream::getFileName </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td><code> [inline, virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| <p>If this stream represents a file, this method returns the file's name. If it does not, it returns NULL (the default behavior). </p> |
| |
| <p>Reimplemented from <a class="el" href="class_sk_stream.html#ad9a65d3656c07146a95e4391c8369fd8">SkStream</a>.</p> |
| |
| <p>Definition at line <a class="el" href="_sk_stream_8h_source.html#l00155">155</a> of file <a class="el" href="_sk_stream_8h_source.html">SkStream.h</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a8aa9fcac709c69b76e0edce26c63388c"></a><!-- doxytag: member="SkFDStream::isValid" ref="a8aa9fcac709c69b76e0edce26c63388c" args="() const " --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">bool SkFDStream::isValid </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td> const<code> [inline]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| <p>Returns true if the current path could be opened. </p> |
| |
| <p>Definition at line <a class="el" href="_sk_stream_8h_source.html#l00151">151</a> of file <a class="el" href="_sk_stream_8h_source.html">SkStream.h</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a065160c39cccce2a80c589c63981ae9e"></a><!-- doxytag: member="SkFDStream::read" ref="a065160c39cccce2a80c589c63981ae9e" args="(void *buffer, size_t size)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual size_t SkFDStream::read </td> |
| <td>(</td> |
| <td class="paramtype">void * </td> |
| <td class="paramname"> <em>buffer</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">size_t </td> |
| <td class="paramname"> <em>size</em></td><td> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td><td><code> [virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| <p>Called to read or skip size number of bytes. If buffer is NULL and size > 0, skip that many bytes, returning how many were skipped. If buffer is NULL and size == 0, return the total length of the stream. If buffer != NULL, copy the requested number of bytes into buffer, returning how many were copied. </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>If buffer is NULL, ignore and just skip size bytes, otherwise copy size bytes into buffer </td></tr> |
| <tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes to skip or copy </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="return"><dt><b>Returns:</b></dt><dd>bytes read on success </dd></dl> |
| |
| <p>Implements <a class="el" href="class_sk_stream.html#afae3344ee277d55aec3a4fa5fead387a">SkStream</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ad74443d11cd59351a2d9b70d75423faa"></a><!-- doxytag: member="SkFDStream::rewind" ref="ad74443d11cd59351a2d9b70d75423faa" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">virtual bool SkFDStream::rewind </td> |
| <td>(</td> |
| <td class="paramname"></td> |
| <td> ) </td> |
| <td><code> [virtual]</code></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| <p>Called to rewind to the beginning of the stream. If this cannot be done, return false. </p> |
| |
| <p>Implements <a class="el" href="class_sk_stream.html#abf7148ef7468ffaf716b024c870a77cc">SkStream</a>.</p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>include/core/<a class="el" href="_sk_stream_8h_source.html">SkStream.h</a></li> |
| </ul> |
| </div> |
| <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Oct 20 11:03:42 2009 for Skia by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
| </body> |
| </html> |