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_SyntaxParser Class Reference

#include <cpdf_syntax_parser.h>

Collaboration diagram for CPDF_SyntaxParser:

Classes

struct  WordResult

Public Types

enum class  ParseType : bool { kStrict , kLoose }

Public Member Functions

 CPDF_SyntaxParser (RetainPtr< IFX_SeekableReadStream > pFileAccess)
 CPDF_SyntaxParser (RetainPtr< CPDF_ReadValidator > pValidator, FX_FILESIZE HeaderOffset)
 ~CPDF_SyntaxParser ()
void SetReadBufferSize (uint32_t read_buffer_size)
FX_FILESIZE GetPos () const
void SetPos (FX_FILESIZE pos)
RetainPtr< CPDF_ObjectGetObjectBody (CPDF_IndirectObjectHolder *pObjList)
RetainPtr< CPDF_ObjectGetIndirectObject (CPDF_IndirectObjectHolder *pObjList, ParseType parse_type)
ByteString GetKeyword ()
void ToNextLine ()
void ToNextWord ()
void RecordingToNextWord ()
bool BackwardsSearchToWord (ByteStringView word, FX_FILESIZE limit)
FX_FILESIZE FindTag (ByteStringView tag)
bool ReadBlock (pdfium::span< uint8_t > buffer)
bool GetCharAt (FX_FILESIZE pos, uint8_t &ch)
WordResult GetNextWord ()
ByteString PeekNextWord ()
RetainPtr< CPDF_ReadValidatorGetValidator () const
uint32_t GetDirectNum ()
bool GetNextChar (uint8_t &ch)
FX_FILESIZE GetDocumentSize () const
ByteString ReadString ()
DataVector< uint8_t > ReadHexString ()
void SetTrailerEnds (std::vector< unsigned int > *trailer_ends)

Static Public Member Functions

static std::unique_ptr< CPDF_SyntaxParserCreateForTesting (RetainPtr< IFX_SeekableReadStream > pFileAccess, FX_FILESIZE HeaderOffset)

Friends

class CPDF_DataAvail
class cpdf_syntax_parser_ReadHexString_Test

Detailed Description

Definition at line 32 of file cpdf_syntax_parser.h.

Member Enumeration Documentation

◆ ParseType

enum class CPDF_SyntaxParser::ParseType : bool
strong
Enumerator
kStrict 
kLoose 

Definition at line 34 of file cpdf_syntax_parser.h.

Constructor & Destructor Documentation

◆ CPDF_SyntaxParser() [1/2]

CPDF_SyntaxParser::CPDF_SyntaxParser ( RetainPtr< IFX_SeekableReadStream > pFileAccess)
explicit

Definition at line 93 of file cpdf_syntax_parser.cpp.

◆ CPDF_SyntaxParser() [2/2]

CPDF_SyntaxParser::CPDF_SyntaxParser ( RetainPtr< CPDF_ReadValidator > pValidator,
FX_FILESIZE HeaderOffset )

Definition at line 100 of file cpdf_syntax_parser.cpp.

References CPDF_SyntaxParser().

Referenced by CPDF_SyntaxParser().

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

◆ ~CPDF_SyntaxParser()

CPDF_SyntaxParser::~CPDF_SyntaxParser ( )
default

Member Function Documentation

◆ BackwardsSearchToWord()

bool CPDF_SyntaxParser::BackwardsSearchToWord ( ByteStringView word,
FX_FILESIZE limit )

Definition at line 879 of file cpdf_syntax_parser.cpp.

◆ CreateForTesting()

std::unique_ptr< CPDF_SyntaxParser > CPDF_SyntaxParser::CreateForTesting ( RetainPtr< IFX_SeekableReadStream > pFileAccess,
FX_FILESIZE HeaderOffset )
static

Definition at line 85 of file cpdf_syntax_parser.cpp.

◆ FindTag()

FX_FILESIZE CPDF_SyntaxParser::FindTag ( ByteStringView tag)

Definition at line 913 of file cpdf_syntax_parser.cpp.

References GetNextChar(), and GetPos().

Here is the call graph for this function:

◆ GetCharAt()

bool CPDF_SyntaxParser::GetCharAt ( FX_FILESIZE pos,
uint8_t & ch )

Definition at line 110 of file cpdf_syntax_parser.cpp.

References GetNextChar().

Here is the call graph for this function:

◆ GetDirectNum()

uint32_t CPDF_SyntaxParser::GetDirectNum ( )

Definition at line 839 of file cpdf_syntax_parser.cpp.

◆ GetDocumentSize()

FX_FILESIZE CPDF_SyntaxParser::GetDocumentSize ( ) const

Definition at line 148 of file cpdf_syntax_parser.cpp.

Referenced by CPDF_LinearizedHeader::Parse().

Here is the caller graph for this function:

◆ GetIndirectObject()

RetainPtr< CPDF_Object > CPDF_SyntaxParser::GetIndirectObject ( CPDF_IndirectObjectHolder * pObjList,
ParseType parse_type )

Definition at line 617 of file cpdf_syntax_parser.cpp.

References GetKeyword(), GetNextWord(), GetPos(), GetValidator(), CPDF_SyntaxParser::WordResult::is_number, fxcrt::ByteString::operator!=(), and SetPos().

