mirror of
https://github.com/CDevJoud/Minecraft-Community-Edition.git
synced 2026-07-16 15:50:55 +00:00
290 lines
16 KiB
HTML
290 lines
16 KiB
HTML
<!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" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.16.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Minecraft Community Edition: mce::VirtualFileSystem Class Reference</title>
|
|
<link rel="icon" href="logo channel.png" type="image/x-icon" />
|
|
<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>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></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>
|
|
<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 id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">Minecraft Community Edition<span id="projectnumber"> 0.1.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.16.1 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(function() { codefold.init(); });
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function(){initNavTree('classmce_1_1_virtual_file_system.html','','classmce_1_1_virtual_file_system-members'); });
|
|
</script>
|
|
<div id="container">
|
|
<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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">mce::VirtualFileSystem Class Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p><a class="el" href="classmce_1_1_virtual_file_system.html" title="VirtualFileSystem manages a collection of files referenced by tags.">VirtualFileSystem</a> manages a collection of files referenced by tags.
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="_virtual_file_system_8hpp_source.html">VirtualFileSystem.hpp</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-nested-classes" class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:Version" id="r_Version"><td class="memItemLeft">union  </td><td class="memItemRight"><a class="el" href="unionmce_1_1_virtual_file_system_1_1_version.html">Version</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="unionmce_1_1_virtual_file_system_1_1_version.html" title="Version information for the virtual file system format.">Version</a> information for the virtual file system format. <a href="unionmce_1_1_virtual_file_system_1_1_version.html#details">More...</a><br /></td></tr>
|
|
<tr class="memitem:Config" id="r_Config"><td class="memItemLeft">struct  </td><td class="memItemRight"><a class="el" href="structmce_1_1_virtual_file_system_1_1_config.html">Config</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Configuration for how the <a class="el" href="classmce_1_1_virtual_file_system.html" title="VirtualFileSystem manages a collection of files referenced by tags.">VirtualFileSystem</a> should operate. <a href="structmce_1_1_virtual_file_system_1_1_config.html#details">More...</a><br /></td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-pub-types" class="groupheader"><a id="pub-types" name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:a7dc8dab11792813b017afe1e75888726" id="r_a7dc8dab11792813b017afe1e75888726"><td class="memItemLeft">enum  </td><td class="memItemRight"><a class="el" href="#a7dc8dab11792813b017afe1e75888726">FileBinaryType</a> : unsigned char { <a class="el" href="#a7dc8dab11792813b017afe1e75888726af4117d29bc8623330732b880e03c422b">NONE</a> = 0
|
|
, <a class="el" href="#a7dc8dab11792813b017afe1e75888726a9f4b2e54fa9d67e203bf38f78d0ff067">ASSETS_FILE</a> = 1
|
|
, <a class="el" href="#a7dc8dab11792813b017afe1e75888726a7c98cab84fc00353d5d242cfa5c257d4">SOURCE_FILE</a> = 2
|
|
, <a class="el" href="#a7dc8dab11792813b017afe1e75888726ad7dc87fe0ad41cd2d441e509c81ea486">WORLD_FILE</a> = 4
|
|
}</td></tr>
|
|
<tr class="memdesc:a7dc8dab11792813b017afe1e75888726"><td class="mdescLeft"> </td><td class="mdescRight">Types of virtual file collections that can be stored in a VFS file. <a href="#a7dc8dab11792813b017afe1e75888726">More...</a><br /></td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-pub-methods" class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:af593de4f0ffc1a84a66ed160cbc26fe2" id="r_af593de4f0ffc1a84a66ed160cbc26fe2"><td class="memItemLeft"><a class="el" href="structmce_1_1_virtual_file_system_1_1_config.html">Config</a> & </td><td class="memItemRight"><a class="el" href="#af593de4f0ffc1a84a66ed160cbc26fe2">getConfig</a> ()</td></tr>
|
|
<tr class="memdesc:af593de4f0ffc1a84a66ed160cbc26fe2"><td class="mdescLeft"> </td><td class="mdescRight">Access the runtime configuration. <br /></td></tr>
|
|
<tr class="memitem:a8f65e6706de32cdbe5c68f6e7053222a" id="r_a8f65e6706de32cdbe5c68f6e7053222a"><td class="memItemLeft">bool </td><td class="memItemRight"><a class="el" href="#a8f65e6706de32cdbe5c68f6e7053222a">getFile</a> (const eastl::string_view &fileTag, eastl::vector< char > &bytes)</td></tr>
|
|
<tr class="memdesc:a8f65e6706de32cdbe5c68f6e7053222a"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve a file's bytes identified by its tag. <br /></td></tr>
|
|
<tr class="memitem:a7dd599ce69981b9e8efc4bf01d7c4c06" id="r_a7dd599ce69981b9e8efc4bf01d7c4c06"><td class="memItemLeft">bool </td><td class="memItemRight"><a class="el" href="#a7dd599ce69981b9e8efc4bf01d7c4c06">buildJSONMappingFile</a> (const std::string &fileInName, const std::string &fileOutName)</td></tr>
|
|
<tr class="memdesc:a7dd599ce69981b9e8efc4bf01d7c4c06"><td class="mdescLeft"> </td><td class="mdescRight">Build a binary VFS file from a JSON mapping. <br /></td></tr>
|
|
<tr class="memitem:ae5c0d15aed23eb8651abcce2190fb7ac" id="r_ae5c0d15aed23eb8651abcce2190fb7ac"><td class="memItemLeft">bool </td><td class="memItemRight"><a class="el" href="#ae5c0d15aed23eb8651abcce2190fb7ac">loadFile</a> (const std::string &fileName)</td></tr>
|
|
<tr class="memdesc:ae5c0d15aed23eb8651abcce2190fb7ac"><td class="mdescLeft"> </td><td class="mdescRight">Load the virtual file system from a file. <br /></td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p><a class="el" href="classmce_1_1_virtual_file_system.html" title="VirtualFileSystem manages a collection of files referenced by tags.">VirtualFileSystem</a> manages a collection of files referenced by tags. </p>
|
|
<p>The virtual file system can be built from a JSON mapping (debug mode) or from a binary VFS file (release). It supports loading file contents either via stream input or by keeping the virtual file contents in memory. </p>
|
|
</div><a name="doc-enum-members" id="doc-enum-members"></a><h2 id="header-doc-enum-members" class="groupheader">Member Enumeration Documentation</h2>
|
|
<a id="a7dc8dab11792813b017afe1e75888726" name="a7dc8dab11792813b017afe1e75888726"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7dc8dab11792813b017afe1e75888726">◆ </a></span>FileBinaryType</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="#a7dc8dab11792813b017afe1e75888726">mce::VirtualFileSystem::FileBinaryType</a> : unsigned char</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Types of virtual file collections that can be stored in a VFS file. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a7dc8dab11792813b017afe1e75888726af4117d29bc8623330732b880e03c422b" name="a7dc8dab11792813b017afe1e75888726af4117d29bc8623330732b880e03c422b"></a>NONE </td><td class="fielddoc"><p>No file type specified. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a7dc8dab11792813b017afe1e75888726a9f4b2e54fa9d67e203bf38f78d0ff067" name="a7dc8dab11792813b017afe1e75888726a9f4b2e54fa9d67e203bf38f78d0ff067"></a>ASSETS_FILE </td><td class="fielddoc"><p>Assets bundle. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a7dc8dab11792813b017afe1e75888726a7c98cab84fc00353d5d242cfa5c257d4" name="a7dc8dab11792813b017afe1e75888726a7c98cab84fc00353d5d242cfa5c257d4"></a>SOURCE_FILE </td><td class="fielddoc"><p>Source files bundle. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a7dc8dab11792813b017afe1e75888726ad7dc87fe0ad41cd2d441e509c81ea486" name="a7dc8dab11792813b017afe1e75888726ad7dc87fe0ad41cd2d441e509c81ea486"></a>WORLD_FILE </td><td class="fielddoc"><p>World data bundle. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Member Function Documentation</h2>
|
|
<a id="a7dd599ce69981b9e8efc4bf01d7c4c06" name="a7dd599ce69981b9e8efc4bf01d7c4c06"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7dd599ce69981b9e8efc4bf01d7c4c06">◆ </a></span>buildJSONMappingFile()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool mce::VirtualFileSystem::buildJSONMappingFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>fileInName</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>fileOutName</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Build a binary VFS file from a JSON mapping. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">fileInName</td><td>Path to the input JSON mapping file. </td></tr>
|
|
<tr><td class="paramname">fileOutName</td><td>Path where the resulting binary VFS should be written. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the output file was successfully created. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af593de4f0ffc1a84a66ed160cbc26fe2" name="af593de4f0ffc1a84a66ed160cbc26fe2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af593de4f0ffc1a84a66ed160cbc26fe2">◆ </a></span>getConfig()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structmce_1_1_virtual_file_system_1_1_config.html">VirtualFileSystem::Config</a> & mce::VirtualFileSystem::getConfig </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Access the runtime configuration. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to the VFS configuration. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8f65e6706de32cdbe5c68f6e7053222a" name="a8f65e6706de32cdbe5c68f6e7053222a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8f65e6706de32cdbe5c68f6e7053222a">◆ </a></span>getFile()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool mce::VirtualFileSystem::getFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const eastl::string_view &</td> <td class="paramname"><span class="paramname"><em>fileTag</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">eastl::vector< char > &</td> <td class="paramname"><span class="paramname"><em>bytes</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Retrieve a file's bytes identified by its tag. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">fileTag</td><td>Tag identifying the file in the VFS. </td></tr>
|
|
<tr><td class="paramname">bytes</td><td>Output vector which will be filled with file data. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the file was found and bytes were successfully loaded. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae5c0d15aed23eb8651abcce2190fb7ac" name="ae5c0d15aed23eb8651abcce2190fb7ac"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae5c0d15aed23eb8651abcce2190fb7ac">◆ </a></span>loadFile()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool mce::VirtualFileSystem::loadFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>fileName</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Load the virtual file system from a file. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">fileName</td><td>Base file name (without extension) to load. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if the VFS data was successfully loaded. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>IO/<a class="el" href="_virtual_file_system_8hpp_source.html">VirtualFileSystem.hpp</a></li>
|
|
<li>IO/<b>VirtualFileSystem.cpp</b></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div id="page-nav" class="page-nav-panel">
|
|
<div id="page-nav-resize-handle"></div>
|
|
<div id="page-nav-tree">
|
|
<div id="page-nav-contents">
|
|
</div><!-- page-nav-contents -->
|
|
</div><!-- page-nav-tree -->
|
|
</div><!-- page-nav -->
|
|
</div><!-- container -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><b>mce</b></li><li class="navelem"><a href="classmce_1_1_virtual_file_system.html">VirtualFileSystem</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.16.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|