Filter.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_CPPFilterFilter
00007 #define   H_CPPFilterFilter
00008 
00009 #include <Common/UString.h>
00010 #include <C/Filters/TRN_Filter.h>
00011 #include <C/Common/TRN_Types.h>
00012 #include <stdio.h>
00013 
00014 namespace pdftron { 
00015         namespace Filters {
00016 
00046 class Filter
00047 {
00048 public:
00049          Filter();
00050          ~Filter ();
00051 
00052          Filter(const Filter& copy);
00053         
00054          Filter& operator=(const Filter& other);
00055 
00059          operator bool () { return m_impl!=0;}
00060 
00066          void AttachFilter(Filter attach_filter);
00067 
00074          Filter ReleaseAttachedFilter ();       
00075 
00079          Filter GetAttachedFilter ();
00080 
00084          Filter GetSourceFilter ();
00085 
00089          const char* GetName () const;
00090 
00096          const char* GetDecodeName () const;
00097 
00102          UChar* Begin ();
00103 
00108          ULong Size ();
00109 
00116          void Consume (ULong num_bytes);
00117 
00122          ULong Count ();
00123 
00132          ULong SetCount (ULong new_count);
00133 
00142          void SetStreamLength (ULong bytes); 
00143 
00148          void Flush ();
00149 
00153          void FlushAll ();
00154 
00158          bool IsInputFilter ();
00159 
00164          bool CanSeek ();
00165 
00169         enum ReferencePos 
00170         { 
00171                 e_begin = SEEK_SET,
00172                 e_end   = SEEK_END, 
00173                 e_cur   = SEEK_CUR
00174         };
00175 
00193          void Seek (long offset, ReferencePos origin);
00194 
00201          ULong Tell ();
00202 
00210          Filter CreateInputIterator ();
00211 
00216          const UString GetFilePath() const;
00217 
00218 
00220         TRN_Filter m_impl;
00221         Filter(TRN_Filter impl, bool is_owner);
00222         bool m_owner;
00224 };
00225 
00226 
00227 #include <Impl/Filter.inl>
00228 
00229 
00230         };      // namespace Filters
00231 };      // namespace pdftron
00232 
00233 #endif

© 2002-2008 PDFTron Systems Inc.