| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
| 6 | 6 | 
| 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 
| 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 
| 9 | 9 | 
|  | 10 #include <memory> | 
| 10 #include <vector> | 11 #include <vector> | 
| 11 | 12 | 
| 12 #include "JBig2_ArithDecoder.h" | 13 #include "JBig2_ArithDecoder.h" | 
| 13 #include "JBig2_List.h" | 14 #include "JBig2_List.h" | 
| 14 #include "core/include/fxcrt/fx_basic.h" | 15 #include "core/include/fxcrt/fx_basic.h" | 
| 15 #include "third_party/base/nonstd_unique_ptr.h" |  | 
| 16 | 16 | 
| 17 class CJBig2_Image; | 17 class CJBig2_Image; | 
| 18 | 18 | 
| 19 class CJBig2_SymbolDict { | 19 class CJBig2_SymbolDict { | 
| 20  public: | 20  public: | 
| 21   CJBig2_SymbolDict(); | 21   CJBig2_SymbolDict(); | 
| 22   ~CJBig2_SymbolDict(); | 22   ~CJBig2_SymbolDict(); | 
| 23 | 23 | 
| 24   nonstd::unique_ptr<CJBig2_SymbolDict> DeepCopy() const; | 24   std::unique_ptr<CJBig2_SymbolDict> DeepCopy() const; | 
| 25 | 25 | 
| 26   // Takes ownership of |image|. | 26   // Takes ownership of |image|. | 
| 27   void AddImage(CJBig2_Image* image) { m_SDEXSYMS.push_back(image); } | 27   void AddImage(CJBig2_Image* image) { m_SDEXSYMS.push_back(image); } | 
| 28 | 28 | 
| 29   size_t NumImages() const { return m_SDEXSYMS.size(); } | 29   size_t NumImages() const { return m_SDEXSYMS.size(); } | 
| 30   CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS.get(index); } | 30   CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS.get(index); } | 
| 31 | 31 | 
| 32   const std::vector<JBig2ArithCtx>& GbContext() const { return m_gbContext; } | 32   const std::vector<JBig2ArithCtx>& GbContext() const { return m_gbContext; } | 
| 33   const std::vector<JBig2ArithCtx>& GrContext() const { return m_grContext; } | 33   const std::vector<JBig2ArithCtx>& GrContext() const { return m_grContext; } | 
| 34 | 34 | 
| 35   void SetGbContext(const std::vector<JBig2ArithCtx>& gbContext) { | 35   void SetGbContext(const std::vector<JBig2ArithCtx>& gbContext) { | 
| 36     m_gbContext = gbContext; | 36     m_gbContext = gbContext; | 
| 37   } | 37   } | 
| 38   void SetGrContext(const std::vector<JBig2ArithCtx>& grContext) { | 38   void SetGrContext(const std::vector<JBig2ArithCtx>& grContext) { | 
| 39     m_grContext = grContext; | 39     m_grContext = grContext; | 
| 40   } | 40   } | 
| 41 | 41 | 
| 42  private: | 42  private: | 
| 43   std::vector<JBig2ArithCtx> m_gbContext; | 43   std::vector<JBig2ArithCtx> m_gbContext; | 
| 44   std::vector<JBig2ArithCtx> m_grContext; | 44   std::vector<JBig2ArithCtx> m_grContext; | 
| 45   CJBig2_List<CJBig2_Image> m_SDEXSYMS; | 45   CJBig2_List<CJBig2_Image> m_SDEXSYMS; | 
| 46 }; | 46 }; | 
| 47 | 47 | 
| 48 #endif  // CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 48 #endif  // CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ | 
| OLD | NEW | 
|---|