daeZAEUncompressHandler Class Reference

#include <daeZAEUncompressHandler.h>

List of all members.

Public Member Functions

 daeZAEUncompressHandler (const daeURI &zaeFile)
const std::string & getRootFilePath ()
const std::string & getTmpDir ()
bool isZipFile ()
const std::string & obtainRootFilePath ()
virtual ~daeZAEUncompressHandler ()

Static Public Attributes

static const int BUFFER_SIZE
static const int CASE_INSENSITIVE
static const std::string EMPTY_STRING
static const std::string MANIFEST_FILE_NAME
static const std::string MANIFEST_FILE_ROOT_ELEMENT_NAME

Private Member Functions

bool checkAndExtractInternalArchive (const std::string &filePath)
 daeZAEUncompressHandler (const daeZAEUncompressHandler &copy)
bool extractArchive (unzFile zipFile, const std::string &destDir)
bool extractFile (unzFile zipFile, const std::string &destDir)
bool findManifestRootElement (xmlTextReaderPtr xmlReader)
daeZAEUncompressHandleroperator= (const daeZAEUncompressHandler &copy)
bool retrieveRootURIFromManifest (const std::string &tmpDir)

Private Attributes

std::string mRootFilePath
std::string mTmpDir
bool mValidZipFile
unzFile mZipFile
const daeURImZipFileURI

Detailed Description

Takes an URI to a ZAE file and extracts it to a temporary directory. Use obtainRootFilePath() to accomplish this.

The whole ZAE archive gets extracted because it is not specified how an URL pointing inside a ZAE archive should look like. By extracting the whole archive we can use the 'file' scheme.

Definition at line 24 of file daeZAEUncompressHandler.h.


Constructor & Destructor Documentation

daeZAEUncompressHandler::daeZAEUncompressHandler ( const daeZAEUncompressHandler copy  )  [private]
daeZAEUncompressHandler::daeZAEUncompressHandler ( const daeURI zaeFile  ) 

C-Tor.

Parameters:
zaeFile URI to the ZAE file to open.
virtual daeZAEUncompressHandler::~daeZAEUncompressHandler (  )  [virtual]

D-Tor.


Member Function Documentation

bool daeZAEUncompressHandler::checkAndExtractInternalArchive ( const std::string &  filePath  )  [private]

Checks if an extracted file is a zip archive itself and extracts it.

bool daeZAEUncompressHandler::extractArchive ( unzFile  zipFile,
const std::string &  destDir 
) [private]

Iterates over zip archive and extracts each file.

bool daeZAEUncompressHandler::extractFile ( unzFile  zipFile,
const std::string &  destDir 
) [private]

Extracts the current file inside zip archive.

bool daeZAEUncompressHandler::findManifestRootElement ( xmlTextReaderPtr  xmlReader  )  [private]

Finds <dae_root> element in manifest.xml. Used by retrieveRootURIFromManifest().

const std::string& daeZAEUncompressHandler::getRootFilePath (  )  [inline]

Returns currently known path to root DAE of ZAE file. Only valid after obtainRootFilePath() has been called.

Definition at line 84 of file daeZAEUncompressHandler.h.

const std::string& daeZAEUncompressHandler::getTmpDir (  )  [inline]

Returns used temp dir.

Definition at line 89 of file daeZAEUncompressHandler.h.

bool daeZAEUncompressHandler::isZipFile (  )  [inline]

Returns true if this object has been initialized with a zip file.

Definition at line 73 of file daeZAEUncompressHandler.h.

const std::string& daeZAEUncompressHandler::obtainRootFilePath (  ) 

Extracts ZAE file and returns resulting path to the root DAE file.

daeZAEUncompressHandler& daeZAEUncompressHandler::operator= ( const daeZAEUncompressHandler copy  )  [private]
bool daeZAEUncompressHandler::retrieveRootURIFromManifest ( const std::string &  tmpDir  )  [private]

Tries to open manifest.xml inside tmpDir. On success it parses the XML file to find URI of root DAE.


Member Data Documentation

Definition at line 54 of file daeZAEUncompressHandler.h.

Definition at line 52 of file daeZAEUncompressHandler.h.

const std::string daeZAEUncompressHandler::EMPTY_STRING [static]

Definition at line 56 of file daeZAEUncompressHandler.h.

const std::string daeZAEUncompressHandler::MANIFEST_FILE_NAME [static]

Definition at line 48 of file daeZAEUncompressHandler.h.

Definition at line 50 of file daeZAEUncompressHandler.h.

Definition at line 37 of file daeZAEUncompressHandler.h.

std::string daeZAEUncompressHandler::mTmpDir [private]

Definition at line 40 of file daeZAEUncompressHandler.h.

Definition at line 34 of file daeZAEUncompressHandler.h.

Definition at line 28 of file daeZAEUncompressHandler.h.

Definition at line 31 of file daeZAEUncompressHandler.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


colladadom
Author(s): Du Hung Hou, Khronos.org, Marcus Barnes, Greg Corson, Herbert Law, Sebastian Schwarz, Steven Thomas, John Hsu (ros package), Tim Field (ros package)
autogenerated on Fri Jan 11 09:29:16 2013