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 #if !defined(MEMBUFINPUTSOURCE_HPP)
00097 #define MEMBUFINPUTSOURCE_HPP
00098
00099 #include <xercesc/sax/InputSource.hpp>
00100
00101 XERCES_CPP_NAMESPACE_BEGIN
00102
00103 class BinInputStream;
00104
00105
00134 class MemBufInputSource : public InputSource
00135 {
00136 public :
00137
00138
00139
00140
00143
00163 MemBufInputSource
00164 (
00165 const XMLByte* const srcDocBytes
00166 , const unsigned int byteCount
00167 , const XMLCh* const bufId
00168 , const bool adoptBuffer = false
00169 );
00170
00175 MemBufInputSource
00176 (
00177 const XMLByte* const srcDocBytes
00178 , const unsigned int byteCount
00179 , const char* const bufId
00180 , const bool adoptBuffer = false
00181 );
00183
00190 ~MemBufInputSource();
00192
00193
00194
00195
00196
00197
00200
00211 BinInputStream* makeStream() const;
00212
00214
00215
00216
00217
00218
00219
00223
00239 void setCopyBufToStream(const bool newState);
00240
00242
00243
00244 private :
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267 bool fAdopted;
00268 unsigned int fByteCount;
00269 bool fCopyBufToStream;
00270 const XMLByte* fSrcBytes;
00271 };
00272
00273
00274 inline void MemBufInputSource::setCopyBufToStream(const bool newState)
00275 {
00276 fCopyBufToStream = newState;
00277 }
00278
00279 XERCES_CPP_NAMESPACE_END
00280
00281 #endif