• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
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 "core/fxcrt/bytestring.h"
11 #include "core/fxcrt/retain_ptr.h"
12 
13 class CPDF_Dictionary;
14 
15 class CPDF_ContentMarkItem final : public Retainable {
16  public:
17   enum ParamType { kNone, kPropertiesDict, kDirectDict };
18 
19   explicit CPDF_ContentMarkItem(ByteString name);
20   ~CPDF_ContentMarkItem() override;
21 
GetName()22   const ByteString& GetName() const { return m_MarkName; }
GetParamType()23   ParamType GetParamType() const { return m_ParamType; }
24   RetainPtr<const CPDF_Dictionary> GetParam() const;
25   RetainPtr<CPDF_Dictionary> GetParam();
GetPropertyName()26   const ByteString& GetPropertyName() const { return m_PropertyName; }
27 
28   void SetDirectDict(RetainPtr<CPDF_Dictionary> pDict);
29   void SetPropertiesHolder(RetainPtr<CPDF_Dictionary> pHolder,
30                            const ByteString& property_name);
31 
32  private:
33   ParamType m_ParamType = kNone;
34   ByteString m_MarkName;
35   ByteString m_PropertyName;
36   RetainPtr<CPDF_Dictionary> m_pPropertiesHolder;
37   RetainPtr<CPDF_Dictionary> m_pDirectDict;
38 };
39 
40 #endif  // CORE_FPDFAPI_PAGE_CPDF_CONTENTMARKITEM_H_
41