- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
13 namespace pdftron {
14 namespace Filters {
15
45 class Filter
46 {
47 public:
48 Filter();
49 ~Filter ();
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
74 Filter ReleaseAttachedFilter ();
75
79 Filter GetAttachedFilter ();
80
84 Filter GetSourceFilter ();
85
89 const char* GetName () const;
90
96 const char* GetDecodeName () const;
97
98 #ifndef SWIG
99
103 UChar* Begin ();
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
161 bool IsInputFilter ();
162
167 bool CanSeek ();
168
172 enum ReferencePos
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
229 Filter CreateInputIterator ();
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
pdftron::Filters::Filter::WriteToFile
void WriteToFile(const UString &path, bool append)
pdftron::Filters::Filter::Flush
void Flush()
pdftron::Filters::Filter::Seek
void Seek(ptrdiff_t offset, ReferencePos origin)
pdftron::Filters::Filter::Size
size_t Size()
UString.h
pdftron::Filters::Filter::e_begin
Definition: Filter.h:174
pdftron::Filters::Filter::~Filter
~Filter()
pdftron::Filters::Filter::Begin
UChar * Begin()
pdftron::Filters::Filter::Consume
void Consume(size_t num_bytes)
pdftron::Filters::Filter::Destroy
void Destroy()
pdftron::Filters::Filter::SetStreamLength
void SetStreamLength(size_t bytes)
pdftron::Filters::Filter::Count
size_t Count()
pdftron::Filters::Filter::GetName
const char * GetName() const
pdftron::Filters::Filter::CanSeek
bool CanSeek()
pdftron::Filters::Filter::IsInputFilter
bool IsInputFilter()
pdftron::Filters::Filter::GetSourceFilter
Filter GetSourceFilter()
pdftron::Filters::Filter::Tell
ptrdiff_t Tell()
pdftron::Filters::Filter::operator=
Filter & operator=(const Filter &other)
pdftron::Filters::Filter::ReleaseAttachedFilter
Filter ReleaseAttachedFilter()
pdftron::UChar
TRN_UChar UChar
Definition: BasicTypes.h:12
pdftron::Filters::Filter::e_end
Definition: Filter.h:175
pdftron::Filters::Filter::Filter
Filter()
pdftron::Filters::Filter::GetFilePath
const UString GetFilePath() const
pdftron::Filters::Filter
Definition: Filter.h:45
pdftron::Filters::Filter::Truncate
size_t Truncate(size_t new_size)
pdftron::Filters::Filter::CreateInputIterator
Filter CreateInputIterator()
pdftron::Filters::Filter::FlushAll
void FlushAll()
pdftron::Filters::Filter::e_cur
Definition: Filter.h:176
pdftron::Filters::Filter::GetDecodeName
const char * GetDecodeName() const
pdftron::Filters::Filter::ReferencePos
ReferencePos
Definition: Filter.h:172
pdftron::Filters::Filter::SetCount
size_t SetCount(size_t new_count)
pdftron::Filters::Filter::AttachFilter
void AttachFilter(Filter attach_filter)
pdftron::Filters::Filter::GetAttachedFilter
Filter GetAttachedFilter()
pdftron::UString
Definition: UString.h:27