| 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_PAGE_CPDF_CONTENTMARK_H_ | 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_CONTENTMARK_H_ |
| 8 #define CORE_FPDFAPI_PAGE_CPDF_CONTENTMARK_H_ | 8 #define CORE_FPDFAPI_PAGE_CPDF_CONTENTMARK_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void SetNull(); | 25 void SetNull(); |
| 26 | 26 |
| 27 int GetMCID() const; | 27 int GetMCID() const; |
| 28 int CountItems() const; | 28 int CountItems() const; |
| 29 const CPDF_ContentMarkItem& GetItem(int i) const; | 29 const CPDF_ContentMarkItem& GetItem(int i) const; |
| 30 | 30 |
| 31 bool HasMark(const CFX_ByteStringC& mark) const; | 31 bool HasMark(const CFX_ByteStringC& mark) const; |
| 32 bool LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const; | 32 bool LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const; |
| 33 void AddMark(const CFX_ByteString& name, | 33 void AddMark(const CFX_ByteString& name, |
| 34 CPDF_Dictionary* pDict, | 34 CPDF_Dictionary* pDict, |
| 35 FX_BOOL bDirect); | 35 bool bDirect); |
| 36 void DeleteLastMark(); | 36 void DeleteLastMark(); |
| 37 | 37 |
| 38 explicit operator bool() const { return !!m_Ref; } | 38 explicit operator bool() const { return !!m_Ref; } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 class MarkData { | 41 class MarkData { |
| 42 public: | 42 public: |
| 43 MarkData(); | 43 MarkData(); |
| 44 MarkData(const MarkData& src); | 44 MarkData(const MarkData& src); |
| 45 ~MarkData(); | 45 ~MarkData(); |
| 46 | 46 |
| 47 int CountItems() const; | 47 int CountItems() const; |
| 48 CPDF_ContentMarkItem& GetItem(int index); | 48 CPDF_ContentMarkItem& GetItem(int index); |
| 49 const CPDF_ContentMarkItem& GetItem(int index) const; | 49 const CPDF_ContentMarkItem& GetItem(int index) const; |
| 50 | 50 |
| 51 int GetMCID() const; | 51 int GetMCID() const; |
| 52 void AddMark(const CFX_ByteString& name, | 52 void AddMark(const CFX_ByteString& name, |
| 53 CPDF_Dictionary* pDict, | 53 CPDF_Dictionary* pDict, |
| 54 FX_BOOL bDictNeedClone); | 54 bool bDictNeedClone); |
| 55 void DeleteLastMark(); | 55 void DeleteLastMark(); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 std::vector<CPDF_ContentMarkItem> m_Marks; | 58 std::vector<CPDF_ContentMarkItem> m_Marks; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 CFX_SharedCopyOnWrite<MarkData> m_Ref; | 61 CFX_SharedCopyOnWrite<MarkData> m_Ref; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CORE_FPDFAPI_PAGE_CPDF_CONTENTMARK_H_ | 64 #endif // CORE_FPDFAPI_PAGE_CPDF_CONTENTMARK_H_ |
| OLD | NEW |