shaka-packager/docs/de/dad/classshaka_1_1MemoryFile.html

493 lines
34 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
2018-02-10 23:37:42 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Shaka Packager SDK: shaka::MemoryFile Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
2018-02-10 23:37:42 +00:00
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
2018-02-10 23:37:42 +00:00
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Shaka Packager SDK
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license-end */
</script>
2018-02-10 23:37:42 +00:00
<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&amp;dn=gpl-2.0.txt GPL-v2 */
2018-02-10 23:37:42 +00:00
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
2018-02-10 23:37:42 +00:00
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
2018-02-10 23:37:42 +00:00
</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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../d8/daf/namespaceshaka.html">shaka</a></li><li class="navelem"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html">MemoryFile</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="../../db/d1b/classshaka_1_1MemoryFile-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::MemoryFile Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="../../db/da6/memory__file_8h_source.html">memory_file.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for shaka::MemoryFile:</div>
<div class="dyncontent">
<div class="center">
<img src="../../de/dad/classshaka_1_1MemoryFile.png" usemap="#shaka::MemoryFile_map" alt=""/>
<map id="shaka::MemoryFile_map" name="shaka::MemoryFile_map">
<area href="../../d3/d73/classshaka_1_1File.html" title="Define an abstract file interface." alt="shaka::File" shape="rect" coords="0,0,118,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a30cc27e1aa0e1f921be40e2126d3089f"><td class="memItemLeft" align="right" valign="top"><a id="a30cc27e1aa0e1f921be40e2126d3089f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MemoryFile</b> (const std::string &amp;<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, const std::string &amp;mode)</td></tr>
<tr class="separator:a30cc27e1aa0e1f921be40e2126d3089f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">File implementation overrides.</div></td></tr>
<tr class="memitem:a4cfe38684f4fdde650a2ed7fdc780f05"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#a4cfe38684f4fdde650a2ed7fdc780f05">Close</a> () override</td></tr>
<tr class="separator:a4cfe38684f4fdde650a2ed7fdc780f05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeacb3b7f72e0c412bd0cba8a6f1ed62f"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#aeacb3b7f72e0c412bd0cba8a6f1ed62f">Read</a> (void *buffer, uint64_t length) override</td></tr>
<tr class="separator:aeacb3b7f72e0c412bd0cba8a6f1ed62f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3d9455b7bc9d1c44d58ab39bd8bd27c"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#aa3d9455b7bc9d1c44d58ab39bd8bd27c">Write</a> (const void *buffer, uint64_t length) override</td></tr>
<tr class="separator:aa3d9455b7bc9d1c44d58ab39bd8bd27c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a151634866be009cf0eb10e783432d5cb"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#a151634866be009cf0eb10e783432d5cb">Size</a> () override</td></tr>
<tr class="separator:a151634866be009cf0eb10e783432d5cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecf76d1658ea5f088ef1e42f04b9b64d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#aecf76d1658ea5f088ef1e42f04b9b64d">Flush</a> () override</td></tr>
<tr class="separator:aecf76d1658ea5f088ef1e42f04b9b64d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e3bffa9859fdcb7c28c20a15e2d3e98"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#a0e3bffa9859fdcb7c28c20a15e2d3e98">Seek</a> (uint64_t position) override</td></tr>
<tr class="separator:a0e3bffa9859fdcb7c28c20a15e2d3e98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dfdba703861d211e7111612f5ac029c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#a4dfdba703861d211e7111612f5ac029c">Tell</a> (uint64_t *position) override</td></tr>
<tr class="separator:a4dfdba703861d211e7111612f5ac029c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a4b06e08bb0295cb89fca45f9356ecbae inherit pub_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a> () const</td></tr>
<tr class="separator:a4b06e08bb0295cb89fca45f9356ecbae inherit pub_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:acd947572c2bbe3595b403a483c82e899"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#acd947572c2bbe3595b403a483c82e899">DeleteAll</a> ()</td></tr>
<tr class="separator:acd947572c2bbe3595b403a483c82e899"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a3ac9c9e8e3a31ef8f70a904384f89bed"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#a3ac9c9e8e3a31ef8f70a904384f89bed">Delete</a> (const std::string &amp;<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>)</td></tr>
<tr class="separator:a3ac9c9e8e3a31ef8f70a904384f89bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:ac7b5143f9b8c3e786762fe4ada2b8dcf inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac7b5143f9b8c3e786762fe4ada2b8dcf">Open</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, const char *mode)</td></tr>
<tr class="separator:ac7b5143f9b8c3e786762fe4ada2b8dcf inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a0a50526352bd6e946c4f33d3e8431b2d inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a0a50526352bd6e946c4f33d3e8431b2d">OpenWithNoBuffering</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, const char *mode)</td></tr>
<tr class="separator:a0a50526352bd6e946c4f33d3e8431b2d inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a383c9f670511961f334569fd1a7a103b inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b">Delete</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>)</td></tr>
<tr class="separator:a383c9f670511961f334569fd1a7a103b inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:ac978d5c0585850d4d9948fdf39b33292 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac978d5c0585850d4d9948fdf39b33292">GetFileSize</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>)</td></tr>
<tr class="separator:ac978d5c0585850d4d9948fdf39b33292 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:ac9a19cb5fc45664ca440996bf1201c30 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ac9a19cb5fc45664ca440996bf1201c30">ReadFileToString</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, std::string *contents)</td></tr>
<tr class="separator:ac9a19cb5fc45664ca440996bf1201c30 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a483ce187d628385d342748315d72f8ab inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a483ce187d628385d342748315d72f8ab">WriteStringToFile</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, const std::string &amp;contents)</td></tr>
<tr class="separator:a483ce187d628385d342748315d72f8ab inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a4b5280fe058359b5991037f90dde2b77 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b5280fe058359b5991037f90dde2b77">WriteFileAtomically</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>, const std::string &amp;contents)</td></tr>
<tr class="separator:a4b5280fe058359b5991037f90dde2b77 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2cbec5c6dc1c97ada010acd83b9728a inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#af2cbec5c6dc1c97ada010acd83b9728a">Copy</a> (const char *from_file_name, const char *to_file_name)</td></tr>
<tr class="separator:af2cbec5c6dc1c97ada010acd83b9728a inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85633ec9f051eb9f32b07ff7e7740d1c inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c">CopyFile</a> (<a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *source, <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *destination)</td></tr>
<tr class="separator:a85633ec9f051eb9f32b07ff7e7740d1c inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07e2d2f98597320f71fb96dff74cfcb2 inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a07e2d2f98597320f71fb96dff74cfcb2">CopyFile</a> (<a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *source, <a class="el" href="../../d3/d73/classshaka_1_1File.html">File</a> *destination, int64_t max_copy)</td></tr>
<tr class="separator:a07e2d2f98597320f71fb96dff74cfcb2 inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8eb71689f5456ba0b1a401c57386caaf inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a8eb71689f5456ba0b1a401c57386caaf">IsLocalRegularFile</a> (const char *<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>)</td></tr>
<tr class="separator:a8eb71689f5456ba0b1a401c57386caaf inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a90ebd27f7728a7075cf3ba97396cae inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a7a90ebd27f7728a7075cf3ba97396cae">MakeCallbackFileName</a> (const <a class="el" href="../../d9/da8/structshaka_1_1BufferCallbackParams.html">BufferCallbackParams</a> &amp;callback_params, const std::string &amp;name)</td></tr>
<tr class="separator:a7a90ebd27f7728a7075cf3ba97396cae inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae87642f9661588e47479721cd101bf7d inherit pub_static_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#ae87642f9661588e47479721cd101bf7d">ParseCallbackFileName</a> (const std::string &amp;callback_file_name, const <a class="el" href="../../d9/da8/structshaka_1_1BufferCallbackParams.html">BufferCallbackParams</a> **callback_params, std::string *name)</td></tr>
<tr class="separator:ae87642f9661588e47479721cd101bf7d inherit pub_static_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:adcfb56e702dcee156b4b103180134241"><td class="memItemLeft" align="right" valign="top"><a id="adcfb56e702dcee156b4b103180134241"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#adcfb56e702dcee156b4b103180134241">Open</a> () override</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memdesc:adcfb56e702dcee156b4b103180134241"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal open. Should not be used directly. <br /></td></tr>
<tr class="separator:adcfb56e702dcee156b4b103180134241"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classshaka_1_1File"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classshaka_1_1File')"><img src="../../closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a33ead01d4090de618937d4e989a9f27f inherit pro_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top"><a id="a33ead01d4090de618937d4e989a9f27f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>File</b> (const std::string &amp;<a class="el" href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">file_name</a>)</td></tr>
<tr class="separator:a33ead01d4090de618937d4e989a9f27f inherit pro_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d1a67d1560a5290eb36447c50fabf9 inherit pro_methods_classshaka_1_1File"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9">~File</a> ()</td></tr>
<tr class="separator:a92d1a67d1560a5290eb36447c50fabf9 inherit pro_methods_classshaka_1_1File"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implements a <a class="el" href="../../d3/d73/classshaka_1_1File.html" title="Define an abstract file interface.">File</a> that is stored in memory. This should be only used for testing, since this does not support larger files. </p>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../db/da6/memory__file_8h_source.html#l00021">21</a> of file <a class="el" href="../../db/da6/memory__file_8h_source.html">memory_file.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
2018-02-10 23:37:42 +00:00
<a id="a4cfe38684f4fdde650a2ed7fdc780f05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4cfe38684f4fdde650a2ed7fdc780f05">&#9670;&nbsp;</a></span>Close()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool shaka::MemoryFile::Close </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html#aecf76d1658ea5f088ef1e42f04b9b64d">Flush()</a> and de-allocate resources associated with this file, and delete this <a class="el" href="../../d3/d73/classshaka_1_1File.html" title="Define an abstract file interface.">File</a> object. THIS IS THE ONE TRUE WAY TO DEALLOCATE THIS OBJECT. </p><dl class="section return"><dt>Returns</dt><dd>true on success. For writable files, returning false MAY INDICATE DATA LOSS. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00118">118</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a3ac9c9e8e3a31ef8f70a904384f89bed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ac9c9e8e3a31ef8f70a904384f89bed">&#9670;&nbsp;</a></span>Delete()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void shaka::MemoryFile::Delete </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>file_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes the memory file data with the given file_name. Any objects open with that file name will be in an undefined state. </p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00190">190</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="acd947572c2bbe3595b403a483c82e899"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd947572c2bbe3595b403a483c82e899">&#9670;&nbsp;</a></span>DeleteAll()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void shaka::MemoryFile::DeleteAll </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes all memory file data created. This assumes that there are no <a class="el" href="../../de/dad/classshaka_1_1MemoryFile.html">MemoryFile</a> objects alive. Any alive objects will be in an undefined state. </p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00186">186</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="aecf76d1658ea5f088ef1e42f04b9b64d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecf76d1658ea5f088ef1e42f04b9b64d">&#9670;&nbsp;</a></span>Flush()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool shaka::MemoryFile::Flush </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Flush the file so that recently written data will survive an application crash (but not necessarily an OS crash). For instance, in <a class="el" href="../../d7/dbd/classshaka_1_1LocalFile.html" title="Implement LocalFile which deals with local storage.">LocalFile</a> the data is flushed into the OS but not necessarily to disk. </p><dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00160">160</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="aeacb3b7f72e0c412bd0cba8a6f1ed62f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeacb3b7f72e0c412bd0cba8a6f1ed62f">&#9670;&nbsp;</a></span>Read()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t shaka::MemoryFile::Read </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2018-02-10 23:37:42 +00:00
<p>Read data and return it in buffer. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>points to a block of memory with a size of at least <em>length</em> bytes. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">length</td><td>indicates number of bytes to be read. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes read, or a value &lt; 0 on error. Zero on end-of-file, or if 'length' is zero. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00125">125</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a0e3bffa9859fdcb7c28c20a15e2d3e98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e3bffa9859fdcb7c28c20a15e2d3e98">&#9670;&nbsp;</a></span>Seek()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool shaka::MemoryFile::Seek </td>
<td>(</td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>position</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2018-02-10 23:37:42 +00:00
<p>Seek to the specifield position in the file. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">position</td><td>is the position to seek to. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00164">164</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a151634866be009cf0eb10e783432d5cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a151634866be009cf0eb10e783432d5cb">&#9670;&nbsp;</a></span>Size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t shaka::MemoryFile::Size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Size of the file in bytes. A return value less than zero indicates a problem getting the size. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00155">155</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a4dfdba703861d211e7111612f5ac029c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dfdba703861d211e7111612f5ac029c">&#9670;&nbsp;</a></span>Tell()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool shaka::MemoryFile::Tell </td>
<td>(</td>
<td class="paramtype">uint64_t *&#160;</td>
<td class="paramname"><em>position</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2018-02-10 23:37:42 +00:00
<p>Get the current file position. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">position</td><td>is a pointer to contain the current file position upon successful return. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on succcess, false otherwise. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00172">172</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="aa3d9455b7bc9d1c44d58ab39bd8bd27c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3d9455b7bc9d1c44d58ab39bd8bd27c">&#9670;&nbsp;</a></span>Write()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t shaka::MemoryFile::Write </td>
<td>(</td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2018-02-10 23:37:42 +00:00
<p>Write block of data. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">buffer</td><td>points to a block of memory with at least <em>length</em> bytes. </td></tr>
<tr><td class="paramname">length</td><td>indicates number of bytes to write. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes written, or a value &lt; 0 on error. </dd></dl>
<p>Implements <a class="el" href="../../d3/d73/classshaka_1_1File.html#a8c498531ecbd205fceb0be3478361801">shaka::File</a>.</p>
2018-08-16 00:35:22 +00:00
<p class="definition">Definition at line <a class="el" href="../../dd/d87/memory__file_8cc_source.html#l00137">137</a> of file <a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>packager/file/<a class="el" href="../../db/da6/memory__file_8h_source.html">memory_file.h</a></li>
<li>packager/file/<a class="el" href="../../dd/d87/memory__file_8cc_source.html">memory_file.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 9 2021 21:00:12 for Shaka Packager SDK by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>