<!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.8"/> <title>libopenraw: OpenRaw::IO::Stream 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="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 style="padding-left: 0.5em;"> <div id="projectname">libopenraw </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <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>Classes</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>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</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 id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceOpenRaw.html">OpenRaw</a></li><li class="navelem"><b>IO</b></li><li class="navelem"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html">Stream</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="#pro-methods">Protected Member Functions</a> | <a href="classOpenRaw_1_1IO_1_1Stream-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">OpenRaw::IO::Stream Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> </div><!--header--> <div class="contents"> <p>base virtual class for IO <a href="classOpenRaw_1_1IO_1_1Stream.html#details">More...</a></p> <p><code>#include <<a class="el" href="stream_8h_source.html">stream.h</a>></code></p> <div class="dynheader"> Inheritance diagram for OpenRaw::IO::Stream:</div> <div class="dyncontent"> <div class="center"> <img src="classOpenRaw_1_1IO_1_1Stream.png" usemap="#OpenRaw::IO::Stream_map" alt=""/> <map id="OpenRaw::IO::Stream_map" name="OpenRaw::IO::Stream_map"> <area href="classOpenRaw_1_1IO_1_1File.html" alt="OpenRaw::IO::File" shape="rect" coords="0,56,164,80"/> <area href="classOpenRaw_1_1IO_1_1MemStream.html" alt="OpenRaw::IO::MemStream" shape="rect" coords="174,56,338,80"/> <area href="classOpenRaw_1_1IO_1_1StreamClone.html" title="cloned stream. Allow reading from a different offset " alt="OpenRaw::IO::StreamClone" shape="rect" coords="348,56,512,80"/> </map> </div></div> <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:a31943b38cba6c7ae975509859f9021c0"><td class="memItemLeft" align="right" valign="top">typedef ::or_error </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a31943b38cba6c7ae975509859f9021c0">Error</a></td></tr> <tr class="separator:a31943b38cba6c7ae975509859f9021c0"><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:a5437a97b8941ba593273ab8d6a41f094"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a5437a97b8941ba593273ab8d6a41f094">Stream</a> (const char *filename)</td></tr> <tr class="separator:a5437a97b8941ba593273ab8d6a41f094"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2331c05ce11fbd9443810c333c9d7ef1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a31943b38cba6c7ae975509859f9021c0">Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a2331c05ce11fbd9443810c333c9d7ef1">open</a> ()=0</td></tr> <tr class="separator:a2331c05ce11fbd9443810c333c9d7ef1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2929d3da1fe4d2102ee38c75cc1e2ee7"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a2929d3da1fe4d2102ee38c75cc1e2ee7">close</a> ()=0</td></tr> <tr class="separator:a2929d3da1fe4d2102ee38c75cc1e2ee7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af3f62e12445433f96b060446130f11f7"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#af3f62e12445433f96b060446130f11f7">seek</a> (off_t offset, int whence)=0</td></tr> <tr class="separator:af3f62e12445433f96b060446130f11f7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a644cac743aa92c0b2dcc12d82d8356e2"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a644cac743aa92c0b2dcc12d82d8356e2">read</a> (void *buf, size_t count)=0</td></tr> <tr class="separator:a644cac743aa92c0b2dcc12d82d8356e2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa3c716fdbd4fc7350c5dbf5fe6a870d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3c716fdbd4fc7350c5dbf5fe6a870d3"></a> virtual off_t </td><td class="memItemRight" valign="bottom"><b>filesize</b> ()=0</td></tr> <tr class="separator:aa3c716fdbd4fc7350c5dbf5fe6a870d3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9d33bf9d8cd2b2bb033f264f3051c5fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d33bf9d8cd2b2bb033f264f3051c5fc"></a> <a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a31943b38cba6c7ae975509859f9021c0">Error</a> </td><td class="memItemRight" valign="bottom"><b>get_error</b> ()</td></tr> <tr class="separator:a9d33bf9d8cd2b2bb033f264f3051c5fc"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae65eb9b73431a4a465ea120409a1fe48"><td class="memItemLeft" align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#ae65eb9b73431a4a465ea120409a1fe48">get_path</a> () const </td></tr> <tr class="separator:ae65eb9b73431a4a465ea120409a1fe48"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6e1513085e02456d6444d9a549168916"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e1513085e02456d6444d9a549168916"></a> uint8_t </td><td class="memItemRight" valign="bottom"><b>readByte</b> () throw (Internals::IOException)</td></tr> <tr class="separator:a6e1513085e02456d6444d9a549168916"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr class="memitem:ade1759cd8b17cd74f355ddab9e2da9ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade1759cd8b17cd74f355ddab9e2da9ad"></a> void </td><td class="memItemRight" valign="bottom"><b>set_error</b> (<a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a31943b38cba6c7ae975509859f9021c0">Error</a> error)</td></tr> <tr class="separator:ade1759cd8b17cd74f355ddab9e2da9ad"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>base virtual class for IO </p> <p>Definition at line <a class="el" href="stream_8h_source.html#l00040">40</a> of file <a class="el" href="stream_8h_source.html">stream.h</a>.</p> </div><h2 class="groupheader">Member Typedef Documentation</h2> <a class="anchor" id="a31943b38cba6c7ae975509859f9021c0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef ::or_error OpenRaw::IO::Stream::Error</td> </tr> </table> </div><div class="memdoc"> <p>Error type. </p><dl class="section see"><dt>See also</dt><dd>or_error </dd></dl> <p>Definition at line <a class="el" href="stream_8h_source.html#l00052">52</a> of file <a class="el" href="stream_8h_source.html">stream.h</a>.</p> </div> </div> <h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="a5437a97b8941ba593273ab8d6a41f094"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">OpenRaw::IO::Stream::Stream </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>filename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Construct the file </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">filename</td><td>the full uri for the file </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="stream_8cpp_source.html#l00028">28</a> of file <a class="el" href="stream_8cpp_source.html">stream.cpp</a>.</p> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a2929d3da1fe4d2102ee38c75cc1e2ee7"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual int OpenRaw::IO::Stream::close </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>close the file </p> <p>Implemented in <a class="el" href="classOpenRaw_1_1IO_1_1File.html#a014f37a92dc0e682132d6e69502a7e8f">OpenRaw::IO::File</a>, <a class="el" href="classOpenRaw_1_1IO_1_1StreamClone.html#a2a1acc98ff238117a8fa80f5cbbd8df8">OpenRaw::IO::StreamClone</a>, and <a class="el" href="classOpenRaw_1_1IO_1_1MemStream.html#a96e2b6c649affe22dc5c617e628f9ec1">OpenRaw::IO::MemStream</a>.</p> <p>Referenced by <a class="el" href="rawcontainer_8cpp_source.html#l00048">OpenRaw::Internals::RawContainer::~RawContainer()</a>.</p> </div> </div> <a class="anchor" id="ae65eb9b73431a4a465ea120409a1fe48"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const std::string& OpenRaw::IO::Stream::get_path </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>get the uri path of the file </p> <p>Definition at line <a class="el" href="stream_8h_source.html#l00073">73</a> of file <a class="el" href="stream_8h_source.html">stream.h</a>.</p> <p>Referenced by <a class="el" href="file_8cpp_source.html#l00040">OpenRaw::IO::File::open()</a>.</p> </div> </div> <a class="anchor" id="a2331c05ce11fbd9443810c333c9d7ef1"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a31943b38cba6c7ae975509859f9021c0">Error</a> OpenRaw::IO::Stream::open </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>open the file </p> <p>Implemented in <a class="el" href="classOpenRaw_1_1IO_1_1File.html#a17a9a4fc8b65d5a99578e8e032e5c9b9">OpenRaw::IO::File</a>, <a class="el" href="classOpenRaw_1_1IO_1_1StreamClone.html#ab8096b7871d8777b97571215eb591827">OpenRaw::IO::StreamClone</a>, and <a class="el" href="classOpenRaw_1_1IO_1_1MemStream.html#ac79a39593281495b9ec545cfad3b6ff1">OpenRaw::IO::MemStream</a>.</p> <p>Referenced by <a class="el" href="rawcontainer_8cpp_source.html#l00038">OpenRaw::Internals::RawContainer::RawContainer()</a>.</p> </div> </div> <a class="anchor" id="a644cac743aa92c0b2dcc12d82d8356e2"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual int OpenRaw::IO::Stream::read </td> <td>(</td> <td class="paramtype">void * </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>count</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>read in the file. Semantics are similar to POSIX <a class="el" href="classOpenRaw_1_1IO_1_1Stream.html#a644cac743aa92c0b2dcc12d82d8356e2">read()</a> </p> <p>Implemented in <a class="el" href="classOpenRaw_1_1IO_1_1File.html#ac9975eb1d0ce0a72d7f8c6299b71fb3e">OpenRaw::IO::File</a>, <a class="el" href="classOpenRaw_1_1IO_1_1StreamClone.html#aadd9852410a250bf2161bd2c031a3cda">OpenRaw::IO::StreamClone</a>, and <a class="el" href="classOpenRaw_1_1IO_1_1MemStream.html#a8fce6d6379318e340e50da8bd1adc0a0">OpenRaw::IO::MemStream</a>.</p> <p>Referenced by <a class="el" href="rawcontainer_8cpp_source.html#l00178">OpenRaw::Internals::RawContainer::fetchData()</a>, <a class="el" href="ifddir_8cpp_source.html#l00063">OpenRaw::Internals::IFDDir::load()</a>, <a class="el" href="streamclone_8cpp_source.html#l00075">OpenRaw::IO::StreamClone::read()</a>, <a class="el" href="rawcontainer_8cpp_source.html#l00077">OpenRaw::Internals::RawContainer::readInt16()</a>, <a class="el" href="rawcontainer_8cpp_source.html#l00101">OpenRaw::Internals::RawContainer::readInt32()</a>, <a class="el" href="rawcontainer_8cpp_source.html#l00128">OpenRaw::Internals::RawContainer::readUInt16()</a>, and <a class="el" href="rawcontainer_8cpp_source.html#l00152">OpenRaw::Internals::RawContainer::readUInt32()</a>.</p> </div> </div> <a class="anchor" id="af3f62e12445433f96b060446130f11f7"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual int OpenRaw::IO::Stream::seek </td> <td>(</td> <td class="paramtype">off_t </td> <td class="paramname"><em>offset</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>whence</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>seek in the file. Semantics are similar to POSIX lseek() </p> <p>Implemented in <a class="el" href="classOpenRaw_1_1IO_1_1File.html#a3fc41e831c477b9901e60ba9608576c3">OpenRaw::IO::File</a>, <a class="el" href="classOpenRaw_1_1IO_1_1StreamClone.html#acbe380bb843f9fe3c93be3998162dc03">OpenRaw::IO::StreamClone</a>, and <a class="el" href="classOpenRaw_1_1IO_1_1MemStream.html#a2ef23f207e7ae288e0ae451dd1e38797">OpenRaw::IO::MemStream</a>.</p> <p>Referenced by <a class="el" href="crwfile_8cpp_source.html#l00160">OpenRaw::Internals::CRWFile::_getRawData()</a>, <a class="el" href="crwdecompressor_8cpp_source.html#l00263">OpenRaw::Internals::CrwDecompressor::decompress()</a>, <a class="el" href="rawcontainer_8cpp_source.html#l00178">OpenRaw::Internals::RawContainer::fetchData()</a>, <a class="el" href="ifdfilecontainer_8cpp_source.html#l00121">OpenRaw::Internals::IFDFileContainer::getDirectoryDataSize()</a>, <a class="el" href="mrwcontainer_8cpp_source.html#l00058">OpenRaw::Internals::MRW::DataBlock::int8_val()</a>, <a class="el" href="ifddir_8cpp_source.html#l00063">OpenRaw::Internals::IFDDir::load()</a>, <a class="el" href="ifddir_8cpp_source.html#l00129">OpenRaw::Internals::IFDDir::nextIFD()</a>, <a class="el" href="streamclone_8cpp_source.html#l00042">OpenRaw::IO::StreamClone::open()</a>, <a class="el" href="rawcontainer_8cpp_source.html#l00038">OpenRaw::Internals::RawContainer::RawContainer()</a>, <a class="el" href="ciffcontainer_8cpp_source.html#l00039">OpenRaw::Internals::CIFF::ImageSpec::readFrom()</a>, <a class="el" href="streamclone_8cpp_source.html#l00062">OpenRaw::IO::StreamClone::seek()</a>, <a class="el" href="mrwcontainer_8cpp_source.html#l00076">OpenRaw::Internals::MRW::DataBlock::uint16_val()</a>, and <a class="el" href="mrwcontainer_8cpp_source.html#l00067">OpenRaw::Internals::MRW::DataBlock::uint8_val()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li>lib/io/<a class="el" href="stream_8h_source.html">stream.h</a></li> <li>lib/io/<a class="el" href="stream_8cpp_source.html">stream.cpp</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Oct 17 2014 20:21:10 for libopenraw by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.8 </small></address> </body> </html>