Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
List of all members
etk::Archive Class Reference
#include <Archive.hpp>
Inheritance diagram for etk::Archive:
Public Member Functions | |
Archive (const std::string &_fileName) | |
virtual | ~Archive ()=default |
const std::string & | getFileName () |
int32_t | size () const |
const std::string & | getName (size_t _id) const |
const ArchiveContent & | getContent (size_t _id) const |
const ArchiveContent & | getContent (const std::string &_key) const |
bool | exist (const std::string &_key) const |
void | open (const std::string &_key) |
void | close (const std::string &_key) |
void | display () |
Static Public Member Functions | |
static Archive * | load (const std::string &_fileName) |
static Archive * | loadPackage (const std::string &_fileName) |
Protected Member Functions | |
virtual void | loadFile (const std::map< std::string, ArchiveContent >::iterator &_it) |
Protected Attributes | |
std::string | m_fileName |
std::map< std::string, ArchiveContent > | m_content |
Detailed Description
Access on a zip data file.
Constructor & Destructor Documentation
§ Archive()
|
inline |
Contructor of the archive element.
- Parameters
-
[in] _fileName Zip file name (or .apk for android)
§ ~Archive()
|
virtualdefault |
Generic Destructor of the archive element.
Member Function Documentation
§ close()
void etk::Archive::close | ( | const std::string & | _key | ) |
Un-Load the specific file from the memory.
- Parameters
-
[in] _key Name of the file
§ display()
void etk::Archive::display | ( | ) |
Display all Element in the archive.
§ exist()
bool etk::Archive::exist | ( | const std::string & | _key | ) | const |
Check if a file exist.
- Parameters
-
[in] _key Name of the file
- Returns
- true if the file is present
§ getContent() [1/2]
const ArchiveContent& etk::Archive::getContent | ( | size_t | _id | ) | const |
Get the File name of the ID.
- Parameters
-
[in] _id id of the element (must be < Size())
- Returns
- the archive content
§ getContent() [2/2]
const ArchiveContent& etk::Archive::getContent | ( | const std::string & | _key | ) | const |
Get the File name of the ID.
- Parameters
-
[in] _key name of the file
- Returns
- FileName of the requested id
§ getFileName()
|
inline |
Get the current file name.
- Returns
- the requested file name.
§ getName()
const std::string& etk::Archive::getName | ( | size_t | _id | ) | const |
Get the File name of the ID.
- Parameters
-
[in] _id id of the element (must be < Size())
- Returns
- FileName of the requested id
§ load()
|
static |
Load an Achive with a specific name.
- Parameters
-
[in] _fileName File name of the specific archive.
- Returns
- A pointer an the specified archive, the user might delete it.
§ loadFile()
|
inlineprotectedvirtual |
Request the load in memory of the concerned file.
- Parameters
-
[in] _it Iterator on the element.
Reimplemented in etk::archive::Zip.
§ loadPackage()
|
static |
Load an Achive with a specific name in package mode ==> this mean the data is associated with the basic binary.
- Parameters
-
[in] _fileName File name of the specific archive.
- Returns
- A pointer an the specified archive, the user might delete it.
§ open()
void etk::Archive::open | ( | const std::string & | _key | ) |
Load the specific file in the memory.
- Parameters
-
[in] _key Name of the file
§ size()
|
inline |
Get the number of elements.
- Returns
- nb files in the archive
Member Data Documentation
§ m_content
|
protected |
list of element of the zip file
§ m_fileName
|
protected |
File name when it came from an file.
The documentation for this class was generated from the following file:
- framework/atria-soft/etk/etk/archive/Archive.hpp