213 lines
13 KiB
HTML
213 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<title>etk Library</title>
|
|
<link rel="stylesheet" href="base.css">
|
|
<link rel="stylesheet" href="menu.css">
|
|
</head>
|
|
<body>
|
|
<div class="navbar navbar-fixed-top">
|
|
<div class="container">
|
|
<h1><a href="index.html">etk library</a></h1>
|
|
<h4><a href="http://github.com/heeroyui/etk/"> [ sources ]</a></h4>
|
|
<h3>API:</h3> <div id="menu">
|
|
<ul class="niveau1">
|
|
<li class="sousmenu"><a href="namespace_etk.html">etk</a>
|
|
<ul class="niveau2">
|
|
<li><a href="namespace_etk__log.html">log</a>
|
|
</li>
|
|
<li><a href="namespace_etk__color.html">color</a>
|
|
</li>
|
|
<li><a href="namespace_etk__tool.html">tool</a>
|
|
</li>
|
|
<li><a href="namespace_etk__archive.html">archive</a>
|
|
</li>
|
|
<li><a href="namespace_etk__theme.html">theme</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="namespace_u32char.html">u32char</a>
|
|
</li>
|
|
<li><a href="namespace_utf8.html">utf8</a>
|
|
</li>
|
|
<li><a href="namespace_std.html">std</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<br/><h3>Associate libraries:</h3><div id="menu">
|
|
<ul class="niveau1"><li><a href="../ewol/index.html">ewol</a></li>
|
|
</ul><ul class="niveau1"><li><a href="../ejson/index.html">ejson</a></li>
|
|
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
|
|
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
|
|
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
|
|
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
|
|
</ul></div>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
<div class="container" id="content">
|
|
<h1>class: etk::Archive</h1><hr/><h2>Description:</h2>
|
|
|
|
<br/><br/>
|
|
<h2>Associated Namespace:</h2><ul>
|
|
<a href="namespace_etk__archive.html">archive</a></ul>
|
|
<h2>class:</h2>
|
|
<ul>
|
|
<li><a href="class_etk__Archive__Content.html">Content</a></li></ul>
|
|
<h2>Constructor and Destructor:</h2>
|
|
<pre>
|
|
+ <a class="code-function" href="#6867">Archive</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_fileName</span>);<br/>+ <span class="code-storage-keyword">virtual</span> <a class="code-function" href="#6869">~Archive</a> ();<br/></pre>
|
|
<br/>
|
|
<h2>Synopsis:</h2>
|
|
<pre>
|
|
# <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> <a class="code-member" href="#6870">m_fileName</a>;<br/>+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <a class="code-function" href="#6871">getFileName</a> ();<br/># std::map<std::string,Content> <a class="code-member" href="#6872">m_content</a>;<br/>+ <span class="code-type" >int32_t</span> <a class="code-function" href="#6873">size</a> () <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <a class="code-function" href="#6874">getName</a> (size_t <span class="code-argument">_id</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">const</span> Content & <a class="code-function" href="#6876">getContent</a> (size_t <span class="code-argument">_id</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-storage-keyword">const</span> Content & <a class="code-function" href="#6878">getContent</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >bool</span> <a class="code-function" href="#6880">exist</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>) <span class="code-storage-keyword">const</span>;<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#6882">open</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#6884">close</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>);<br/>+ <span class="code-type" >void</span> <a class="code-function" href="#6886">display</a> ();<br/># <span class="code-storage-keyword">virtual</span> <span class="code-type" >void</span> <a class="code-function" href="#6887">loadFile</a> (<span class="code-storage-keyword">const</span> std::map <span class="code-argument"><std::string</span>,<br/> Content>::iterator & <span class="code-argument">it</span>);<br/>+ Archive* <a class="code-function" href="#6890">load</a> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_fileName</span>);<br/></pre>
|
|
<br/>
|
|
<h2>Object Hierarchy:<h2>
|
|
<pre>
|
|
etk::Archive<br/> +--> <a href="class_etk__archive__Zip.html">etk::archive::Zip</a><br/></pre>
|
|
<h2>Detail:</h2>
|
|
<a id="6867"/><a id="6869"/><h3>Archive</h3><pre>
|
|
+ <span class="code-function">Archive</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_fileName</span>);<br/></pre>
|
|
|
|
<br/>
|
|
<br/>
|
|
<hr/>
|
|
<a id="6870"/><h3>~Archive</h3><pre>
|
|
+ <span class="code-storage-keyword">virtual</span> <span class="code-function">~Archive</span> ();<br/></pre>
|
|
|
|
<br/>
|
|
<br/>
|
|
<hr/>
|
|
<a id="6871"/><h3>m_fileName</h3><pre>
|
|
# <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> <span class="code-member">m_fileName</span>;<br/></pre>
|
|
|
|
File name when it came from an file<br/>
|
|
<br/>
|
|
<hr/>
|
|
<a id="6872"/><h3>getFileName</h3><pre>
|
|
+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-function">getFileName</span> ();<br/></pre>
|
|
Get the current file name.<br/><ul>
|
|
<table class="parameter-list">
|
|
<tr><td><b>Return: </b></td><td></td><td>the requested file name.</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6873"/><h3>m_content</h3><pre>
|
|
# std::map<std::string,Content> <span class="code-member">m_content</span>;<br/></pre>
|
|
|
|
<br/>
|
|
<br/>
|
|
<hr/>
|
|
<a id="6874"/><h3>size</h3><pre>
|
|
+ <span class="code-type" >int32_t</span> <span class="code-function">size</span> () <span class="code-storage-keyword">const</span>;<br/></pre>
|
|
Get the number of elements<br/><ul>
|
|
<table class="parameter-list">
|
|
<tr><td><b>Return: </b></td><td></td><td>nb files in the archive</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6876"/><h3>getName</h3><pre>
|
|
+ <span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-function">getName</span> (size_t <span class="code-argument">_id</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
|
|
Get the File name of the ID<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_id</span> </td><td> id of the element (must be < Size())</td></tr>
|
|
<tr><td><b>Return: </b></td><td></td><td>FileName of the requested id</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6878"/><h3>getContent</h3><pre>
|
|
+ <span class="code-storage-keyword">const</span> Content & <span class="code-function">getContent</span> (size_t <span class="code-argument">_id</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
|
|
Get the File name of the ID<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_id</span> </td><td> id of the element (must be < Size())</td></tr>
|
|
<tr><td><b>Return: </b></td><td></td><td>the archive content</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6880"/><h3>getContent</h3><pre>
|
|
+ <span class="code-storage-keyword">const</span> Content & <span class="code-function">getContent</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
|
|
Get the File name of the ID<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_key</span> </td><td> name of the file</td></tr>
|
|
<tr><td><b>Return: </b></td><td></td><td>FileName of the requested id</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6882"/><h3>exist</h3><pre>
|
|
+ <span class="code-type" >bool</span> <span class="code-function">exist</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>) <span class="code-storage-keyword">const</span>;<br/></pre>
|
|
Check if a file exist<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_key</span> </td><td> Name of the file</td></tr>
|
|
<tr><td><b>Return: </b></td><td></td><td>true if the file is present</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6884"/><h3>open</h3><pre>
|
|
+ <span class="code-type" >void</span> <span class="code-function">open</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>);<br/></pre>
|
|
Load the specific file in the memory<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_key</span> </td><td> Name of the file</td></tr>
|
|
</table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6886"/><h3>close</h3><pre>
|
|
+ <span class="code-type" >void</span> <span class="code-function">close</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_key</span>);<br/></pre>
|
|
Un-Load the specific file from the memory<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_key</span> </td><td> Name of the file</td></tr>
|
|
</table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<a id="6887"/><h3>display</h3><pre>
|
|
+ <span class="code-type" >void</span> <span class="code-function">display</span> ();<br/></pre>
|
|
Display all Element in the archive<br/>
|
|
<br/>
|
|
<hr/>
|
|
<a id="6890"/><h3>loadFile</h3><pre>
|
|
# <span class="code-storage-keyword">virtual</span> <span class="code-type" >void</span> <span class="code-function">loadFile</span> (<span class="code-storage-keyword">const</span> std::map <span class="code-argument"><std::string</span>,<br/> Content>::iterator & <span class="code-argument">it</span>);<br/></pre>
|
|
Request the load in memory of the concerned file.<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_id</span> </td><td> Id of the file to load.</td></tr>
|
|
</table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
<h3>load</h3><pre>
|
|
+ Archive* <span class="code-function">load</span> (<span class="code-storage-keyword">const</span> <a class="code-type" href="http://www.cplusplus.com/reference/string/string/">std::string</a> & <span class="code-argument">_fileName</span>);<br/></pre>
|
|
Load an Achive with a specific name.<br/><ul>
|
|
<table class="parameter-list">
|
|
<td><b>Parameter [input]:</b></td><td><span class="code-argument">_fileName</span> </td><td> File name of the specific archive.</td></tr>
|
|
<tr><td><b>Return: </b></td><td></td><td>A pointer an the specified archive, the user might delete it.</td></tr></table>
|
|
</ul>
|
|
|
|
<br/>
|
|
<hr/>
|
|
</div>
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
|
|
ga('send', 'pageview');
|
|
</script>
|
|
</body>
|
|
</html>
|