ZipStringStoreSettings.h
Go to the documentation of this file.
1 
2 // This source file is part of the ZipArchive library source distribution and
3 // is Copyrighted 2000 - 2013 by Artpol Software - Tadeusz Dracz
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // For the licensing details refer to the License.txt file.
11 //
12 // Web Site: http://www.artpol-software.com
14 
21 #if !defined(ZIPARCHIVE_ZIPSTRINGSTRINGSTORESETTINGS_DOT_H)
22 #define ZIPARCHIVE_ZIPSTRINGSTRINGSTORESETTINGS_DOT_H
23 
24 #if _MSC_VER > 1000
25 #pragma once
26 #endif
27 
28 #include "stdafx.h"
29 
30 #ifdef _ZIP_UNICODE_CUSTOM
31 
32 #include "ZipPlatform.h"
33 #include "ZipCompatibility.h"
34 
35 
45 {
46 public:
47 
52  {
53  Reset();
54  }
55 
62  void SetDefaultNameCodePage(int iPlatform)
63  {
64  m_uNameCodePage = ZipCompatibility::GetDefaultNameCodePage(iPlatform);
65  }
66 
77  bool IsStandardNameCodePage() const
78  {
79  return m_uNameCodePage == ZipCompatibility::GetDefaultNameCodePage();
80  }
81 
92  bool IsStandardNameCodePage(int iPlatform) const
93  {
94  return m_uNameCodePage == ZipCompatibility::GetDefaultNameCodePage(iPlatform);
95  }
96 
106  bool IsStandardCommentCodePage(int iPlatform) const
107  {
108  return m_uCommentCodePage == ZipCompatibility::GetDefaultCommentCodePage(iPlatform);
109  }
110 
117  bool IsStandardCommentCodePage() const
118  {
119  return m_uCommentCodePage == ZipCompatibility::GetDefaultCommentCodePage();
120  }
121 
132  bool IsStandard(int iPlatform) const
133  {
134  return !m_bStoreNameInExtraData && IsStandardNameCodePage(iPlatform) && IsStandardCommentCodePage(iPlatform);
135  }
136 
145  void Reset(int iPlatform)
146  {
147  m_bStoreNameInExtraData = false;
148  SetDefaultNameCodePage(iPlatform);
149  m_uCommentCodePage = ZipCompatibility::GetDefaultCommentCodePage(iPlatform);
150  }
151 
160  void Reset()
161  {
162  Reset(ZipPlatform::GetSystemID());
163  }
164 
171  void Set(UINT uFileNameCodePage, bool bStoreNameInExtraData, UINT uCommentCodePage)
172  {
173  m_uNameCodePage = uFileNameCodePage;
174  m_bStoreNameInExtraData = bStoreNameInExtraData;
175  m_uCommentCodePage = uCommentCodePage;
176  }
177 
182 
187 
192 };
193 
194 #endif
195 
196 #endif // !defined(ZIPARCHIVE_ZIPSTRINGSTRINGSTORESETTINGS_DOT_H)

The ZipArchive Library Copyright © 2000 - 2013 Artpol Software - Tadeusz Dracz. Generated at Fri Dec 13 2013 00:05:37.