fw4spl
IWriteArchive.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_IWRITEARCHIVE_HPP__
8 #define __FWZIP_IWRITEARCHIVE_HPP__
9 
10 #include <fwCore/macros.hpp>
11 
12 #include <boost/filesystem/path.hpp>
13 
14 #include <ostream>
15 
16 namespace fwZip
17 {
18 
23 {
24 
25 public:
26 
28 
29  virtual ~IWriteArchive()
30  {
31  }
32 
38  virtual SPTR(std::ostream) createFile(const ::boost::filesystem::path &path) = 0;
39 
45  virtual void putFile(const ::boost::filesystem::path& sourceFile, const ::boost::filesystem::path& path) = 0;
46 
51  virtual bool createDir(const ::boost::filesystem::path& path) = 0;
52 
56  virtual const ::boost::filesystem::path getArchivePath() const = 0;
57 };
58 
59 }
60 
61 #endif /* __FWZIP_IWRITEARCHIVE_HPP__ */
62 
virtual std::shared_ptr< std::ostream > createFile(const ::boost::filesystem::path &path)=0
Creates a new file entry in archive and returns output stream for this file.
#define SPTR(_cls_)
This interface defines functions to write a file in an archive.
This file defines fwCore base macros.
virtual const ::boost::filesystem::path getArchivePath() const =0
Returns archive path.
virtual void putFile(const ::boost::filesystem::path &sourceFile, const ::boost::filesystem::path &path)=0
Writes source file in archive.
virtual bool createDir(const ::boost::filesystem::path &path)=0
Creates a folder in archive.
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, ...)