Referenced by CPDF_LinearizedHeader::Parse().

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

◆ GetKeyword()

ByteString CPDF_SyntaxParser::GetKeyword ( )

Definition at line 484 of file cpdf_syntax_parser.cpp.

References GetNextWord().

Referenced by GetIndirectObject().

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

◆ GetNextChar()

bool CPDF_SyntaxParser::GetNextChar ( uint8_t & ch)

Definition at line 135 of file cpdf_syntax_parser.cpp.

Referenced by FindTag(), GetCharAt(), ReadHexString(), ReadString(), RecordingToNextWord(), ToNextLine(), and ToNextWord().

Here is the caller graph for this function:

◆ GetNextWord()

CPDF_SyntaxParser::WordResult CPDF_SyntaxParser::GetNextWord ( )

Definition at line 469 of file cpdf_syntax_parser.cpp.

References GetValidator().

Referenced by GetIndirectObject(), GetKeyword(), CPDF_LinearizedHeader::Parse(), PeekNextWord(), and TEST().

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

◆ GetObjectBody()

RetainPtr< CPDF_Object > CPDF_SyntaxParser::GetObjectBody ( CPDF_IndirectObjectHolder * pObjList)

Definition at line 493 of file cpdf_syntax_parser.cpp.

References GetValidator(), and kLoose.

Here is the call graph for this function:

◆ GetPos()

FX_FILESIZE CPDF_SyntaxParser::GetPos ( ) const
inline

Definition at line 54 of file cpdf_syntax_parser.h.

Referenced by FindTag(), GetIndirectObject(), CPDF_LinearizedHeader::Parse(), and TEST().

Here is the caller graph for this function:

◆ GetValidator()

RetainPtr< CPDF_ReadValidator > CPDF_SyntaxParser::GetValidator ( ) const

Definition at line 847 of file cpdf_syntax_parser.cpp.

Referenced by GetIndirectObject(), GetNextWord(), GetObjectBody(), and CPDF_HintTables::Parse().

Here is the caller graph for this function:

◆ PeekNextWord()

ByteString CPDF_SyntaxParser::PeekNextWord ( )

Definition at line 479 of file cpdf_syntax_parser.cpp.

References GetNextWord().

Referenced by TEST().

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

◆ ReadBlock()

bool CPDF_SyntaxParser::ReadBlock ( pdfium::span< uint8_t > buffer)

Definition at line 168 of file cpdf_syntax_parser.cpp.

◆ ReadHexString()

DataVector< uint8_t > CPDF_SyntaxParser::ReadHexString ( )

Definition at line 325 of file cpdf_syntax_parser.cpp.

References FXSYS_HexCharToInt(), and GetNextChar().

Here is the call graph for this function:

◆ ReadString()

ByteString CPDF_SyntaxParser::ReadString ( )

Definition at line 239 of file cpdf_syntax_parser.cpp.

References fxcrt::ByteString::ByteString(), fxcrt::ByteString::ByteString(), FXSYS_DecimalCharToInt(), FXSYS_IsOctalDigit(), GetNextChar(), and fxcrt::ByteString::operator+=().

Here is the call graph for this function:

◆ RecordingToNextWord()

void CPDF_SyntaxParser::RecordingToNextWord ( )

Definition at line 415 of file cpdf_syntax_parser.cpp.

References GetNextChar(), kE, kF, kInitial, kInvalid, kNonPercent, kO, kPercent, PDFCharIsLineEnding(), and PDFCharIsWhitespace().

Referenced by ToNextWord().

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

◆ SetPos()

void CPDF_SyntaxParser::SetPos ( FX_FILESIZE pos)

Definition at line 488 of file cpdf_syntax_parser.cpp.

Referenced by GetIndirectObject(), CPDF_HintTables::Parse(), CPDF_LinearizedHeader::Parse(), and TEST().

Here is the caller graph for this function:

◆ SetReadBufferSize()

void CPDF_SyntaxParser::SetReadBufferSize ( uint32_t read_buffer_size)
inline

Definition at line 50 of file cpdf_syntax_parser.h.

◆ SetTrailerEnds()

void CPDF_SyntaxParser::SetTrailerEnds ( std::vector< unsigned int > * trailer_ends)
inline

Definition at line 87 of file cpdf_syntax_parser.h.

◆ ToNextLine()

void CPDF_SyntaxParser::ToNextLine ( )

Definition at line 360 of file cpdf_syntax_parser.cpp.

References GetNextChar().

Here is the call graph for this function:

◆ ToNextWord()

void CPDF_SyntaxParser::ToNextWord ( )

Definition at line 375 of file cpdf_syntax_parser.cpp.

References GetNextChar(), PDFCharIsLineEnding(), PDFCharIsWhitespace(), and RecordingToNextWord().

Here is the call graph for this function:

◆ CPDF_DataAvail

friend class CPDF_DataAvail
friend

Definition at line 94 of file cpdf_syntax_parser.h.

◆ cpdf_syntax_parser_ReadHexString_Test

friend class cpdf_syntax_parser_ReadHexString_Test
friend

Definition at line 95 of file cpdf_syntax_parser.h.


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