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
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 #if !defined(MEMBUFINPUTSOURCE_HPP)
00100 #define MEMBUFINPUTSOURCE_HPP
00101
00102 #include <xercesc/sax/InputSource.hpp>
00103
00104 XERCES_CPP_NAMESPACE_BEGIN
00105
00106 class BinInputStream;
00107
00108
00137 class MemBufInputSource : public InputSource
00138 {
00139 public :
00140
00141
00142
00143
00146
00166 MemBufInputSource
00167 (
00168 const XMLByte* const srcDocBytes
00169 , const unsigned int byteCount
00170 , const XMLCh* const bufId
00171 , const bool adoptBuffer
00172 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00173 );
00174
00179 MemBufInputSource
00180 (
00181 const XMLByte* const srcDocBytes
00182 , const unsigned int byteCount
00183 , const char* const bufId
00184 , const bool adoptBuffer = false
00185 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00186 );
00188
00195 ~MemBufInputSource();
00197
00198
00199
00200
00201
00202
00205
00216 BinInputStream* makeStream() const;
00217
00219
00220
00221
00222
00223
00224
00228
00244 void setCopyBufToStream(const bool newState);
00245
00247
00248
00249 private :
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272 bool fAdopted;
00273 unsigned int fByteCount;
00274 bool fCopyBufToStream;
00275 const XMLByte* fSrcBytes;
00276 };
00277
00278
00279 inline void MemBufInputSource::setCopyBufToStream(const bool newState)
00280 {
00281 fCopyBufToStream = newState;
00282 }
00283
00284 XERCES_CPP_NAMESPACE_END
00285
00286 #endif