Loading...
Searching...
No Matches
Filter.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_CPPFiltersFilter
6#define PDFTRON_H_CPPFiltersFilter
7
8#include <Common/UString.h>
9#include <C/Filters/TRN_Filter.h>
10#include <C/Common/TRN_Types.h>
11#include <stdio.h>
12
13namespace pdftron {
14 namespace Filters {
15
45class Filter
46{
47public:
50
51 Filter(const Filter& copy);
52
53 Filter& operator=(const Filter& other);
54
58 operator bool () { return m_impl!=0;}
59
66 void AttachFilter(Filter attach_filter);
67
75
80
85
89 const char* GetName () const;
90
96 const char* GetDecodeName () const;
97
98#ifndef SWIG
104#endif
105
110 size_t Size ();
111
118 void Consume (size_t num_bytes);
119
124 size_t Count ();
125
135 size_t SetCount (size_t new_count);
136
145 void SetStreamLength (size_t bytes);
146
151 void Flush ();
152
156 void FlushAll ();
157
162
167 bool CanSeek ();
168
173 {
174 e_begin = SEEK_SET,
175 e_end = SEEK_END,
176 e_cur = SEEK_CUR
177 };
178
196 void Seek (ptrdiff_t offset, ReferencePos origin);
197
204 ptrdiff_t Tell ();
205
218 size_t Truncate (size_t new_size);
219
230
235 const UString GetFilePath() const;
236
240 void Destroy();
241
249 void WriteToFile(const UString& path, bool append);
250// @cond PRIVATE_DOC
251#ifndef SWIGHIDDEN
252 TRN_Filter m_impl;
253 Filter(TRN_Filter impl, bool is_owner);
254 bool m_owner;
255#endif
256// @endcond
257};
258
259
260#include <Impl/Filter.inl>
261
262
263 }; // namespace Filters
264}; // namespace pdftron
265
266#endif // PDFTRON_H_CPPFiltersFilter
const char * GetDecodeName() const
size_t Truncate(size_t new_size)
void WriteToFile(const UString &path, bool append)
void Seek(ptrdiff_t offset, ReferencePos origin)
size_t SetCount(size_t new_count)
void SetStreamLength(size_t bytes)
void Consume(size_t num_bytes)
const UString GetFilePath() const
Filter & operator=(const Filter &other)
void AttachFilter(Filter attach_filter)
Filter(const Filter &copy)
const char * GetName() const
TRN_UChar UChar
Definition BasicTypes.h:12