summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-08 12:13:10 -0700
committerLei Zhang <thestig@chromium.org>2015-10-08 12:13:10 -0700
commit8793b4a071fad51a770b93838e0752505b020e43 (patch)
tree1b78e68c979c44b5f39c45ce1243c0be1244ed03 /core/src/fxcodec/jbig2/JBig2_SymbolDict.h
parent287b63d9ab410783d71cf37291f09fd57d3059b4 (diff)
downloadpdfium-8793b4a071fad51a770b93838e0752505b020e43.tar.xz
Put CJBig2_SymbolDict's images in a CJBig2_List container.
Also mark it private. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1395613003 .
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_SymbolDict.h')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SymbolDict.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
index c8e39dc845..577bfbc2f2 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
@@ -9,9 +9,10 @@
#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fxcrt/fx_basic.h"
-#include "JBig2_ArithDecoder.h"
+#include "JBig2_List.h"
class CJBig2_Image;
+struct JBig2ArithCtx;
class CJBig2_SymbolDict {
public:
@@ -20,12 +21,19 @@ class CJBig2_SymbolDict {
nonstd::unique_ptr<CJBig2_SymbolDict> DeepCopy() const;
+ // Takes ownership of |image|.
+ void AddImage(CJBig2_Image* image) { m_SDEXSYMS.push_back(image); }
+
+ size_t NumImages() const { return m_SDEXSYMS.size(); }
+ CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS.get(index); }
+
public:
- FX_DWORD SDNUMEXSYMS;
- CJBig2_Image** SDEXSYMS;
FX_BOOL m_bContextRetained;
JBig2ArithCtx* m_gbContext;
JBig2ArithCtx* m_grContext;
+
+ private:
+ CJBig2_List<CJBig2_Image> m_SDEXSYMS;
};
#endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_