Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDF_Object Class Referenceabstract

#include <cpdf_object.h>

+ Inheritance diagram for CPDF_Object:
+ Collaboration diagram for CPDF_Object:

Public Types

enum  Type {
  kBoolean = 1 , kNumber , kString , kName ,
  kArray , kDictionary , kStream , kNullobj ,
  kReference
}
 

Public Member Functions

uint32_t GetObjNum () const
 
void SetObjNum (uint32_t objnum)
 
uint32_t GetGenNum () const
 
void SetGenNum (uint32_t gennum)
 
bool IsInline () const
 
uint64_t KeyForCache () const
 
virtual Type GetType () const =0
 
virtual RetainPtr< CPDF_ObjectClone () const =0
 
RetainPtr< CPDF_ObjectCloneDirectObject () const
 
virtual ByteString GetString () const
 
virtual WideString GetUnicodeText () const
 
virtual float GetNumber () const
 
virtual int GetInteger () const
 
virtual void SetString (const ByteString &str)
 
virtual CPDF_ArrayAsMutableArray ()
 
virtual CPDF_BooleanAsMutableBoolean ()
 
virtual CPDF_DictionaryAsMutableDictionary ()
 
virtual CPDF_NameAsMutableName ()
 
virtual CPDF_NullAsMutableNull ()
 
virtual CPDF_NumberAsMutableNumber ()
 
virtual CPDF_ReferenceAsMutableReference ()
 
virtual CPDF_StreamAsMutableStream ()
 
virtual CPDF_StringAsMutableString ()
 
