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
00100
00101
00102
00103
00104
00105 #if !defined(MEMBUFINPUTSOURCE_HPP)
00106 #define MEMBUFINPUTSOURCE_HPP
00107
00108 #include <xercesc/sax/InputSource.hpp>
00109
00110 XERCES_CPP_NAMESPACE_BEGIN
00111
00112 class BinInputStream;
00113
00114
00143 class MemBufInputSource : public InputSource
00144 {
00145 public :
00146
00147
00148
00149
00152
00174 MemBufInputSource
00175 (
00176 const XMLByte* const srcDocBytes
00177 , const unsigned int byteCount
00178 , const XMLCh* const bufId
00179 , const bool adoptBuffer = false
00180 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00181 );
00182
00187 MemBufInputSource
00188 (
00189 const XMLByte* const srcDocBytes
00190 , const unsigned int byteCount
00191 , const char* const bufId
00192 , const bool adoptBuffer = false
00193 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00194 );
00196
00203 ~MemBufInputSource();
00205
00206
00207
00208
00209
00210
00213
00224 BinInputStream* makeStream() const;
00225
00227
00228
00229
00230
00231
00232
00236
00252 void setCopyBufToStream(const bool newState);
00253
00255
00256
00257 private :
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280 bool fAdopted;
00281 unsigned int fByteCount;
00282 bool fCopyBufToStream;
00283 const XMLByte* fSrcBytes;
00284 };
00285
00286
00287 inline void MemBufInputSource::setCopyBufToStream(const bool newState)
00288 {
00289 fCopyBufToStream = newState;
00290 }
00291
00292 XERCES_CPP_NAMESPACE_END
00293
00294 #endif