mirror of
https://github.com/libAthena/athena.git
synced 2025-08-26 21:45:46 +00:00
286 lines
41 KiB
HTML
286 lines
41 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/MemoryWriter.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 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 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_writer_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">MemoryWriter.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// This file is part of libAthena.</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">// 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> <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> <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> <span class="comment">// (at your option) any later version.</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <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> <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> <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> <span class="comment">// GNU General Public License for more details.</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <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> <span class="comment">// along with libAthena. If not, see <http://www.gnu.org/licenses/></span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#ifndef MEMORYWRITER_HPP</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#define MEMORYWRITER_HPP</span></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> <span class="preprocessor">#include "Athena/IStreamWriter.hpp"</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <string></span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <functional></span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <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> {</div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">namespace </span>io</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_writer.html"> 36</a></span> <span class="keyword">class </span><a class="code" href="class_athena_1_1io_1_1_memory_writer.html">MemoryWriter</a> : <span class="keyword">public</span> <a class="code" href="class_athena_1_1io_1_1_i_stream_writer.html">IStreamWriter</a></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">explicit</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a35c1d2edf6366bfdfe7d19e550903478">MemoryWriter</a>(atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">data</a> = <span class="keyword">nullptr</span>, atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">length</a> = 0x10);</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a35c1d2edf6366bfdfe7d19e550903478">MemoryWriter</a>(<span class="keyword">const</span> std::string& filename, std::function<<span class="keywordtype">void</span>(<span class="keywordtype">int</span>)> progressFun = <span class="keyword">nullptr</span>);</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">virtual</span> ~<a class="code" href="class_athena_1_1io_1_1_memory_writer.html">MemoryWriter</a>();</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#aba582443e654563da612952340b6ed44">setEndian</a>(Endian <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a6ef02e88da9a1a04c963f52c20bb26a0">endian</a>);</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  Endian <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a6ef02e88da9a1a04c963f52c20bb26a0">endian</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a4bbb9bef1edf4ca5be5565e935ce0298">isBigEndian</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a5a8957ed313172ee0899acef0106d0b5">isLittleEndian</a>()<span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ab089d9124731afffadf0e06c64756cc5">isOpen</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a5957d982141ded294e38d83c98485048">seek</a>(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_writer.html#a2a338ae6478f614c6b14b2241c5ac10c"> 93</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a2a338ae6478f614c6b14b2241c5ac10c">seekAlign32</a>() {<a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a5957d982141ded294e38d83c98485048">seek</a>(ROUND_UP_32(m_position), SeekOrigin::Begin);}</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">bool</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a95718e1d031ea41924fa239e81ae516b">atEnd</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a855af0123e2f18c7d1ebe23699079c78">position</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">length</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#afd352a08ad88562d6cf00bcbdb1b24f8">setData</a>(<span class="keyword">const</span> atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">data</a>, atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">length</a>);</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">data</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#aa9fbd017d744786b0f4aa5c987dbfe55">setFilepath</a>(<span class="keyword">const</span> std::string& <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ad2bb5d48bd85561af0ea2069ed14c9b7">filepath</a>);</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  std::string <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ad2bb5d48bd85561af0ea2069ed14c9b7">filepath</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#abc39ece257c97707017c20251e9e5ce7">save</a>(<span class="keyword">const</span> std::string& filename = <span class="stringliteral">""</span>);</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a722aea14169704ec0a88a67a29771b19">seekBit</a>(<span class="keywordtype">int</span> bit);</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ab45fad5cc2894613beb3441c5c2134ab">writeBit</a>(<span class="keywordtype">bool</span> val);</div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a22e44276756c672d7a5e6529198a1e24">writeUByte</a>(atUint8 val);</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#aad1df56cdec64ffb19e532baa5543c77">writeByte</a>(atInt8 val);</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a7cb0bdab5efa97a103e300365cae219d">writeUBytes</a>(atUint8* <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">data</a>, atUint64 len);</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a38833e7b0f0f9247cc55a6498e7303f2">writeBytes</a>(atInt8* <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">data</a>, atUint64 len);</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a18137cc5f21dec7a234d0829c9c25655">writeInt16</a>(atInt16 val);</div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> </div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#af8cec2a5cb206a3ee0de65781d807e59">writeUint16</a>(atUint16);</div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ad73afb9bf9f1cfeb60042c4c948582c9">writeInt32</a>(atInt32);</div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a32e6f5d07962ff7a01ac975af2e86f41">writeUint32</a>(atUint32);</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#aa889ff61fd82678ca07dc52f9d57a118">writeInt64</a>(atInt64);</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a5e308dde27c7a1524b2a03084278278c">writeUint64</a>(atUint64);</div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> </div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a7769e996c5ef209110225fad1a07e6c4">writeFloat</a>(<span class="keywordtype">float</span>);</div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> </div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#abdee570cca032c838507f282a0478110">writeDouble</a>(<span class="keywordtype">double</span>);</div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a56170d8f4f94e96ccf7f14a44949d147">writeBool</a>(<span class="keywordtype">bool</span>);</div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> </div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#aea541b7084b08b7d2bf7d8bdebd4fc37">writeUnicode</a>(<span class="keyword">const</span> std::string& str);</div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">void</span> <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a14e57ca951f30927ebaf2552fd6a922b">writeString</a>(<span class="keyword">const</span> std::string& str);</div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span> </div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordtype">void</span> fill(atUint8 val, atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">length</a>);</div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordtype">void</span> fill(atInt8 val, atUint64 <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">length</a>);</div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span> </div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordtype">void</span> setProgressCallback(std::function<<span class="keywordtype">void</span>(<span class="keywordtype">int</span>)> cb);</div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordtype">void</span> loadData();</div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  atUint8* m_data;</div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  atUint64 m_length;</div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="class_athena_1_1io_1_1_memory_writer.html#a762d2d5e0bbc1322cacf2625dc11afd8"> 287</a></span>  std::string <a class="code" href="class_athena_1_1io_1_1_memory_writer.html#a762d2d5e0bbc1322cacf2625dc11afd8">m_filepath</a>; </div>
|
|
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  atUint64 m_position;</div>
|
|
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  atUint64 m_bitPosition;</div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  Endian m_endian;</div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  std::function<void(int)> m_progressCallback;</div>
|
|
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordtype">void</span> resize(atUint64 newSize);</div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span> };</div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span> }</div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span> }</div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span> <span class="preprocessor">#ifndef MEMORYWRITER_BASE</span></div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="preprocessor">#define MEMORYWRITER_BASE() \</span></div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <span class="preprocessor"> private: \</span></div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="preprocessor"> typedef Athena::io::MemoryWriter base</span></div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="preprocessor">#endif // BINARYWRITER_BASE</span></div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span> <span class="preprocessor">#endif // MEMORYWRITER_HPP</span></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a56170d8f4f94e96ccf7f14a44949d147"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a56170d8f4f94e96ccf7f14a44949d147">Athena::io::MemoryWriter::writeBool</a></div><div class="ttdeci">void writeBool(bool)</div><div class="ttdoc">Writes an bool to the buffer and advances the buffer. It also swaps the bytes depending on the platfo...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_aba582443e654563da612952340b6ed44"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#aba582443e654563da612952340b6ed44">Athena::io::MemoryWriter::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_writer_html_afd352a08ad88562d6cf00bcbdb1b24f8"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#afd352a08ad88562d6cf00bcbdb1b24f8">Athena::io::MemoryWriter::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 class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a95718e1d031ea41924fa239e81ae516b"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a95718e1d031ea41924fa239e81ae516b">Athena::io::MemoryWriter::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_writer_html_a6ef02e88da9a1a04c963f52c20bb26a0"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a6ef02e88da9a1a04c963f52c20bb26a0">Athena::io::MemoryWriter::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_memory_writer_html_ad2bb5d48bd85561af0ea2069ed14c9b7"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#ad2bb5d48bd85561af0ea2069ed14c9b7">Athena::io::MemoryWriter::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_i_stream_writer_html"><div class="ttname"><a href="class_athena_1_1io_1_1_i_stream_writer.html">Athena::io::IStreamWriter</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_stream_writer_8hpp_source.html#l00010">IStreamWriter.hpp:10</a></div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_abc39ece257c97707017c20251e9e5ce7"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#abc39ece257c97707017c20251e9e5ce7">Athena::io::MemoryWriter::save</a></div><div class="ttdeci">void save(const std::string &filename="")</div><div class="ttdoc">Saves the file to the specified file. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a4bbb9bef1edf4ca5be5565e935ce0298"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a4bbb9bef1edf4ca5be5565e935ce0298">Athena::io::MemoryWriter::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_writer_html_a5e308dde27c7a1524b2a03084278278c"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a5e308dde27c7a1524b2a03084278278c">Athena::io::MemoryWriter::writeUint64</a></div><div class="ttdeci">void writeUint64(atUint64)</div><div class="ttdoc">Writes an Uint64 to the buffer and advances the buffer. It also swaps the bytes depending on the plat...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a2a338ae6478f614c6b14b2241c5ac10c"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a2a338ae6478f614c6b14b2241c5ac10c">Athena::io::MemoryWriter::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_writer_8hpp_source.html#l00093">MemoryWriter.hpp:93</a></div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_aa9fbd017d744786b0f4aa5c987dbfe55"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#aa9fbd017d744786b0f4aa5c987dbfe55">Athena::io::MemoryWriter::setFilepath</a></div><div class="ttdeci">void setFilepath(const std::string &filepath)</div><div class="ttdoc">Sets the target file. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_aea541b7084b08b7d2bf7d8bdebd4fc37"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#aea541b7084b08b7d2bf7d8bdebd4fc37">Athena::io::MemoryWriter::writeUnicode</a></div><div class="ttdeci">void writeUnicode(const std::string &str)</div><div class="ttdoc">Writes an unicode string to the buffer and advances the buffer. It also swaps the bytes depending on ...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_ad73afb9bf9f1cfeb60042c4c948582c9"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#ad73afb9bf9f1cfeb60042c4c948582c9">Athena::io::MemoryWriter::writeInt32</a></div><div class="ttdeci">void writeInt32(atInt32)</div><div class="ttdoc">Writes an Int32 to the buffer and advances the buffer. It also swaps the bytes depending on the platf...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a5a8957ed313172ee0899acef0106d0b5"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a5a8957ed313172ee0899acef0106d0b5">Athena::io::MemoryWriter::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_writer_html_a5957d982141ded294e38d83c98485048"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a5957d982141ded294e38d83c98485048">Athena::io::MemoryWriter::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_writer_html_a38833e7b0f0f9247cc55a6498e7303f2"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a38833e7b0f0f9247cc55a6498e7303f2">Athena::io::MemoryWriter::writeBytes</a></div><div class="ttdeci">void writeBytes(atInt8 *data, atUint64 len)</div><div class="ttdoc">Writes the given buffer with the specified length, buffers can be bigger than the length however it's...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a22e44276756c672d7a5e6529198a1e24"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a22e44276756c672d7a5e6529198a1e24">Athena::io::MemoryWriter::writeUByte</a></div><div class="ttdeci">void writeUByte(atUint8 val)</div><div class="ttdoc">Writes a byte at the current position and advances the position by one byte. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_ac971745b70a796b1747a81fff1de5257"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#ac971745b70a796b1747a81fff1de5257">Athena::io::MemoryWriter::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_writer_html_a7cb0bdab5efa97a103e300365cae219d"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a7cb0bdab5efa97a103e300365cae219d">Athena::io::MemoryWriter::writeUBytes</a></div><div class="ttdeci">void writeUBytes(atUint8 *data, atUint64 len)</div><div class="ttdoc">Writes the given buffer with the specified length, buffers can be bigger than the length however it's...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a18137cc5f21dec7a234d0829c9c25655"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a18137cc5f21dec7a234d0829c9c25655">Athena::io::MemoryWriter::writeInt16</a></div><div class="ttdeci">void writeInt16(atInt16 val)</div><div class="ttdoc">Writes an Int16 to the buffer and advances the buffer. It also swaps the bytes depending on the platf...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a7769e996c5ef209110225fad1a07e6c4"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a7769e996c5ef209110225fad1a07e6c4">Athena::io::MemoryWriter::writeFloat</a></div><div class="ttdeci">void writeFloat(float)</div><div class="ttdoc">Writes an float to the buffer and advances the buffer. It also swaps the bytes depending on the platf...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_aa889ff61fd82678ca07dc52f9d57a118"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#aa889ff61fd82678ca07dc52f9d57a118">Athena::io::MemoryWriter::writeInt64</a></div><div class="ttdeci">void writeInt64(atInt64)</div><div class="ttdoc">Writes an Int64 to the buffer and advances the buffer. It also swaps the bytes depending on the platf...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a32e6f5d07962ff7a01ac975af2e86f41"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a32e6f5d07962ff7a01ac975af2e86f41">Athena::io::MemoryWriter::writeUint32</a></div><div class="ttdeci">void writeUint32(atUint32)</div><div class="ttdoc">Writes an Uint32 to the buffer and advances the buffer. It also swaps the bytes depending on the plat...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html">Athena::io::MemoryWriter</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_writer_8hpp_source.html#l00036">MemoryWriter.hpp:36</a></div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_ab089d9124731afffadf0e06c64756cc5"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#ab089d9124731afffadf0e06c64756cc5">Athena::io::MemoryWriter::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_writer_html_a855af0123e2f18c7d1ebe23699079c78"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a855af0123e2f18c7d1ebe23699079c78">Athena::io::MemoryWriter::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_writer_html_ab45fad5cc2894613beb3441c5c2134ab"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#ab45fad5cc2894613beb3441c5c2134ab">Athena::io::MemoryWriter::writeBit</a></div><div class="ttdeci">void writeBit(bool val)</div><div class="ttdoc">Writes a bit at the current position and advances the position by one bit. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_accd127e370fb1bb89d19bb96c90dfa76"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#accd127e370fb1bb89d19bb96c90dfa76">Athena::io::MemoryWriter::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's perfectly...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_af8cec2a5cb206a3ee0de65781d807e59"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#af8cec2a5cb206a3ee0de65781d807e59">Athena::io::MemoryWriter::writeUint16</a></div><div class="ttdeci">void writeUint16(atUint16)</div><div class="ttdoc">Writes an Uint16 to the buffer and advances the buffer. It also swaps the bytes depending on the plat...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a14e57ca951f30927ebaf2552fd6a922b"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a14e57ca951f30927ebaf2552fd6a922b">Athena::io::MemoryWriter::writeString</a></div><div class="ttdeci">void writeString(const std::string &str)</div><div class="ttdoc">Writes an string to the buffer and advances the buffer. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a722aea14169704ec0a88a67a29771b19"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a722aea14169704ec0a88a67a29771b19">Athena::io::MemoryWriter::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="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_writer_html_abdee570cca032c838507f282a0478110"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#abdee570cca032c838507f282a0478110">Athena::io::MemoryWriter::writeDouble</a></div><div class="ttdeci">void writeDouble(double)</div><div class="ttdoc">Writes an double to the buffer and advances the buffer. It also swaps the bytes depending on the plat...</div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a35c1d2edf6366bfdfe7d19e550903478"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a35c1d2edf6366bfdfe7d19e550903478">Athena::io::MemoryWriter::MemoryWriter</a></div><div class="ttdeci">MemoryWriter(atUint8 *data=nullptr, atUint64 length=0x10)</div><div class="ttdoc">This constructor takes an existing buffer to write to. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_aad1df56cdec64ffb19e532baa5543c77"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#aad1df56cdec64ffb19e532baa5543c77">Athena::io::MemoryWriter::writeByte</a></div><div class="ttdeci">void writeByte(atInt8 val)</div><div class="ttdoc">Writes a byte at the current position and advances the position by one byte. </div></div>
|
|
<div class="ttc" id="class_athena_1_1io_1_1_memory_writer_html_a762d2d5e0bbc1322cacf2625dc11afd8"><div class="ttname"><a href="class_athena_1_1io_1_1_memory_writer.html#a762d2d5e0bbc1322cacf2625dc11afd8">Athena::io::MemoryWriter::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_writer_8hpp_source.html#l00287">MemoryWriter.hpp:287</a></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>MemoryWriter.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>
|