Class: etk::Archive
Synopsis:
+ Archive (const std::string & _fileName);
+ ~Archive (void);
+ const std::string & getFileName (void);
+ int32_t size (void);
+ const std::string & getName (int32_t _id);
+ const Content & getContent (int32_t _id);
+ const Content & getContent (const std::string & _key);
+ bool exist (const std::string & _key);
+ void open (const std::string & _key);
+ void close (const std::string & _key);
+ void display (void);
+ static Archive * load (const std::string & _fileName);
# void loadFile (int32_t _id);
Object Hierarchy:
etk::Archive +--> etk::archive::Zip
Detail:
etk::Archive ()
Archive(const std::string & _fileName);
etk::~Archive ()
~Archive(void);
getFileName ()
const std::string & getFileName(void);
Get the current file name.
Return: the requested file name.
size ()
int32_t size(void);
Get the number of elements
Return: nb files in the archive
getName ()
const std::string & getName(int32_t _id);
Get the File name of the ID
Parameter [input]: _id id of the element (must be < Size())
Return: FileName of the requested id
getContent ()
const Content & getContent(int32_t _id);
Get the File name of the ID
Parameter [input]: _id id of the element (must be < Size())
Return: the archive content
getContent ()
const Content & getContent(const std::string & _key);
Get the File name of the ID
Parameter [input]: _key name of the file
Return: FileName of the requested id
exist ()
bool exist(const std::string & _key);
Check if a file exist
Parameter [input]: _key Name of the file
Return: true if the file is present
open ()
void open(const std::string & _key);
Load the specific file in the memory
Parameter [input]: _key Name of the file
close ()
void close(const std::string & _key);
Un-Load the specific file from the memory
Parameter [input]: _key Name of the file
display ()
void display(void);
Display all Element in the archive
etk::load ()
static Archive * load(const std::string & _fileName);
Load an Achive with a specific name.
Parameter [input]: _fileName File name of the specific archive.
Return: A pointer an the specified archive, the user might delete it.
loadFile ()
void loadFile(int32_t _id);
Request the load in memory of the concerned file.
Parameter [input]: _id Id of the file to load.
etk::Archive ()
Archive(const std::string & _fileName);
etk::~Archive ()
~Archive(void);
getFileName ()
const std::string & getFileName(void);
Get the current file name.
-
Return: the requested file name.
size ()
int32_t size(void);
Get the number of elements
-
Return: nb files in the archive
getName ()
const std::string & getName(int32_t _id);
Get the File name of the ID
-
Parameter [input]: _id id of the element (must be < Size())
Return: FileName of the requested id
getContent ()
const Content & getContent(int32_t _id);
Get the File name of the ID
-
Parameter [input]: _id id of the element (must be < Size())
Return: the archive content
getContent ()
const Content & getContent(const std::string & _key);
Get the File name of the ID
-
Parameter [input]: _key name of the file
Return: FileName of the requested id
exist ()
bool exist(const std::string & _key);
Check if a file exist
-
Parameter [input]: _key Name of the file
Return: true if the file is present
open ()
void open(const std::string & _key);
Load the specific file in the memory
-
Parameter [input]: _key Name of the file
close ()
void close(const std::string & _key);
Un-Load the specific file from the memory
-
Parameter [input]: _key Name of the file
display ()
void display(void);
Display all Element in the archive
etk::load ()
static Archive * load(const std::string & _fileName);
Load an Achive with a specific name.
-
Parameter [input]: _fileName File name of the specific archive.
Return: A pointer an the specified archive, the user might delete it.
loadFile ()
void loadFile(int32_t _id);
Request the load in memory of the concerned file.
-
Parameter [input]: _id Id of the file to load.