StdFile.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_CPPFilterStdFile
00007 #define   H_CPPFilterStdFile
00008 
00009 
00010 #include <Common/UString.h>
00011 #include <Filters/Filter.h>
00012 #include <Common/Common.h>
00013 #include <C/Filters/TRN_Filter.h>
00014 
00015 namespace pdftron { 
00016         namespace Filters {
00017 
00036 class StdFile : public Filter
00037 {
00038 public:
00039 
00040         enum OpenMode
00041         {
00042                 e_read_mode,   
00043                 e_write_mode,  
00044                 e_append_mode, 
00045         };
00046 
00050         StdFile (const UString& filename, OpenMode open_mode, ULong buf_sz = 1024);
00051         StdFile (const char* filename, OpenMode open_mode, ULong buf_sz = 1024);
00052 
00060         StdFile (FILE* stm, OpenMode open_mode, ULong buf_sz = 1024);
00061 
00067         bool operator == (const StdFile& f) const;
00068 
00074         static bool Equivalent( const UString& ph1, const UString& ph2);
00075 
00079         ULong FileSize();
00080 
00081 
00082 };
00083 
00084 #include <Impl/StdFile.inl>
00085         
00086         };      // namespace Filters
00087 };      // namespace pdftron
00088 
00089 #endif
00090 
00091 

© 2002-2008 PDFTron Systems Inc.