virtual bool WriteTo (IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const =0
 
virtual RetainPtr< CPDF_ObjectCloneNonCyclic (bool bDirect, std::set< const CPDF_Object * > *pVisited) const
 
virtual RetainPtr< CPDF_ReferenceMakeReference (CPDF_IndirectObjectHolder *holder) const
 
RetainPtr< const CPDF_ObjectGetDirect () const
 
RetainPtr< CPDF_ObjectGetMutableDirect ()
 
RetainPtr< const CPDF_DictionaryGetDict () const
 
RetainPtr< CPDF_DictionaryGetMutableDict ()
 
const CPDF_ArrayAsArray () const
 
const CPDF_BooleanAsBoolean () const
 
const CPDF_DictionaryAsDictionary () const
 
const CPDF_NameAsName () const
 
const CPDF_NullAsNull () const
 
const CPDF_NumberAsNumber () const
 
const CPDF_ReferenceAsReference () const
 
const CPDF_StreamAsStream () const
 
const CPDF_StringAsString () const
 
bool IsArray () const
 
bool IsBoolean () const
 
bool IsDictionary () const
 
bool IsName () const
 
bool IsNull () const
 
bool IsNumber () const
 
bool IsReference () const
 
bool IsStream () const
 
bool IsString () const
 
- Public Member Functions inherited from fxcrt::Retainable
 Retainable ()=default
 
bool HasOneRef () const
 

Static Public Attributes

static constexpr uint32_t kInvalidObjNum = static_cast<uint32_t>(-1)
 

Protected Member Functions

 CPDF_Object ()=default
 
 CPDF_Object (const CPDF_Object &src)=delete
 
 ~CPDF_Object () override
 
virtual const CPDF_ObjectGetDirectInternal () const
 
virtual const CPDF_DictionaryGetDictInternal () const
 
RetainPtr< CPDF_ObjectCloneObjectNonCyclic (bool bDirect) const
 
- Protected Member Functions inherited from fxcrt::Retainable
virtual ~Retainable ()=default
 

Protected Attributes

uint32_t m_ObjNum = 0
 
uint32_t m_GenNum = 0
 

Friends

class CPDF_Dictionary
 
class CPDF_Reference
 

Detailed Description

Definition at line 50 of file cpdf_object.h.

Member Enumeration Documentation

◆ Type

Enumerator
kBoolean 
kNumber 
kString 
kName 
kArray 
kDictionary 
kStream 
kNullobj 
kReference 

Definition at line 53 of file cpdf_object.h.

Constructor & Destructor Documentation

◆ CPDF_Object() [1/2]

CPDF_Object::CPDF_Object ( )
protecteddefault

◆ CPDF_Object() [2/2]

CPDF_Object::CPDF_Object ( const CPDF_Object & src)
protecteddelete

◆ ~CPDF_Object()

CPDF_Object::~CPDF_Object ( )
overrideprotecteddefault

Member Function Documentation

◆ AsArray()

const CPDF_Array * CPDF_Object::AsArray ( ) const

Definition at line 99 of file cpdf_object.cpp.

References AsMutableArray().

Referenced by CPDF_FormField::CountSelectedItems(), PDFObjectsTest::Equal(), CPDF_FormField::GetSelectedIndex(), IsArray(), CPDF_ColorSpace::Load(), operator<<(), and ToArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsBoolean()

const CPDF_Boolean * CPDF_Object::AsBoolean ( ) const

Definition at line 107 of file cpdf_object.cpp.

References AsMutableBoolean().

Referenced by IsBoolean(), and ToBoolean().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsDictionary()

const CPDF_Dictionary * CPDF_Object::AsDictionary ( ) const

Definition at line 115 of file cpdf_object.cpp.

References AsMutableDictionary().

Referenced by PDFObjectsTest::Equal(), IsDictionary(), operator<<(), TEST(), and ToDictionary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsMutableArray()

CPDF_Array * CPDF_Object::AsMutableArray ( )
virtual

Reimplemented in CPDF_Array.

Definition at line 95 of file cpdf_object.cpp.

Referenced by AsArray(), TEST(), TEST(), and ToArray().

+ Here is the caller graph for this function:

◆ AsMutableBoolean()

CPDF_Boolean * CPDF_Object::AsMutableBoolean ( )
virtual

Reimplemented in CPDF_Boolean.

Definition at line 103 of file cpdf_object.cpp.

Referenced by AsBoolean(), and ToBoolean().

+ Here is the caller graph for this function:

◆ AsMutableDictionary()

CPDF_Dictionary * CPDF_Object::AsMutableDictionary ( )
virtual

Reimplemented in CPDF_Dictionary.

Definition at line 111 of file cpdf_object.cpp.

Referenced by AsDictionary(), FPDFAttachment_SetFile(), and ToDictionary().

+ Here is the caller graph for this function:

◆ AsMutableName()

CPDF_Name * CPDF_Object::AsMutableName ( )
virtual

Reimplemented in CPDF_Name.

Definition at line 119 of file cpdf_object.cpp.

Referenced by AsName(), and ToName().

+ Here is the caller graph for this function:

◆ AsMutableNull()

CPDF_Null * CPDF_Object::AsMutableNull ( )
virtual

Reimplemented in CPDF_Null.

Definition at line 127 of file cpdf_object.cpp.

Referenced by AsNull().

+ Here is the caller graph for this function:

◆ AsMutableNumber()

CPDF_Number * CPDF_Object::AsMutableNumber ( )
virtual

Reimplemented in CPDF_Number.

Definition at line 135 of file cpdf_object.cpp.

Referenced by AsNumber(), and ToNumber().

+ Here is the caller graph for this function:

◆ AsMutableReference()

CPDF_Reference * CPDF_Object::AsMutableReference ( )
virtual

Reimplemented in CPDF_Reference.

Definition at line 143 of file cpdf_object.cpp.

Referenced by AsReference(), and ToReference().

+ Here is the caller graph for this function:

◆ AsMutableStream()

CPDF_Stream * CPDF_Object::AsMutableStream ( )
virtual

Reimplemented in CPDF_Stream.

Definition at line 151 of file cpdf_object.cpp.

Referenced by AsStream(), and ToStream().

+ Here is the caller graph for this function:

◆ AsMutableString()

CPDF_String * CPDF_Object::AsMutableString ( )
virtual

Reimplemented in CPDF_String.

Definition at line 159 of file cpdf_object.cpp.

Referenced by AsString(), and ToString().

+ Here is the caller graph for this function:

◆ AsName()

const CPDF_Name * CPDF_Object::AsName ( ) const

Definition at line 123 of file cpdf_object.cpp.

References AsMutableName().

Referenced by IsName(), and ToName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsNull()

const CPDF_Null * CPDF_Object::AsNull ( ) const

Definition at line 131 of file cpdf_object.cpp.

References AsMutableNull().

Referenced by IsNull().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsNumber()

const CPDF_Number * CPDF_Object::AsNumber ( ) const

Definition at line 139 of file cpdf_object.cpp.

References AsMutableNumber().

Referenced by PDFObjectsTest::Equal(), IsNumber(), and ToNumber().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsReference()

const CPDF_Reference * CPDF_Object::AsReference ( ) const

Definition at line 147 of file cpdf_object.cpp.

References AsMutableReference().

Referenced by PDFObjectsTest::Equal(), IsReference(), operator<<(), and ToReference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsStream()

const CPDF_Stream * CPDF_Object::AsStream ( ) const

Definition at line 155 of file cpdf_object.cpp.

References AsMutableStream().

Referenced by CPDF_Function::Init(), IsStream(), CPDF_ColorSpace::Load(), ToStream(), and CPDF_PSFunc::v_Init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsString()

const CPDF_String * CPDF_Object::AsString ( ) const

Definition at line 163 of file cpdf_object.cpp.

References AsMutableString().

Referenced by IsString(), operator<<(), and ToString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Clone()

virtual RetainPtr< CPDF_Object > CPDF_Object::Clone ( ) const
pure virtual

Implemented in CPDF_Array, CPDF_Boolean, CPDF_Dictionary, CPDF_Name, CPDF_Null, CPDF_Number, CPDF_Reference, CPDF_Stream, and CPDF_String.

Referenced by CloneNonCyclic().

+ Here is the caller graph for this function:

◆ CloneDirectObject()

RetainPtr< CPDF_Object > CPDF_Object::CloneDirectObject ( ) const

Definition at line 53 of file cpdf_object.cpp.

◆ CloneNonCyclic()

RetainPtr< CPDF_Object > CPDF_Object::CloneNonCyclic ( bool bDirect,
std::set< const CPDF_Object * > * pVisited ) const
virtual

Reimplemented in CPDF_Array, CPDF_Dictionary, CPDF_Reference, and CPDF_Stream.

Definition at line 57 of file cpdf_object.cpp.

References Clone().

+ Here is the call graph for this function:

◆ CloneObjectNonCyclic()

RetainPtr< CPDF_Object > CPDF_Object::CloneObjectNonCyclic ( bool bDirect) const
protected

Definition at line 48 of file cpdf_object.cpp.

Referenced by CPDF_Array::Clone(), CPDF_Dictionary::Clone(), CPDF_Reference::Clone(), and CPDF_Stream::Clone().

+ Here is the caller graph for this function:

◆ GetDict()

RetainPtr< const CPDF_Dictionary > CPDF_Object::GetDict ( ) const

Definition at line 79 of file cpdf_object.cpp.

References GetDictInternal().

Referenced by CPDF_Function::Load(), and CPDF_Stream::WriteTo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDictInternal()

const CPDF_Dictionary * CPDF_Object::GetDictInternal ( ) const
protectedvirtual

Reimplemented in CPDF_Dictionary, CPDF_Reference, and CPDF_Stream.

Definition at line 87 of file cpdf_object.cpp.

Referenced by GetDict(), CPDF_Reference::GetDictInternal(), and GetMutableDict().

+ Here is the caller graph for this function:

◆ GetDirect()

RetainPtr< const CPDF_Object > CPDF_Object::GetDirect ( ) const

Definition at line 40 of file cpdf_object.cpp.

References GetDirectInternal().

+ Here is the call graph for this function:

◆ GetDirectInternal()

const CPDF_Object * CPDF_Object::GetDirectInternal ( ) const
protectedvirtual

Reimplemented in CPDF_Reference.

Definition at line 44 of file cpdf_object.cpp.

Referenced by GetDirect(), and GetMutableDirect().

+ Here is the caller graph for this function:

◆ GetGenNum()

uint32_t CPDF_Object::GetGenNum ( ) const
inline

Definition at line 67 of file cpdf_object.h.

References m_GenNum.

Referenced by CPDF_IndirectObjectHolder::ReplaceIndirectObjectIfHigherGeneration().

+ Here is the caller graph for this function:

◆ GetInteger()

int CPDF_Object::GetInteger ( ) const
virtual

Reimplemented in CPDF_Boolean, CPDF_Number, and CPDF_Reference.

Definition at line 75 of file cpdf_object.cpp.

Referenced by PDFObjectsTest::Equal(), CPDF_Array::GetBooleanAt(), CPDF_Dictionary::GetBooleanFor(), CPDF_Reference::GetInteger(), CPDF_Dictionary::GetIntegerFor(), CPDF_Dictionary::GetIntegerFor(), and CPDF_FormField::GetSelectedIndex().

+ Here is the caller graph for this function:

◆ GetMutableDict()

RetainPtr< CPDF_Dictionary > CPDF_Object::GetMutableDict ( )

Definition at line 83 of file cpdf_object.cpp.

References GetDictInternal().

Referenced by CPDF_Array::GetMutableDictAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMutableDirect()

RetainPtr< CPDF_Object > CPDF_Object::GetMutableDirect ( )

Definition at line 36 of file cpdf_object.cpp.

References GetDirectInternal().

+ Here is the call graph for this function:

◆ GetNumber()

float CPDF_Object::GetNumber ( ) const
virtual

Reimplemented in CPDF_Number, and CPDF_Reference.

Definition at line 71 of file cpdf_object.cpp.

Referenced by CPDF_Dictionary::GetFloatFor(), and CPDF_Reference::GetNumber().

+ Here is the caller graph for this function:

◆ GetObjNum()

uint32_t CPDF_Object::GetObjNum ( ) const
inline

Definition at line 65 of file cpdf_object.h.

References m_ObjNum.

Referenced by MakeReference().

+ Here is the caller graph for this function:

◆ GetString()

ByteString CPDF_Object::GetString ( ) const
virtual

Reimplemented in CPDF_Boolean, CPDF_Name, CPDF_Number, CPDF_Reference, and CPDF_String.

Definition at line 63 of file cpdf_object.cpp.

References fxcrt::ByteString::ByteString().

Referenced by CPDF_FormField::CheckControl(), CPDF_FormField::CountSelectedItems(), PDFObjectsTest::Equal(), CPDF_Dictionary::GetByteStringFor(), CPDF_Dictionary::GetByteStringFor(), CPDF_Reference::GetString(), CPDF_ColorSpace::Load(), and operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetType()

virtual Type CPDF_Object::GetType ( ) const
pure virtual

Implemented in CPDF_Array, CPDF_Boolean, CPDF_Dictionary, CPDF_Name, CPDF_Null, CPDF_Number, CPDF_Reference, CPDF_Stream, and CPDF_String.

Referenced by PDFObjectsTest::Equal(), and operator<<().

+ Here is the caller graph for this function:

◆ GetUnicodeText()

WideString CPDF_Object::GetUnicodeText ( ) const
virtual

Reimplemented in CPDF_Name, CPDF_Stream, and CPDF_String.

Definition at line 67 of file cpdf_object.cpp.

References fxcrt::WideString::WideString().

Referenced by CPDF_FormField::GetSelectedIndex(), and CPDF_Dictionary::GetUnicodeTextFor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsArray()

bool CPDF_Object::IsArray ( ) const
inline

Definition at line 135 of file cpdf_object.h.

References AsArray().

+ Here is the call graph for this function:

◆ IsBoolean()

bool CPDF_Object::IsBoolean ( ) const
inline

Definition at line 136 of file cpdf_object.h.

References AsBoolean().

+ Here is the call graph for this function:

◆ IsDictionary()

bool CPDF_Object::IsDictionary ( ) const
inline

Definition at line 137 of file cpdf_object.h.

References AsDictionary().

+ Here is the call graph for this function:

◆ IsInline()

bool CPDF_Object::IsInline ( ) const
inline

Definition at line 69 of file cpdf_object.h.

References m_ObjNum.

Referenced by KeyForCache(), and MakeReference().

+ Here is the caller graph for this function:

◆ IsName()

bool CPDF_Object::IsName ( ) const
inline

Definition at line 138 of file cpdf_object.h.

References AsName().

Referenced by CPDF_ColorSpace::Load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsNull()

bool CPDF_Object::IsNull ( ) const
inline

Definition at line 139 of file cpdf_object.h.

References AsNull().

+ Here is the call graph for this function:

◆ IsNumber()

bool CPDF_Object::IsNumber ( ) const
inline

Definition at line 140 of file cpdf_object.h.

References AsNumber().

Referenced by CPDF_FormField::CountSelectedItems(), and CPDF_FormField::GetSelectedIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsReference()

bool CPDF_Object::IsReference ( ) const
inline

Definition at line 141 of file cpdf_object.h.

References AsReference().

+ Here is the call graph for this function:

◆ IsStream()

bool CPDF_Object::IsStream ( ) const
inline

Definition at line 142 of file cpdf_object.h.

References AsStream().

+ Here is the call graph for this function:

◆ IsString()

bool CPDF_Object::IsString ( ) const
inline

Definition at line 143 of file cpdf_object.h.

References AsString().

Referenced by CPDF_FormField::CountSelectedItems(), and CPDF_FormField::GetSelectedIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ KeyForCache()

uint64_t CPDF_Object::KeyForCache ( ) const

Definition at line 28 of file cpdf_object.cpp.

References IsInline(), m_GenNum, and m_ObjNum.

+ Here is the call graph for this function:

◆ MakeReference()

RetainPtr< CPDF_Reference > CPDF_Object::MakeReference ( CPDF_IndirectObjectHolder * holder) const
virtual

Reimplemented in CPDF_Reference.

Definition at line 167 of file cpdf_object.cpp.

References GetObjNum(), and IsInline().

+ Here is the call graph for this function:

◆ SetGenNum()

void CPDF_Object::SetGenNum ( uint32_t gennum)
inline

Definition at line 68 of file cpdf_object.h.

References m_GenNum.

◆ SetObjNum()

void CPDF_Object::SetObjNum ( uint32_t objnum)
inline

Definition at line 66 of file cpdf_object.h.

References m_ObjNum.

◆ SetString()

void CPDF_Object::SetString ( const ByteString & str)
virtual

Reimplemented in CPDF_Boolean, CPDF_Name, CPDF_Number, and CPDF_String.

Definition at line 91 of file cpdf_object.cpp.

◆ WriteTo()

virtual bool CPDF_Object::WriteTo ( IFX_ArchiveStream * archive,
const CPDF_Encryptor * encryptor ) const
pure virtual

Friends And Related Symbol Documentation

◆ CPDF_Dictionary

friend class CPDF_Dictionary
friend

Definition at line 146 of file cpdf_object.h.

◆ CPDF_Reference

friend class CPDF_Reference
friend

Definition at line 147 of file cpdf_object.h.

Member Data Documentation

◆ kInvalidObjNum

◆ m_GenNum

uint32_t CPDF_Object::m_GenNum = 0
protected

Definition at line 158 of file cpdf_object.h.

Referenced by GetGenNum(), KeyForCache(), and SetGenNum().

◆ m_ObjNum

uint32_t CPDF_Object::m_ObjNum = 0
protected

The documentation for this class was generated from the following files: