Chromium Code Reviews| Index: core/fpdfapi/parser/cpdf_linearized.h |
| diff --git a/core/fpdfapi/parser/cpdf_linearized.h b/core/fpdfapi/parser/cpdf_linearized.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..17a46a8ec637bb7ab40c405b6372615033736ac1 |
| --- /dev/null |
| +++ b/core/fpdfapi/parser/cpdf_linearized.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2016 PDFium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| + |
| +#ifndef CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ |
| +#define CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ |
| + |
| +#include <memory> |
| + |
| +#include "core/fxcrt/fx_memory.h" |
| +#include "core/fxcrt/fx_stream.h" |
| + |
| +class CPDF_Dictionary; |
| +class CPDF_Object; |
| + |
| +class CPDF_Linearized { |
| + public: |
| + ~CPDF_Linearized(); |
| + static std::unique_ptr<CPDF_Linearized> CreateForObject( |
| + std::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pObj); |
| + |
| + FX_FILESIZE GetFileSize() const { return m_szFileSize; } |
|
Lei Zhang
2016/11/04 01:10:15
Can you briefly document these getters, and mentio
snake
2016/11/04 22:39:14
Done.
|
| + uint32_t GetFirstPageNo() const { return m_dwFirstPageNo; } |
| + FX_FILESIZE GetLastXRefOffset() const { return m_szLastXRefOffset; } |
| + uint32_t GetPageCount() const { return m_PageCount; } |
| + FX_FILESIZE GetFirstPageEndOffset() const { return m_szFirstPageEndOffset; } |
| + uint32_t GetFirstPageObjNum() const { return m_FirstPageObjNum; } |
| + |
| + bool HasHintTable() const; |
| + FX_FILESIZE GetHintStart() const { return m_szHintStart; } |
| + FX_FILESIZE GetHintLength() const { return m_szHintLength; } |
| + |
| + private: |
| + explicit CPDF_Linearized(const CPDF_Dictionary* pDict); |
| + bool IsValid() const; |
| + |
| + FX_FILESIZE m_szFileSize = 0; |
| + uint32_t m_dwFirstPageNo = 0; |
| + FX_FILESIZE m_szLastXRefOffset = 0; |
| + uint32_t m_PageCount = 0; |
| + FX_FILESIZE m_szFirstPageEndOffset = 0; |
| + uint32_t m_FirstPageObjNum = 0; |
| + FX_FILESIZE m_szHintStart = 0; |
| + FX_FILESIZE m_szHintLength = 0; |
| +}; |
| + |
| +#endif // CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ |