LegacyFilter.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Crosswalk team
00004 //
00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.  
00006 // Use of this software is subject to the terms of the Autodesk license agreement 
00007 // provided at the time of installation or download, or which otherwise accompanies 
00008 // this software in either electronic or hard copy form.
00009 //
00010 //***************************************************************************************
00011 
00012 #ifndef _LEGACYFILTER_H_
00013 #define _LEGACYFILTER_H_
00014 
00015 #include <SIBCUtil.h>
00016 #include <SIBCString.h>
00017 
00018 #include "CXSIFilter.h"
00019 
00020 #define BUFFER_FILTER_NAME  "Buffer"
00021 #define BUFFER_FILTER_ID        "buf"
00022 
00023 #define BUFFER_SIZE             (128 * 1024)
00024 
00026 /*
00027  * This class is used only for legacy read.
00028  */
00029 class CLegacyFilter : public CXSIFilter
00030 {
00031 public:
00035     CLegacyFilter();
00039     virtual ~CLegacyFilter();
00040 
00045     int Open ( CSIBCString in_szFilename,  _SI_FILE_MODE in_Mode );
00048     int Close ();
00049     
00055     int Read ( SI_Char * out_pBuffer, SI_Long in_lSize );
00061     int Write( SI_Char * in_pBuffer,  SI_Long in_lSize );
00062 
00063 
00067     int Eof();
00071     int Tell();
00072 private:
00073     void    Flush();
00074 
00075     CSIAccumString      m_szAccumBuffer;
00076 
00077 };
00078 
00079 #endif