mix file controller
More...
#include <mix_file.h>
List of all members.
Public Member Functions |
|
| MixFile (const MixFile &orig) |
| bool | open (const std::string path) |
| | open mix archive
|
| bool | extractFile (unsigned int fileID, std::string outPath) |
| | extract file from mix archive
|
| bool | extractFile (std::string fileName, std::string outPath) |
| | extract file from mix archive
|
| bool | extractAll (std::string outPath=".", bool withFileNames=true) |
| | extract all files from the archive
|
| bool | checkFileName (std::string fname) |
| | chcecks, if file is present in the archive
|
| std::string | printFileList (int flags) |
| | mix archive header
|
| unsigned int | getID (t_game game, std::string name) |
| | count CRC ID from filename
|
|
std::vector< std::string > | getFileNames () |
|
std::vector< t_mix_index_entry > | getFileIndex () |
Detailed Description
mix file controller
Some parts of code and code are taken from XCC mix file specification.
- See also:
- TS mix file format specification (http://xhp.xwis.net/documents/MIX_Format.html)
Member Function Documentation
| bool MixFile::checkFileName |
( |
std::string |
fname | ) |
|
chcecks, if file is present in the archive
- Parameters:
-
- Returns:
- true if present
| bool MixFile::extractAll |
( |
std::string |
outPath = ".", |
|
|
bool |
withFileNames = true |
|
) |
| |
extract all files from the archive
- Parameters:
-
| outPath | output directory |
| withFileNames | try to get file names of the content |
- Returns:
- true if extraction successful
| bool MixFile::extractFile |
( |
unsigned int |
fileID, |
|
|
std::string |
outPath |
|
) |
| |
extract file from mix archive
- Parameters:
-
| fileID | CRC ID of file |
| outPath | extracted file path |
- Return values:
-
| true | file extracted |
| false | file not present in the archive |
| bool MixFile::extractFile |
( |
std::string |
fileName, |
|
|
std::string |
outPath |
|
) |
| |
extract file from mix archive
- Parameters:
-
| fileName | name of file |
| outPath | extracted file path |
- Return values:
-
| true | file extracted |
| false | file not present in the archive |
| unsigned int MixFile::getID |
( |
t_game |
game, |
|
|
std::string |
name |
|
) |
| |
count CRC ID from filename
- Parameters:
-
| game | t_game game selection |
| name | filename |
- Returns:
- CRC ID of file
| bool MixFile::open |
( |
const std::string |
path | ) |
|
open mix archive
- Parameters:
-
- Return values:
-
| true | file opened |
| false | file not found |
| string MixFile::printFileList |
( |
int |
flags = 1 | ) |
|
mix archive header
Prints header in following format: file CRC (hex) || file offset (dec) || file size (dec)
- Parameters:
-
- Returns:
- file text list
The documentation for this class was generated from the following files: