7#include "core/fpdfapi/parser/cpdf_object.h"
11#include "core/fpdfapi/parser/cpdf_array.h"
12#include "core/fpdfapi/parser/cpdf_dictionary.h"
13#include "core/fpdfapi/parser/cpdf_indirect_object_holder.h"
14#include "core/fpdfapi/parser/cpdf_parser.h"
15#include "core/fpdfapi/parser/cpdf_reference.h"
16#include "core/fxcrt/fx_string.h"
17#include "third_party/base/check.h"
18#include "third_party/base/notreached.h"
22static_assert(
sizeof(uint64_t) >=
sizeof(
CPDF_Object*),
23 "Need a bigger type for cache keys");
26 "Need a smaller kMaxObjNumber for cache keys");
30 return (
static_cast<uint64_t>(1) << 63) |
reinterpret_cast<uint64_t>(
this);
32 return (
static_cast<uint64_t>(
m_ObjNum) << 32) |
49 std::set<
const CPDF_Object*> visited_objs;
50 return CloneNonCyclic(bDirect, &visited_objs);
54 return CloneObjectNonCyclic(
true);
59 std::set<
const CPDF_Object*>* pVisited)
const {
92 NOTREACHED_NORETURN();
170 return pdfium::MakeRetain<CPDF_Reference>(holder,
GetObjNum());
RetainPtr< const CPDF_Dictionary > GetDict() const
virtual WideString GetUnicodeText() const
virtual ByteString GetString() const
RetainPtr< const CPDF_Object > GetDirect() const
virtual CPDF_Null * AsMutableNull()
const CPDF_Name * AsName() const
const CPDF_Boolean * AsBoolean() const
virtual void SetString(const ByteString &str)
const CPDF_Null * AsNull() const
virtual RetainPtr< CPDF_Reference > MakeReference(CPDF_IndirectObjectHolder *holder) const
RetainPtr< CPDF_Object > GetMutableDirect()
const CPDF_Array * AsArray() const
virtual int GetInteger() const
virtual float GetNumber() const
uint32_t GetObjNum() const
const CPDF_Dictionary * AsDictionary() const
RetainPtr< CPDF_Object > CloneDirectObject() const
virtual CPDF_Stream * AsMutableStream()
virtual CPDF_Number * AsMutableNumber()
virtual CPDF_Dictionary * AsMutableDictionary()
virtual RetainPtr< CPDF_Object > Clone() const =0
virtual CPDF_Reference * AsMutableReference()
const CPDF_Stream * AsStream() const
virtual const CPDF_Object * GetDirectInternal() const
virtual CPDF_Name * AsMutableName()
const CPDF_String * AsString() const
uint64_t KeyForCache() const
virtual CPDF_Array * AsMutableArray()
const CPDF_Reference * AsReference() const
virtual RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const
virtual CPDF_String * AsMutableString()
const CPDF_Number * AsNumber() const
RetainPtr< CPDF_Dictionary > GetMutableDict()
RetainPtr< CPDF_Object > CloneObjectNonCyclic(bool bDirect) const
virtual const CPDF_Dictionary * GetDictInternal() const
virtual CPDF_Boolean * AsMutableBoolean()
static constexpr uint32_t kMaxObjectNumber