All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FilterWriter.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2024 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 
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 
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
TRN_Int64 Int64
Definition: BasicTypes.h:20
TRN_UInt16 UInt16
Definition: BasicTypes.h:14
TRN_Int16 Int16
Definition: BasicTypes.h:17
TRN_UInt64 UInt64
Definition: BasicTypes.h:21
void Seek(ptrdiff_t offset, Filter::ReferencePos origin)
void WriteLine(const char *line, char eol=0x0D)
void WriteString(const std::string &str)
TRN_Int32 Int32
Definition: BasicTypes.h:16
size_t WriteBuffer(std::vector< unsigned char > buf)
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
void AttachFilter(Filter &filter)
TRN_UChar UChar
Definition: BasicTypes.h:12
void WriteFilter(FilterReader &reader)