# CXSIFilter.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 _CXSIFILTER_H_
    00013 #define _CXSIFILTER_H_
    00014
    00015 #include <SIBCUtil.h>
    00016 #include <SIBCString.h>
    00017
    00018 #define SI_MEMORY_FILE_NAME     "3DMEMORYBUFFER"
    00019
    00021
    00026 class CXSIFilter
    00027 {
    00028 public:
    00029
    00033     CXSIFilter();
    00037     virtual ~CXSIFilter();
    00038
    00039
    00045     void            SetName ( const CSIBCString & in_szName );
    00046
    00050     CSIBCString     GetName () ;
    00051
    00055     void            SetID ( const CSIBCString & in_szID );
    00059     CSIBCString&    GetID () ;
    00060
    00064     virtual void            SetHeader ( CSIBCString in_szHeader );
    00065
    00069     CSIBCString     GetHeader () ;
    00074     virtual void    WriteHeader();
    00075
    00080     virtual int Open ( CSIBCString in_szFilename, _SI_FILE_MODE in_Mode );
    00083     virtual int Close ();
    00084
    00085
    00091     virtual int Read ( SI_Char * out_pBuffer, SI_Long in_lSize );
    00097     virtual int Write( SI_Char * in_pBuffer,  SI_Long in_lSize );
    00098
    00102     virtual int Eof();
    00103
    00107     virtual int Tell();
    00108
    00112     void        SetSubFilter ( CXSIFilter *in_pSub ) { m_pSubFilter = in_pSub;} ;
    00116     CXSIFilter *GetSubFilter () { return m_pSubFilter ; };
    00117
    00118     int FillBuffer ( CSIBCString in_szFilename );
    00119 protected:
    00120
    00121     _SI_FILE    m_pStream;
    00122     CSIBCString m_szHeader;
    00123     CSIBCString m_szName;
    00124     CSIBCString m_szID;
    00125     CXSIFilter  *m_pSubFilter;
    00126     SI_Long     m_FileSize;
    00127     SI_Char     *m_pBuffer;
    00128     SI_Long     m_lSubFilterPos;
    00129     SI_Bool     m_bEof;
    00130
    00131 };
    00132
    00133 #endif