<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>CDRInternalStream.h Source File documentation</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.8.15 --> <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('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('CDRInternalStream_8h_source.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">CDRInternalStream.h</div> </div> </div><!--header--> <div class="contents"> <a href="CDRInternalStream_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * This file is part of the libcdr project.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * This Source Code Form is subject to the terms of the Mozilla Public</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * License, v. 2.0. If a copy of the MPL was not distributed with this</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * file, You can obtain one at http://mozilla.org/MPL/2.0/.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#ifndef __CDRINTERNALSTREAM_H__</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#define __CDRINTERNALSTREAM_H__</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <librevenge-stream/librevenge-stream.h></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">namespace </span><a class="code" href="namespacelibcdr.html">libcdr</a></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html"> 20</a></span> <span class="keyword">class </span><a class="code" href="classlibcdr_1_1CDRInternalStream.html">CDRInternalStream</a> : <span class="keyword">public</span> librevenge::RVNGInputStream</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a304345f746af676dd661422768b4da0d">CDRInternalStream</a>(librevenge::RVNGInputStream *input, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> size, <span class="keywordtype">bool</span> compressed=<span class="keyword">false</span>);</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a304345f746af676dd661422768b4da0d">CDRInternalStream</a>(<span class="keyword">const</span> std::vector<unsigned char> &buffer);</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a506c214b4f1c08f043d07dbf6461b256"> 25</a></span>  <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a506c214b4f1c08f043d07dbf6461b256">~CDRInternalStream</a>()<span class="keyword"> override </span>{}</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a617ba58f4d9de0c865321c3eb0c3d064"> 27</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a617ba58f4d9de0c865321c3eb0c3d064">isStructured</a>()<span class="keyword"> override</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  }</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a4bb34f66a3e30f0713c90aad610cd4b3"> 31</a></span>  <span class="keywordtype">unsigned</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a4bb34f66a3e30f0713c90aad610cd4b3">subStreamCount</a>()<span class="keyword"> override</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  }</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a569062afe43680c2e5711fa561efb3a6"> 35</a></span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classlibcdr_1_1CDRInternalStream.html#a569062afe43680c2e5711fa561efb3a6">subStreamName</a>(<span class="keywordtype">unsigned</span>)<span class="keyword"> override</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a1b649f38774c391ad85c865ec250b532"> 39</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a1b649f38774c391ad85c865ec250b532">existsSubStream</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *)<span class="keyword"> override</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  }</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a87ffa93dc5c52c9013629e40144e0e2a"> 43</a></span>  librevenge::RVNGInputStream *<a class="code" href="classlibcdr_1_1CDRInternalStream.html#a87ffa93dc5c52c9013629e40144e0e2a">getSubStreamByName</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *)<span class="keyword"> override</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  }</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#af70f27603152587a6e3a3eda4a5b9c4d"> 47</a></span>  librevenge::RVNGInputStream *<a class="code" href="classlibcdr_1_1CDRInternalStream.html#af70f27603152587a6e3a3eda4a5b9c4d">getSubStreamById</a>(<span class="keywordtype">unsigned</span>)<span class="keyword"> override</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  }</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="classlibcdr_1_1CDRInternalStream.html#a3d9884f4f78aad857df5631cb8a31fcd">read</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> numBytes, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> &numBytesRead) <span class="keyword">override</span>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordtype">int</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a827f931eb435af582dfa90b2b33344e4">seek</a>(<span class="keywordtype">long</span> offset, librevenge::RVNG_SEEK_TYPE seekType) <span class="keyword">override</span>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordtype">long</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a35fc428f260951fd57e3dba09c5a94d0">tell</a>() <span class="keyword">override</span>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordtype">bool</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a6214ab741a8c09aa0ff60855d86cf560">isEnd</a>() <span class="keyword">override</span>;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a2ef47c6aa6c4e4775ea44c1d54ca59f0"> 55</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a2ef47c6aa6c4e4775ea44c1d54ca59f0">getSize</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a9a125d6a563eae01560732895f223914">m_buffer</a>.size();</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#aacb34f3d3307bd2541018f3525d4a956"> 61</a></span>  <span class="keyword">volatile</span> <span class="keywordtype">long</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#aacb34f3d3307bd2541018f3525d4a956">m_offset</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classlibcdr_1_1CDRInternalStream.html#a9a125d6a563eae01560732895f223914"> 62</a></span>  std::vector<unsigned char> <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a9a125d6a563eae01560732895f223914">m_buffer</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="classlibcdr_1_1CDRInternalStream.html#a304345f746af676dd661422768b4da0d">CDRInternalStream</a>(<span class="keyword">const</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html">CDRInternalStream</a> &);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="classlibcdr_1_1CDRInternalStream.html">CDRInternalStream</a> &<a class="code" href="classlibcdr_1_1CDRInternalStream.html#a9c97b298c330db4e9aa1b1a804863ab9">operator=</a>(<span class="keyword">const</span> <a class="code" href="classlibcdr_1_1CDRInternalStream.html">CDRInternalStream</a> &);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> };</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> } <span class="comment">// namespace libcdr</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">/* vim:set shiftwidth=2 softtabstop=2 expandtab: */</span></div><div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a506c214b4f1c08f043d07dbf6461b256"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a506c214b4f1c08f043d07dbf6461b256">libcdr::CDRInternalStream::~CDRInternalStream</a></div><div class="ttdeci">~CDRInternalStream() override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:25</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a3d9884f4f78aad857df5631cb8a31fcd"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a3d9884f4f78aad857df5631cb8a31fcd">libcdr::CDRInternalStream::read</a></div><div class="ttdeci">const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.cpp:98</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a4bb34f66a3e30f0713c90aad610cd4b3"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a4bb34f66a3e30f0713c90aad610cd4b3">libcdr::CDRInternalStream::subStreamCount</a></div><div class="ttdeci">unsigned subStreamCount() override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:31</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a87ffa93dc5c52c9013629e40144e0e2a"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a87ffa93dc5c52c9013629e40144e0e2a">libcdr::CDRInternalStream::getSubStreamByName</a></div><div class="ttdeci">librevenge::RVNGInputStream * getSubStreamByName(const char *) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:43</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html">libcdr::CDRInternalStream</a></div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:20</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a304345f746af676dd661422768b4da0d"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a304345f746af676dd661422768b4da0d">libcdr::CDRInternalStream::CDRInternalStream</a></div><div class="ttdeci">CDRInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false)</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.cpp:25</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a2ef47c6aa6c4e4775ea44c1d54ca59f0"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a2ef47c6aa6c4e4775ea44c1d54ca59f0">libcdr::CDRInternalStream::getSize</a></div><div class="ttdeci">unsigned long getSize() const</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:55</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a569062afe43680c2e5711fa561efb3a6"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a569062afe43680c2e5711fa561efb3a6">libcdr::CDRInternalStream::subStreamName</a></div><div class="ttdeci">const char * subStreamName(unsigned) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:35</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a35fc428f260951fd57e3dba09c5a94d0"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a35fc428f260951fd57e3dba09c5a94d0">libcdr::CDRInternalStream::tell</a></div><div class="ttdeci">long tell() override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.cpp:146</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a6214ab741a8c09aa0ff60855d86cf560"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a6214ab741a8c09aa0ff60855d86cf560">libcdr::CDRInternalStream::isEnd</a></div><div class="ttdeci">bool isEnd() override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.cpp:151</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a1b649f38774c391ad85c865ec250b532"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a1b649f38774c391ad85c865ec250b532">libcdr::CDRInternalStream::existsSubStream</a></div><div class="ttdeci">bool existsSubStream(const char *) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:39</div></div> <div class="ttc" id="namespacelibcdr_html"><div class="ttname"><a href="namespacelibcdr.html">libcdr</a></div><div class="ttdef"><b>Definition:</b> CDRCollector.h:24</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a9c97b298c330db4e9aa1b1a804863ab9"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a9c97b298c330db4e9aa1b1a804863ab9">libcdr::CDRInternalStream::operator=</a></div><div class="ttdeci">CDRInternalStream & operator=(const CDRInternalStream &)</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_aacb34f3d3307bd2541018f3525d4a956"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#aacb34f3d3307bd2541018f3525d4a956">libcdr::CDRInternalStream::m_offset</a></div><div class="ttdeci">volatile long m_offset</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:61</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a617ba58f4d9de0c865321c3eb0c3d064"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a617ba58f4d9de0c865321c3eb0c3d064">libcdr::CDRInternalStream::isStructured</a></div><div class="ttdeci">bool isStructured() override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:27</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a9a125d6a563eae01560732895f223914"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a9a125d6a563eae01560732895f223914">libcdr::CDRInternalStream::m_buffer</a></div><div class="ttdeci">std::vector< unsigned char > m_buffer</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:62</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_af70f27603152587a6e3a3eda4a5b9c4d"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#af70f27603152587a6e3a3eda4a5b9c4d">libcdr::CDRInternalStream::getSubStreamById</a></div><div class="ttdeci">librevenge::RVNGInputStream * getSubStreamById(unsigned) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.h:47</div></div> <div class="ttc" id="classlibcdr_1_1CDRInternalStream_html_a827f931eb435af582dfa90b2b33344e4"><div class="ttname"><a href="classlibcdr_1_1CDRInternalStream.html#a827f931eb435af582dfa90b2b33344e4">libcdr::CDRInternalStream::seek</a></div><div class="ttdeci">int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override</div><div class="ttdef"><b>Definition:</b> CDRInternalStream.cpp:123</div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <hr size="1"><address style="align: right;"><small> Generated for libcdr by <a href="http://www.doxygen.org/index.html"> doxygen</a> 1.8.15</small></address> </body> </html>