Loading...
Searching...
No Matches
FilterWriter.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPFiltersFilterWriter
6#define PDFTRON_H_CPPFiltersFilterWriter
7
8#include <C/Common/TRN_Types.h>
9#include <C/Filters/TRN_FilterWriter.h>
10#include <Filters/Filter.h>
11#include <Filters/FilterReader.h>
12
13 namespace pdftron {
14 namespace Filters {
15
16
29 class FilterWriter
30{
31 public:
32
33 FilterWriter ();
34 FilterWriter (Filter& filter);
35 ~FilterWriter ();
36
41 void WriteUChar(UChar ch);
42
47 void WriteInt(Int16 num);
48 void WriteInt(UInt16 num);
49 void WriteInt(Int32 num);
50 void WriteInt(UInt32 num);
51 void WriteInt(Int64 num);
52 void WriteInt(UInt64 num);
53
58 void WriteString(const std::string& str);
59
64 void WriteString(const char* str);
65
70 void WriteFilter(FilterReader& reader);
71
78 void WriteLine(const char* line, char eol = 0x0D);
79
85 size_t WriteBuffer(std::vector<unsigned char> buf);
86
87#ifndef SWIG
88 size_t WriteBuffer(const char* buf, size_t buf_size);
89#endif
90
95 void AttachFilter(Filter& filter);
96
100 Filter GetAttachedFilter();
101
117 void Seek(ptrdiff_t offset, Filter::ReferencePos origin);
118
125 ptrdiff_t Tell ();
126
131 size_t Count ();
132
136 void Flush ();
137
141 void FlushAll ();
142
143//private:
144// @cond PRIVATE_DOC
145#ifndef SWIGHIDDEN
146 TRN_FilterWriter m_impl;
147#endif
148// @endcond
149};
150
151
152
153#include <Impl/FilterWriter.inl>
154
155 }; // namespace Filters
156}; // namespace pdftron
157
158#endif // PDFTRON_H_CPPFiltersFilterWriter
Filter.h
FilterReader.h
pdftron::Filters::Filter
Definition Filter.h:46
pdftron::Filters::Filter::ReferencePos
ReferencePos
Definition Filter.h:173
pdftron::Filters::FilterReader
Definition FilterReader.h:30
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(Int64 num)
pdftron::Filters::FilterWriter::WriteLine
void WriteLine(const char *line, char eol=0x0D)
pdftron::Filters::FilterWriter::FilterWriter
FilterWriter(Filter &filter)
pdftron::Filters::FilterWriter::Flush
void Flush()
pdftron::Filters::FilterWriter::Seek
void Seek(ptrdiff_t offset, Filter::ReferencePos origin)
pdftron::Filters::FilterWriter::FilterWriter
FilterWriter()
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(UInt32 num)
pdftron::Filters::FilterWriter::WriteBuffer
size_t WriteBuffer(std::vector< unsigned char > buf)
pdftron::Filters::FilterWriter::WriteFilter
void WriteFilter(FilterReader &reader)
pdftron::Filters::FilterWriter::~FilterWriter
~FilterWriter()
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(UInt64 num)
pdftron::Filters::FilterWriter::Tell
ptrdiff_t Tell()
pdftron::Filters::FilterWriter::WriteBuffer
size_t WriteBuffer(const char *buf, size_t buf_size)
pdftron::Filters::FilterWriter::Count
size_t Count()
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(Int16 num)
pdftron::Filters::FilterWriter::FlushAll
void FlushAll()
pdftron::Filters::FilterWriter::AttachFilter
void AttachFilter(Filter &filter)
pdftron::Filters::FilterWriter::WriteString
void WriteString(const char *str)
pdftron::Filters::FilterWriter::WriteUChar
void WriteUChar(UChar ch)
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(Int32 num)
pdftron::Filters::FilterWriter::WriteInt
void WriteInt(UInt16 num)
pdftron::Filters::FilterWriter::WriteString
void WriteString(const std::string &str)
pdftron::Filters::FilterWriter::GetAttachedFilter
Filter GetAttachedFilter()
pdftron::Filters
Definition ASCII85Encode.h:13
pdftron
Definition BasicTypes.h:10
pdftron::UInt32
TRN_UInt32 UInt32
Definition BasicTypes.h:13
pdftron::Int32
TRN_Int32 Int32
Definition BasicTypes.h:16
pdftron::Int16
TRN_Int16 Int16
Definition BasicTypes.h:17
pdftron::UInt64
TRN_UInt64 UInt64
Definition BasicTypes.h:21
pdftron::UChar
TRN_UChar UChar
Definition BasicTypes.h:12
pdftron::UInt16
TRN_UInt16 UInt16
Definition BasicTypes.h:14
pdftron::Int64
TRN_Int64 Int64
Definition BasicTypes.h:20