athena/docs/_memory_reader_8hpp_source.html

281 lines
39 KiB
HTML

<!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.9.1"/>
<title>Athena IO Library: include/Athena/MemoryReader.hpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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">Athena IO Library
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</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">
$(document).ready(function(){initNavTree('_memory_reader_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">MemoryReader.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// This file is part of libAthena.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// libAthena is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// (at your option) any later version.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// libAthena is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// along with libAthena. If not, see &lt;http://www.gnu.org/licenses/&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#ifndef MEMORYREADER_HPP</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#define MEMORYREADER_HPP</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &quot;Athena/IStreamReader.hpp&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_athena.html">Athena</a></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;{</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="keyword">namespace </span>io</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_reader.html"> 35</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_athena_1_1io_1_1_memory_reader.html">MemoryReader</a> : <span class="keyword">public</span> <a class="code" href="class_athena_1_1io_1_1_i_stream_reader.html">IStreamReader</a></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ad972e9efe4923a74b02f2ceb841d9dce">MemoryReader</a>(<span class="keyword">const</span> atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#abdcf5e4548ea7344d22e1dbf2dcd7d83">data</a>, atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a3e148f063ad3d711c6381a85d40930db">length</a>);</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ad972e9efe4923a74b02f2ceb841d9dce">MemoryReader</a>(<span class="keyword">const</span> std::string&amp; filename, std::function&lt;<span class="keywordtype">void</span>(<span class="keywordtype">int</span>)&gt; progressFun = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">virtual</span> ~<a class="code" href="class_athena_1_1io_1_1_memory_reader.html">MemoryReader</a>();</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a0960543340b9df1cd76975efe234dd9e">setEndian</a>(Endian <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a0cf5c666f5693429ca3d3d020b223d66">endian</a>);</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; Endian <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a0cf5c666f5693429ca3d3d020b223d66">endian</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a2f250a5760bbd61bc8ef60365202884e">isBigEndian</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#afaa07e1bb7b271d66f367bd8cf3ad908">isLittleEndian</a>()<span class="keyword">const</span>;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a6c4718abc19e77970e9cc15f9c12520c">isOpen</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a41d152d6c90ff08d0f40aef042cb4485">seek</a>(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_reader.html#aa180f214bd4c1517f54ea70501296c77"> 92</a></span>&#160; <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#aa180f214bd4c1517f54ea70501296c77">seekAlign32</a>() {<a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a41d152d6c90ff08d0f40aef042cb4485">seek</a>(ROUND_UP_32(m_position), SeekOrigin::Begin);}</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#aa922b98037dc3631110c9335be718e8e">atEnd</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a1d9d2fa632816d941d30f90e7a34a1d0">position</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a3e148f063ad3d711c6381a85d40930db">length</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a89f172f63454d80868a3c6091d8b2940">setData</a>(<span class="keyword">const</span> atUint8* data, atUint64 length);</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#abdcf5e4548ea7344d22e1dbf2dcd7d83">data</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a1f415d881086905dd60a30334f1bad21">setFilepath</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a57f341464e6009906ffef16197cedf4c">filepath</a>);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; std::string <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a57f341464e6009906ffef16197cedf4c">filepath</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a83516d32ad00d195dbd2f885e200d405">seekBit</a>(<span class="keywordtype">int</span> bit);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a72605b567c1ae0c4f763154b767f8764">readBit</a>();</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; atInt8 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a52811e54dbc3c423743b17a4c5b27b75">readByte</a>();</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; atUint8 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a07a91fd0a959784cd84f5577dc124a8f">readUByte</a>();</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_reader.html#ab62c46b8b8537ca09c0dc1f0b6926a8a"> 173</a></span>&#160; <span class="keyword">inline</span> atInt8* <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ab62c46b8b8537ca09c0dc1f0b6926a8a">readBytes</a>(atUint64 length) {<span class="keywordflow">return</span> (atInt8*)<a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a323ae4361aa74b3b4bd666eb75974355">readUBytes</a>(length);}</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a323ae4361aa74b3b4bd666eb75974355">readUBytes</a>(atUint64 length);</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; atUint64 readBytesToBuf(<span class="keywordtype">void</span>* buf, atUint64 len) {<span class="keywordflow">return</span> readUBytesToBuf(buf, len);}</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; atUint64 readUBytesToBuf(<span class="keywordtype">void</span>* buf, atUint64 len);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; atInt16 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a7c5b6ada7e4cf96344541f67b1619ffb">readInt16</a>();</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; atUint16 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#adbdebd99576dcce11841255db69393e8">readUint16</a>();</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; atInt32 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ae2df5bdab6cb06a251907edc02778e3a">readInt32</a>();</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; atUint32 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ad331ef1ed1a0e5f8188f20e376600ae1">readUint32</a>();</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; atInt64 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a502e2f723cbbcdb400619c934d30c963">readInt64</a>();</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a2782cabdc43574346d248f0d9a5b0222">readUint64</a>();</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keywordtype">float</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ae1353a410dc8f0972a22e5da82741f5d">readFloat</a>();</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordtype">double</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a3322e270ea116892b784b74434099b8a">readDouble</a>();</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#ae7749643ed83dca84267985000f44359">readBool</a>();</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; std::string <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a00293644a6d68f732938386dc80f81cf">readUnicode</a>(atInt32 maxlen = -1);</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; std::string <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#a89188d0719a0cbe7f8136444e76f3d25">readString</a>(atInt32 maxlen = -1);</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="keywordtype">void</span> setProgressCallback(std::function&lt;<span class="keywordtype">void</span>(<span class="keywordtype">int</span>)&gt; cb);</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="keywordtype">void</span> loadData();</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; atUint8* m_data;</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; atUint64 m_length;</div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_reader.html#adfa77146a3168060b2f26f6bc11c9153"> 290</a></span>&#160; std::string <a class="code" href="class_athena_1_1io_1_1_memory_reader.html#adfa77146a3168060b2f26f6bc11c9153">m_filepath</a>; </div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; atUint64 m_position;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; atUint64 m_bitPosition;</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; Endian m_endian;</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; std::function&lt;void(int)&gt; m_progressCallback;</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;};</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;} <span class="comment">// io</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;} <span class="comment">// Athena</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="preprocessor">#ifndef MEMORYREADER_BASE</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="preprocessor">#define MEMORYREADER_BASE() \</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<span class="preprocessor">private: \</span></div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="preprocessor"> typedef Athena::io::MemoryReader base</span></div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;<span class="preprocessor">#endif // MEMORYREADER_BASE</span></div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;<span class="preprocessor">#endif // MEMORYREADER_HPP</span></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_aa922b98037dc3631110c9335be718e8e"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#aa922b98037dc3631110c9335be718e8e">Athena::io::MemoryReader::atEnd</a></div><div class="ttdeci">bool atEnd() const </div><div class="ttdoc">Returns whether or not the stream is at the end. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a1d9d2fa632816d941d30f90e7a34a1d0"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a1d9d2fa632816d941d30f90e7a34a1d0">Athena::io::MemoryReader::position</a></div><div class="ttdeci">atUint64 position() const </div><div class="ttdoc">Returns the current position in the stream. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a0960543340b9df1cd76975efe234dd9e"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a0960543340b9df1cd76975efe234dd9e">Athena::io::MemoryReader::setEndian</a></div><div class="ttdeci">void setEndian(Endian endian)</div><div class="ttdoc">Sets the Endianss of the stream. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a41d152d6c90ff08d0f40aef042cb4485"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a41d152d6c90ff08d0f40aef042cb4485">Athena::io::MemoryReader::seek</a></div><div class="ttdeci">void seek(atInt64 pos, SeekOrigin origin=SeekOrigin::Current)</div><div class="ttdoc">Sets the buffers position relative to the specified position. It seeks relative to the current posit...</div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_afaa07e1bb7b271d66f367bd8cf3ad908"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#afaa07e1bb7b271d66f367bd8cf3ad908">Athena::io::MemoryReader::isLittleEndian</a></div><div class="ttdeci">bool isLittleEndian() const </div><div class="ttdoc">Returns whether the stream is LittleEndian. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_adbdebd99576dcce11841255db69393e8"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#adbdebd99576dcce11841255db69393e8">Athena::io::MemoryReader::readUint16</a></div><div class="ttdeci">atUint16 readUint16()</div><div class="ttdoc">Reads a Uint16 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a52811e54dbc3c423743b17a4c5b27b75"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a52811e54dbc3c423743b17a4c5b27b75">Athena::io::MemoryReader::readByte</a></div><div class="ttdeci">atInt8 readByte()</div><div class="ttdoc">Reads a byte at the current position and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_aa180f214bd4c1517f54ea70501296c77"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#aa180f214bd4c1517f54ea70501296c77">Athena::io::MemoryReader::seekAlign32</a></div><div class="ttdeci">void seekAlign32()</div><div class="ttdoc">Sets the buffers position relative to the next 32-byte aligned position. </div><div class="ttdef"><b>Definition:</b> <a href="_memory_reader_8hpp_source.html#l00092">MemoryReader.hpp:92</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a323ae4361aa74b3b4bd666eb75974355"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a323ae4361aa74b3b4bd666eb75974355">Athena::io::MemoryReader::readUBytes</a></div><div class="ttdeci">atUint8 * readUBytes(atUint64 length)</div><div class="ttdoc">Reads a byte at the current position and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a3e148f063ad3d711c6381a85d40930db"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a3e148f063ad3d711c6381a85d40930db">Athena::io::MemoryReader::length</a></div><div class="ttdeci">atUint64 length() const </div><div class="ttdoc">Returns whether or not the stream is at the end. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a89188d0719a0cbe7f8136444e76f3d25"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a89188d0719a0cbe7f8136444e76f3d25">Athena::io::MemoryReader::readString</a></div><div class="ttdeci">std::string readString(atInt32 maxlen=-1)</div><div class="ttdoc">Reads a string and advances the position in the file. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a2782cabdc43574346d248f0d9a5b0222"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a2782cabdc43574346d248f0d9a5b0222">Athena::io::MemoryReader::readUint64</a></div><div class="ttdeci">atUint64 readUint64()</div><div class="ttdoc">Reads a Uint64 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_adfa77146a3168060b2f26f6bc11c9153"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#adfa77146a3168060b2f26f6bc11c9153">Athena::io::MemoryReader::m_filepath</a></div><div class="ttdeci">std::string m_filepath</div><div class="ttdoc">Path to the target file. </div><div class="ttdef"><b>Definition:</b> <a href="_memory_reader_8hpp_source.html#l00290">MemoryReader.hpp:290</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a83516d32ad00d195dbd2f885e200d405"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a83516d32ad00d195dbd2f885e200d405">Athena::io::MemoryReader::seekBit</a></div><div class="ttdeci">void seekBit(int bit)</div><div class="ttdoc">Seeks to the specified bit within the current byte. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ad972e9efe4923a74b02f2ceb841d9dce"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ad972e9efe4923a74b02f2ceb841d9dce">Athena::io::MemoryReader::MemoryReader</a></div><div class="ttdeci">MemoryReader(const atUint8 *data, atUint64 length)</div><div class="ttdoc">This constructor takes an existing buffer to read from. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a3322e270ea116892b784b74434099b8a"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a3322e270ea116892b784b74434099b8a">Athena::io::MemoryReader::readDouble</a></div><div class="ttdeci">double readDouble()</div><div class="ttdoc">Reads a double and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ad331ef1ed1a0e5f8188f20e376600ae1"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ad331ef1ed1a0e5f8188f20e376600ae1">Athena::io::MemoryReader::readUint32</a></div><div class="ttdeci">atUint32 readUint32()</div><div class="ttdoc">Reads a Uint32 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a6c4718abc19e77970e9cc15f9c12520c"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a6c4718abc19e77970e9cc15f9c12520c">Athena::io::MemoryReader::isOpen</a></div><div class="ttdeci">bool isOpen() const </div><div class="ttdoc">Retuns whether or not the Stream is open. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a502e2f723cbbcdb400619c934d30c963"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a502e2f723cbbcdb400619c934d30c963">Athena::io::MemoryReader::readInt64</a></div><div class="ttdeci">atInt64 readInt64()</div><div class="ttdoc">Reads a Int64 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_abdcf5e4548ea7344d22e1dbf2dcd7d83"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#abdcf5e4548ea7344d22e1dbf2dcd7d83">Athena::io::MemoryReader::data</a></div><div class="ttdeci">atUint8 * data() const </div><div class="ttdoc">Returns a copy of the current buffer. Changes to the copy do not affect the buffer so it&#39;s perfectly...</div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ae1353a410dc8f0972a22e5da82741f5d"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ae1353a410dc8f0972a22e5da82741f5d">Athena::io::MemoryReader::readFloat</a></div><div class="ttdeci">float readFloat()</div><div class="ttdoc">Reads a float and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a72605b567c1ae0c4f763154b767f8764"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a72605b567c1ae0c4f763154b767f8764">Athena::io::MemoryReader::readBit</a></div><div class="ttdeci">bool readBit()</div><div class="ttdoc">Reads a bit at the current position and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a07a91fd0a959784cd84f5577dc124a8f"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a07a91fd0a959784cd84f5577dc124a8f">Athena::io::MemoryReader::readUByte</a></div><div class="ttdeci">atUint8 readUByte()</div><div class="ttdoc">Reads a byte at the current position and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a1f415d881086905dd60a30334f1bad21"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a1f415d881086905dd60a30334f1bad21">Athena::io::MemoryReader::setFilepath</a></div><div class="ttdeci">void setFilepath(const std::string &amp;filepath)</div><div class="ttdoc">Sets the target file. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ab62c46b8b8537ca09c0dc1f0b6926a8a"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ab62c46b8b8537ca09c0dc1f0b6926a8a">Athena::io::MemoryReader::readBytes</a></div><div class="ttdeci">atInt8 * readBytes(atUint64 length)</div><div class="ttdoc">Reads a byte at the current position and advances the current position. </div><div class="ttdef"><b>Definition:</b> <a href="_memory_reader_8hpp_source.html#l00173">MemoryReader.hpp:173</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a7c5b6ada7e4cf96344541f67b1619ffb"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a7c5b6ada7e4cf96344541f67b1619ffb">Athena::io::MemoryReader::readInt16</a></div><div class="ttdeci">atInt16 readInt16()</div><div class="ttdoc">Reads a Int16 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html">Athena::io::MemoryReader</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_reader_8hpp_source.html#l00035">MemoryReader.hpp:35</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a2f250a5760bbd61bc8ef60365202884e"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a2f250a5760bbd61bc8ef60365202884e">Athena::io::MemoryReader::isBigEndian</a></div><div class="ttdeci">bool isBigEndian() const </div><div class="ttdoc">Returns whether the stream is BigEndian. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ae7749643ed83dca84267985000f44359"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ae7749643ed83dca84267985000f44359">Athena::io::MemoryReader::readBool</a></div><div class="ttdeci">bool readBool()</div><div class="ttdoc">Reads a bool and advances the current position. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a0cf5c666f5693429ca3d3d020b223d66"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a0cf5c666f5693429ca3d3d020b223d66">Athena::io::MemoryReader::endian</a></div><div class="ttdeci">Endian endian() const </div><div class="ttdoc">Returns the current Endianness of the stream. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_i_stream_reader_html"><div class="ttname"><a href="class_athena_1_1io_1_1_i_stream_reader.html">Athena::io::IStreamReader</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_stream_reader_8hpp_source.html#l00010">IStreamReader.hpp:10</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_ae2df5bdab6cb06a251907edc02778e3a"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#ae2df5bdab6cb06a251907edc02778e3a">Athena::io::MemoryReader::readInt32</a></div><div class="ttdeci">atInt32 readInt32()</div><div class="ttdoc">Reads a Int32 and swaps to proper endianness depending on platform and Stream settings, and advances the current position. </div></div>
<div class="ttc" id="namespace_athena_html"><div class="ttname"><a href="namespace_athena.html">Athena</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_l_t_t_p_enums_8hpp_source.html#l00023">ALTTPEnums.hpp:23</a></div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a57f341464e6009906ffef16197cedf4c"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a57f341464e6009906ffef16197cedf4c">Athena::io::MemoryReader::filepath</a></div><div class="ttdeci">std::string filepath() const </div><div class="ttdoc">Returns the target file. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a00293644a6d68f732938386dc80f81cf"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a00293644a6d68f732938386dc80f81cf">Athena::io::MemoryReader::readUnicode</a></div><div class="ttdeci">std::string readUnicode(atInt32 maxlen=-1)</div><div class="ttdoc">Reads a Unicode string and advances the position in the file. </div></div>
<div class="ttc" id="class_athena_1_1io_1_1_memory_reader_html_a89f172f63454d80868a3c6091d8b2940"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_reader.html#a89f172f63454d80868a3c6091d8b2940">Athena::io::MemoryReader::setData</a></div><div class="ttdeci">void setData(const atUint8 *data, atUint64 length)</div><div class="ttdoc">Sets the buffer to the given one, deleting the current one. BEWARE: As this deletes the current buff...</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_36438bcfc3b83360d27b8f0de6102cf6.html">Athena</a></li><li class="navelem"><b>MemoryReader.hpp</b></li>
<li class="footer">Generated on Thu May 21 2015 01:59:39 for Athena IO Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
</ul>
</div>
</body>
</html>