OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ |
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ | 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" | 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
14 #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" | 14 #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" |
15 #include "core/fxcrt/include/fx_basic.h" | 15 #include "core/fxcrt/include/fx_basic.h" |
16 | 16 |
17 class CPDF_Stream : public CPDF_Object { | 17 class CPDF_Stream : public CPDF_Object { |
18 public: | 18 public: |
19 CPDF_Stream(); | 19 CPDF_Stream(); |
20 | 20 |
21 // Takes onwership of |pData| and |pDict|. | 21 // Takes ownership of |pData| and |pDict|. |
22 CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict); | 22 CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict); |
23 | 23 |
24 // CPDF_Object. | 24 // CPDF_Object. |
25 Type GetType() const override; | 25 Type GetType() const override; |
26 CPDF_Object* Clone() const override; | 26 CPDF_Object* Clone() const override; |
27 CPDF_Dictionary* GetDict() const override; | 27 CPDF_Dictionary* GetDict() const override; |
28 CFX_WideString GetUnicodeText() const override; | 28 CFX_WideString GetUnicodeText() const override; |
29 bool IsStream() const override; | 29 bool IsStream() const override; |
30 CPDF_Stream* AsStream() override; | 30 CPDF_Stream* AsStream() override; |
31 const CPDF_Stream* AsStream() const override; | 31 const CPDF_Stream* AsStream() const override; |
(...skipping 20 matching lines...) Expand all Loading... |
52 std::set<const CPDF_Object*>* pVisited) const override; | 52 std::set<const CPDF_Object*>* pVisited) const override; |
53 | 53 |
54 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> m_pDict; | 54 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> m_pDict; |
55 bool m_bMemoryBased = true; | 55 bool m_bMemoryBased = true; |
56 uint32_t m_dwSize = 0; | 56 uint32_t m_dwSize = 0; |
57 std::unique_ptr<uint8_t, FxFreeDeleter> m_pDataBuf; | 57 std::unique_ptr<uint8_t, FxFreeDeleter> m_pDataBuf; |
58 IFX_FileRead* m_pFile = nullptr; | 58 IFX_FileRead* m_pFile = nullptr; |
59 }; | 59 }; |
60 | 60 |
61 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ | 61 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_ |
OLD | NEW |