ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZipOutputStreamBuffer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ZipOutputStreamBuffer.h
1 // Copyright FreeHEP, 2005.
2 #ifndef CHEPREP_ZIPOUTPUTSTREAMBUFFER_H
3 #define CHEPREP_ZIPOUTPUTSTREAMBUFFER_H
4 
5 #include <string>
6 #include <iostream>
7 #include <vector>
8 
10 
14 namespace cheprep {
15 
16  class ZipEntry;
17 
19 
20  public:
21 
22  ZipOutputStreamBuffer(std::streambuf* buffer);
23 
24  int overflow(int c);
25 
26  void closeEntry();
27 
28  void close();
29 
30  void putNextEntry(const std::string& name, bool compress);
31 
32  void setMethod(int method);
33 
34  void setComment(const std::string& comment);
35 
36  virtual ~ZipOutputStreamBuffer();
37 
38  private:
39  std::string comment;
40 
41  bool closed;
43  std::vector<ZipEntry*>* entries;
44 
45  static const unsigned int LOCSIG = 0x04034b50;
46  static const unsigned int EXTSIG = 0x08074b50;
47  static const unsigned int CENSIG = 0x02014b50;
48  static const unsigned int ENDSIG = 0x06054b50;
49 
50  static const unsigned int VERSIONMADE = 0x0014;
51  static const unsigned int VERSIONEXTRACT = 0x0014;
52  static const unsigned int GENFLAG = 0x0008;
53  };
54 
55 } // cheprep
56 
57 #endif // CHEPREP_ZIPOUTPUTSTREAMBUFFER_H