PoDoFo
1.0.0-dev
Loading...
Searching...
No Matches
src
podofo
main
PdfPostScriptTokenizer.h
1
7
#ifndef PDF_POSTSCRIPT_TOKENIZER_H
8
#define PDF_POSTSCRIPT_TOKENIZER_H
9
10
#include "PdfTokenizer.h"
11
#include "PdfVariant.h"
12
#include <podofo/auxiliary/InputDevice.h>
13
14
namespace
PoDoFo
{
15
18
enum class
PdfPostScriptTokenType
:
uint8_t
19
{
20
Unknown = 0,
21
Keyword
,
22
Variant
,
23
ProcedureEnter
,
24
ProcedureExit
,
25
};
26
29
class
PODOFO_API
PdfPostScriptTokenizer
final
:
private
PdfTokenizer
30
{
31
public
:
32
PdfPostScriptTokenizer
(PdfPostScriptLanguageLevel
level
= PdfPostScriptLanguageLevel::L2);
36
PdfPostScriptTokenizer
(
const
std::shared_ptr<charbuff>&
buffer
,
37
PdfPostScriptLanguageLevel
level
= PdfPostScriptLanguageLevel::L2);
38
public
:
39
bool
TryReadNext(
InputStreamDevice
&
device
,
PdfPostScriptTokenType
&
tokenType
, std::string_view&
keyword
,
PdfVariant
&
variant
);
40
void
ReadNextVariant(
InputStreamDevice
&
device
,
PdfVariant
&
variant
);
41
bool
TryReadNextVariant(
InputStreamDevice
&
device
,
PdfVariant
&
variant
);
42
};
43
44
};
45
46
#endif
// PDF_POSTSCRIPT_TOKENIZER_H
PoDoFo::InputStreamDevice
This class represents an input device It optionally supports peeking.
Definition
InputDevice.h:22
PoDoFo::PdfPostScriptTokenizer
This class is a parser for general PostScript content in PDF documents.
Definition
PdfPostScriptTokenizer.h:30
PoDoFo::PdfPostScriptTokenizer::PdfPostScriptTokenizer
PdfPostScriptTokenizer(const std::shared_ptr< charbuff > &buffer, PdfPostScriptLanguageLevel level=PdfPostScriptLanguageLevel::L2)
PoDoFo::PdfTokenizer
A simple tokenizer for PDF files and PDF content streams.
Definition
PdfTokenizer.h:36
PoDoFo::PdfVariant
A variant data type which supports all data types supported by the PDF standard.
Definition
PdfVariant.h:33
PoDoFo::charbuff_t
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition
basetypes.h:38
PoDoFo
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition
basetypes.h:16
PoDoFo::PdfPostScriptTokenType
PdfPostScriptTokenType
An enum describing the type of a read token.
Definition
PdfPostScriptTokenizer.h:19
PoDoFo::PdfPostScriptTokenType::ProcedureEnter
@ ProcedureEnter
Procedure enter delimiter.
PoDoFo::PdfPostScriptTokenType::Keyword
@ Keyword
The token is a PDF keyword.
PoDoFo::PdfPostScriptTokenType::Variant
@ Variant
The token is a PDF variant. A variant is usually a parameter to a keyword.
PoDoFo::PdfPostScriptTokenType::ProcedureExit
@ ProcedureExit
Procedure enter delimiter.
Generated by
1.9.8