1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_CONTENTMARKITEM_H_ 8 #define CORE_FPDFAPI_PAGE_CPDF_CONTENTMARKITEM_H_ 9 10 #include <memory> 11 12 #include "core/fxcrt/fx_string.h" 13 #include "core/fxcrt/fx_system.h" 14 #include "core/fxcrt/retain_ptr.h" 15 16 class CPDF_Dictionary; 17 18 class CPDF_ContentMarkItem final : public Retainable { 19 public: 20 enum ParamType { kNone, kPropertiesDict, kDirectDict }; 21 22 explicit CPDF_ContentMarkItem(ByteString name); 23 ~CPDF_ContentMarkItem() override; 24 GetName()25 const ByteString& GetName() const { return m_MarkName; } GetParamType()26 ParamType GetParamType() const { return m_ParamType; } 27 const CPDF_Dictionary* GetParam() const; 28 CPDF_Dictionary* GetParam(); GetPropertyName()29 const ByteString& GetPropertyName() const { return m_PropertyName; } 30 bool HasMCID() const; 31 32 void SetDirectDict(RetainPtr<CPDF_Dictionary> pDict); 33 void SetPropertiesHolder(CPDF_Dictionary* pHolder, 34 const ByteString& property_name); 35 36 private: 37 ParamType m_ParamType = kNone; 38 ByteString m_MarkName; 39 ByteString m_PropertyName; 40 RetainPtr<CPDF_Dictionary> m_pPropertiesHolder; 41 RetainPtr<CPDF_Dictionary> m_pDirectDict; 42 }; 43 44 #endif // CORE_FPDFAPI_PAGE_CPDF_CONTENTMARKITEM_H_ 45