#include <PdfTokenizer.h>
Inheritance diagram for PoDoFo::PdfTokenizer:
Public Member Functions | |
virtual bool | GetNextToken (const char *&pszToken, EPdfTokenType *peType=NULL) |
bool | IsNextToken (const char *pszToken) |
pdf_long | GetNextNumber () |
void | GetNextVariant (PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
Static Public Member Functions | |
PODOFO_NOTHROW bool | IsWhitespace (const unsigned char ch) |
PODOFO_NOTHROW bool | IsDelimiter (const unsigned char ch) |
PODOFO_NOTHROW bool | IsRegular (const unsigned char ch) |
PODOFO_NOTHROW bool | IsPrintable (const unsigned char ch) |
PODOFO_NOTHROW int | GetHexValue (const unsigned char ch) |
Static Public Attributes | |
const unsigned int | HEX_NOT_FOUND = std::numeric_limits<unsigned int>::max() |
Protected Member Functions | |
void | GetNextVariant (const char *pszToken, EPdfTokenType eType, PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
EPdfDataType | DetermineDataType (const char *pszToken, EPdfTokenType eType, PdfVariant &rVariant) |
void | ReadDictionary (PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
void | ReadArray (PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
void | ReadString (PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
void | ReadHexString (PdfVariant &rVariant, PdfEncrypt *pEncrypt) |
void | ReadName (PdfVariant &rVariant) |
void | QuequeToken (const char *pszToken, EPdfTokenType eType) |
|
Determine the possible datatype of a token. Numbers, reals, bools or NULL values are parsed directly by this function and saved to a variant.
|
|
Get the hex value from a static map of a given hex character (0-9, A-F, a-f).
|
|
Read the next number from the current file position ignoring all comments. Raises NoNumber exception if the next token is no number, and UnexpectedEOF if no token could be read. No token is consumed if NoNumber is thrown.
|
|
Reads the next token from the current file position ignoring all comments.
Reimplemented in PoDoFo::PdfContentsTokenizer. |
|
Read the next variant from the current file position ignoring all comments. Raises an exception if there is no variant left in the file.
|
|
Read the next variant from the current file position ignoring all comments. Raises an UnexpectedEOF exception if there is no variant left in the file.
|
|
Returns true if the given character is a delimiter according to the pdf reference
|
|
Reads the next token from the current file position ignoring all comments and compare the passed token to the read token. If there is no next token available, throws UnexpectedEOF.
|
|
True if the passed character is within the generally accepted "printable" ASCII range. |
|
True if the passed character is a regular character according to the PDF reference (Section 3.1.1, Character Set); ie it is neither a white-space nor a delimeter character. |
|
Returns true if the given character is a whitespace according to the pdf reference
|
|
Add a token to the queque of tokens. GetNextToken() will return all quequed tokens first before reading new tokens from the input device.
|
|
Read an array from the input device and store it into a variant.
|
|
Read a dictionary from the input device and store it into a variant.
|
|
Read a hex string from the input device and store it into a variant.
|
|
Read a name from the input device and store it into a variant. Throws UnexpectedEOF if there is nothing to read.
|
|
Read a string from the input device and store it into a variant.
|
|
Constant which is returned for invalid hex values. |