fw4spl
WriteDirArchive.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_WRITEDIRARCHIVE_HPP__
8 #define __FWZIP_WRITEDIRARCHIVE_HPP__
9 
10 #include "fwZip/config.hpp"
11 #include "fwZip/IWriteArchive.hpp"
12 
13 #include <fwCore/macros.hpp>
14 
15 #include <boost/filesystem/path.hpp>
16 
17 #include <fstream>
18 
19 namespace fwZip
20 {
21 
25 class FWZIP_CLASS_API WriteDirArchive : public IWriteArchive
26 {
27 
28 public:
29 
31  ((( const ::boost::filesystem::path& ))),
32  std::make_shared<WriteDirArchive> )
33 
34 
35  FWZIP_API WriteDirArchive( const ::boost::filesystem::path& archive );
36 
38  FWZIP_API ~WriteDirArchive();
39 
47  FWZIP_API SPTR(std::ostream) createFile(const ::boost::filesystem::path &path) override;
48 
56  FWZIP_API void putFile(const ::boost::filesystem::path& sourceFile,
57  const ::boost::filesystem::path& destinationFile) override;
58 
63  FWZIP_API bool createDir(const ::boost::filesystem::path& path) override;
64 
68  FWZIP_API const ::boost::filesystem::path getArchivePath() const override;
69 
70 protected:
71 
72  ::boost::filesystem::path m_archive;
73 };
74 
75 }
76 
77 #endif /* __FWZIP_WRITEDIRARCHIVE_HPP__ */
78 
#define SPTR(_cls_)
This class defines functions to write a file in a file system archive.
This interface defines functions to write a file in an archive.
STL namespace.
This file defines fwCore base macros.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
The namespace fwZip provides IO for compress/uncompress .zip files using zlib .
Definition: Read.hpp:14