7#ifndef CORE_FPDFDOC_CPDF_STRUCTELEMENT_H_
8#define CORE_FPDFDOC_CPDF_STRUCTELEMENT_H_
12#include "core/fxcrt/fx_string.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "core/fxcrt/unowned_ptr.h"
15#include "third_party/abseil-cpp/absl/types/optional.h"
25 ByteString
GetType()
const {
return m_Type; }
39 CPDF_StructElement* pElement);
41 CPDF_StructElement*
GetParent()
const {
return m_pParentElement; }
42 void SetParent(CPDF_StructElement* pParentElement) {
43 m_pParentElement = pParentElement;
48 enum Type { kInvalid, kElement, kPageContent, kStreamContent, kObject };
54 Type m_Type = kInvalid;
55 uint32_t m_PageObjNum = 0;
56 uint32_t m_RefObjNum = 0;
57 uint32_t m_ContentId = 0;
67 void LoadKid(uint32_t page_obj_num,
72 RetainPtr<
const CPDF_Dictionary>
const m_pDict;
73 UnownedPtr<CPDF_StructElement> m_pParentElement;
74 const ByteString m_Type;
75 std::vector<Kid> m_Kids;
int GetIntegerFor(const ByteString &key) const
ByteString GetNameFor(const ByteString &key) const
uint32_t GetRefObjNum() const
~CPDF_StructElement() override
void SetParent(CPDF_StructElement *pParentElement)
int GetKidContentId(size_t index) const
absl::optional< WideString > GetID() const
bool UpdateKidIfElement(const CPDF_Dictionary *pDict, CPDF_StructElement *pElement)
ByteString GetType() const
RetainPtr< const CPDF_Object > GetK() const
WideString GetTitle() const
absl::optional< WideString > GetLang() const
CPDF_StructElement * GetKidIfElement(size_t index) const
WideString GetActualText() const
CPDF_StructElement * GetParent() const
ByteString GetObjType() const
WideString GetAltText() const
RetainPtr< const CPDF_Object > GetA() const
bool operator==(const char *ptr) const
#define CONSTRUCT_VIA_MAKE_RETAIN