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 #if !defined(MEMBUFINPUTSOURCE_HPP)
00094 #define MEMBUFINPUTSOURCE_HPP
00095
00096 #include <xercesc/sax/InputSource.hpp>
00097
00098 class BinInputStream;
00099
00100
00129 class MemBufInputSource : public InputSource
00130 {
00131 public :
00132
00133
00134
00135
00138
00158 MemBufInputSource
00159 (
00160 const XMLByte* const srcDocBytes
00161 , const unsigned int byteCount
00162 , const XMLCh* const bufId
00163 , const bool adoptBuffer = false
00164 );
00165
00170 MemBufInputSource
00171 (
00172 const XMLByte* const srcDocBytes
00173 , const unsigned int byteCount
00174 , const char* const bufId
00175 , const bool adoptBuffer = false
00176 );
00178
00181
00185 ~MemBufInputSource();
00187
00188
00189
00190
00191
00192
00195
00206 BinInputStream* makeStream() const;
00207
00209
00210
00211
00212
00213
00214
00216
00218
00234 void setCopyBufToStream(const bool newState);
00235
00237
00238
00239 private :
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262 bool fAdopted;
00263 unsigned int fByteCount;
00264 bool fCopyBufToStream;
00265 const XMLByte* fSrcBytes;
00266 };
00267
00268
00269 inline void MemBufInputSource::setCopyBufToStream(const bool newState)
00270 {
00271 fCopyBufToStream = newState;
00272 }
00273
00274 #endif