00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 #if !defined(MEMBUFINPUTSOURCE_HPP)
00088 #define MEMBUFINPUTSOURCE_HPP
00089 
00090 #include <sax/InputSource.hpp>
00091 
00092 class BinInputStream;
00093 
00094 
00123 class  MemBufInputSource : public InputSource
00124 {
00125 public :
00126     
00127     
00128     
00129 
00132 
00152     MemBufInputSource
00153     (
00154         const   XMLByte* const  srcDocBytes
00155         , const unsigned int    byteCount
00156         , const XMLCh* const    bufId
00157         , const bool            adoptBuffer = false
00158     );
00159 
00164     MemBufInputSource
00165     (
00166         const   XMLByte* const  srcDocBytes
00167         , const unsigned int    byteCount
00168         , const char* const     bufId
00169         , const bool            adoptBuffer = false
00170     );
00172 
00175 
00179     ~MemBufInputSource();
00181 
00182 
00183     
00184     
00185     
00186 
00189 
00200     BinInputStream* makeStream() const;
00201 
00203 
00204 
00205     
00206     
00207     
00208 
00210 
00212 
00228     void setCopyBufToStream(const bool newState);
00229 
00231 
00232 
00233 private :
00234     
00235     
00236     
00237     
00238     
00239     
00240     
00241     
00242     
00243     
00244     
00245     
00246     
00247     
00248     
00249     
00250     
00251     
00252     
00253     
00254     
00255     
00256     bool            fAdopted;
00257     unsigned int    fByteCount;
00258     bool            fCopyBufToStream;
00259     const XMLByte*  fSrcBytes;
00260 };
00261 
00262 
00263 inline void MemBufInputSource::setCopyBufToStream(const bool newState)
00264 {
00265     fCopyBufToStream = newState;
00266 }
00267 
00268 #endif