fw4spl
fwZip::ReadZipArchive Class Reference

This class defines functions to read a file in a zip archive. More...

#include <ReadZipArchive.hpp>

+ Inheritance diagram for fwZip::ReadZipArchive:
+ Collaboration diagram for fwZip::ReadZipArchive:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWZIP_API ReadZipArchive (const ::boost::filesystem::path &archive)
 
FWZIP_API std::shared_ptr< std::istream > getFile (const ::boost::filesystem::path &path) override
 Returns input stream for the file in current archive (zip). More...
 
FWZIP_API std::string getComment ()
 Returns comment from the current archive (zip). More...
 
FWZIP_APIconst::boost::filesystem::path getArchivePath () const override
 Returns archive path.
 
IReadArchive::sptr clone () const override
 
- Public Member Functions inherited from fwZip::IReadArchive

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwZip::IReadArchive
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Attributes

::boost::filesystem::path m_archive
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Detailed Description

This class defines functions to read a file in a zip archive.

Definition at line 25 of file ReadZipArchive.hpp.

Member Function Documentation

std::string fwZip::ReadZipArchive::getComment ( )

Returns comment from the current archive (zip).

Parameters
pathfile in archive.
Returns
comment

Definition at line 142 of file ReadZipArchive.cpp.

References SPTR.

std::shared_ptr< std::istream > fwZip::ReadZipArchive::getFile ( const ::boost::filesystem::path &  path)
overridevirtual

Returns input stream for the file in current archive (zip).

Parameters
pathfile in archive.
Returns
input stream from request file.
Exceptions
fwZip::exception::Readif file doesn't exist in archive.
fwZip::exception::Readif cannot retrieve file in archive.

Implements fwZip::IReadArchive.

Definition at line 132 of file ReadZipArchive.cpp.

References SPTR.


The documentation for this class was generated from the following files: