?? classchm_1_1chmistream.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>chm::chmistream class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>chm::chmistream Class Reference</h1>Inputstream for reading files inside a chm archives. <a href="#_details">More...</a><p><code>#include <<a class="el" href="chmxx_8h-source.html">chmxx.h</a>></code><p><a href="classchm_1_1chmistream-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a0">chmistream</a> (const <a class="el" href="classchm_1_1chmfile.html">chmfile</a> &chm, const std::string &path, size_t buf_size=1024)</td></tr><tr><td> </td><td><font size=-1><em>Create a new input stream from archive for given path.</em> <a href="#a0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>std::streamsize </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a1">read_left</a> () const</td></tr><tr><td> </td><td><font size=-1><em>Returns the number of bytes that are left to be read from this stream.</em> <a href="#a1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a2">~chmistream</a> ()</td></tr><tr><td nowrap align=right valign=top>size_t </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a3">get_encint</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Get little endian MS encint from the stream.</em> <a href="#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a4">get_dword</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Get local endianized MS dword (2 x 2 bytes) from the stream.</em> <a href="#a4"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a5">get_word</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Get local endianized MS word (2 bytes) from the stream.</em> <a href="#a5"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a6">get_sr</a> (int s, int r, int &pos)</td></tr><tr><td> </td><td><font size=-1><em>Get a s-r encoded value from the stream.</em> <a href="#a6"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classchm_1_1chmistream.html#a7">get_sr_finish</a> (int &pos)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Inputstream for reading files inside a chm archives.<p><div class="fragment"><pre> <a class="code" href="classchm_1_1chmfile.html">chm::chmfile</a> chm(<span class="stringliteral">"/chmfile.chm"</span>); <a class="code" href="classchm_1_1chmistream.html">chm::chmistream</a> in(chm, <span class="stringliteral">"/path"</span>); string line; <span class="keywordflow">while</span> ( readline(chm, line) ) { cout << line; }</pre></div> <p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00148">148</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="chm::chmistream::chmistream"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> chm::chmistream::chmistream </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classchm_1_1chmfile.html">chmfile</a> & </td> <td class="mdname" nowrap> <em>chm</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const std::string & </td> <td class="mdname" nowrap> <em>path</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>size_t </td> <td class="mdname" nowrap> <em>buf_size</em> = 1024</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new input stream from archive for given path.<p> </td> </tr></table><a name="a2" doxytag="chm::chmistream::~chmistream"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual chm::chmistream::~chmistream </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a4" doxytag="chm::chmistream::get_dword"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned long chm::chmistream::get_dword </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get local endianized MS dword (2 x 2 bytes) from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00176">176</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>. </td> </tr></table><a name="a3" doxytag="chm::chmistream::get_encint"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> size_t chm::chmistream::get_encint </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get little endian MS encint from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00160">160</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>. </td> </tr></table><a name="a6" doxytag="chm::chmistream::get_sr"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned long chm::chmistream::get_sr </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>s</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>r</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int & </td> <td class="mdname" nowrap> <em>pos</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get a s-r encoded value from the stream.<p>Scale must alwqays be 2. Use 0 for initial pos. When finished reading an entry of sr-s call the get_sr_finish(pos). <p>Definition at line <a class="el" href="chmxx_8h-source.html#l00213">213</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>. </td> </tr></table><a name="a7" doxytag="chm::chmistream::get_sr_finish"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void chm::chmistream::get_sr_finish </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int & </td> <td class="mdname1" valign="top" nowrap> <em>pos</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00253">253</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>. </td> </tr></table><a name="a5" doxytag="chm::chmistream::get_word"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned int chm::chmistream::get_word </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get local endianized MS word (2 bytes) from the stream.<p><p>Definition at line <a class="el" href="chmxx_8h-source.html#l00195">195</a> of file <a class="el" href="chmxx_8h-source.html">chmxx.h</a>. </td> </tr></table><a name="a1" doxytag="chm::chmistream::read_left"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> std::streamsize chm::chmistream::read_left </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns the number of bytes that are left to be read from this stream.<p>So returns the size of file when nothing has been read. </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="chmxx_8h-source.html">chmxx.h</a></ul><hr>Copyright © 2003 Indrek Mandre <script language="JavaScript"> document.write ('<<a href="mailto:indrek' + '@' + 'mare.ee">indrek' + '@' + 'mare.ee</a>>');</script><p> </p>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -