FilterWriter.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------------------
00002 // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved.
00003 // Consult legal.txt regarding legal and license information.
00004 //---------------------------------------------------------------------------------------
00005 
00006 #ifndef   H_CPPFilterFilterWriter
00007 #define   H_CPPFilterFilterWriter
00008 #include <C/Common/TRN_Types.h>
00009 #include <C/Filters/TRN_FilterWriter.h>
00010 #include <Filters/Filter.h>
00011 #include <Filters/FilterReader.h>
00012 
00013 namespace pdftron { 
00014         namespace Filters {
00015 
00016 
00029 class FilterWriter
00030 {
00031 public:
00032 
00033          FilterWriter (); 
00034          FilterWriter (Filter& filter);
00035          ~FilterWriter ();
00036 
00041          void WriteUChar(UChar ch);
00042 
00047          void WriteInt(int num);
00048 
00053          void WriteLong(long num);
00054 
00059          void WriteULong(ULong num);
00060 
00065          void WriteString(const std::string& str);
00066 
00071          void WriteString(const char* str);
00072 
00077          void WriteFilter(FilterReader& reader);
00078 
00083          void WriteLine(const char* line, char eol = 0x0D);
00084 
00089          ULong WriteBuffer(const char* buf, ULong buf_size);
00090 
00094          void AttachFilter(Filter& filter);
00095 
00099          Filter GetAttachedFilter();
00100 
00116          void Seek(long offset, Filter::ReferencePos origin);
00117 
00124          ULong Tell ();
00125 
00130          ULong Count ();
00131 
00135          void Flush ();
00136 
00140          void FlushAll ();
00141 
00142 
00143 //private:
00145         TRN_FilterWriter m_impl;
00147 };
00148 
00149 
00150 
00151 #include <Impl/FilterWriter.inl>
00152 
00153         };      // namespace Filters
00154 };      // namespace pdftron
00155 
00156 #endif
00157 

© 2002-2008 PDFTron Systems Inc.