fw4spl
IReadArchive.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWZIP_IREADARCHIVE_HPP__
8 #define __FWZIP_IREADARCHIVE_HPP__
9 
10 #include <fwCore/macros.hpp>
11 
12 #include <boost/filesystem/path.hpp>
13 
14 #include <istream>
15 
16 namespace fwZip
17 {
18 
23 {
24 
25 public:
26 
28 
29  virtual ~IReadArchive()
30  {
31  }
32 
38  virtual SPTR(std::istream) getFile(const ::boost::filesystem::path &path) = 0;
39 
43  virtual const ::boost::filesystem::path getArchivePath() const = 0;
44 
45  virtual IReadArchive::sptr clone() const = 0;
46 };
47 
48 }
49 
50 #endif /* __FWZIP_IREADARCHIVE_HPP__ */
51 
virtual std::shared_ptr< std::istream > getFile(const ::boost::filesystem::path &path)=0
Returns input stream for the file in current archive.
#define SPTR(_cls_)
This file defines fwCore base macros.
The namespace fwZip provides IO for compress/uncompress .zip files using zlib .
Definition: Read.hpp:14
#define fwCoreBaseClassDefinitionsMacro(_classinfo_)
Generate common code for a base class (Interfaces, Abstract classes, ...)
This interface defines functions to read a file in an archive.
virtual const ::boost::filesystem::path getArchivePath() const =0
Returns archive path.