Xerces-C++: MemBufInputSource.hpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#if !defined(XERCESC_INCLUDE_GUARD_MEMBUFINPUTSOURCE_HPP)
24#define XERCESC_INCLUDE_GUARD_MEMBUFINPUTSOURCE_HPP
25
27
29
31
32
64{
65public :
66
67
68
69
72
96 (
97 const XMLByte* const srcDocBytes
99 , const XMLCh* const bufId
100 , const bool adoptBuffer = false
102 );
103
109 (
110 const XMLByte* const srcDocBytes
112 , const char* const bufId
113 , const bool adoptBuffer = false
115 );
117
126
127
128
129
130
131
134
146
148
149
150
151
152
153
157
173 void setCopyBufToStream(const bool newState);
174
187
188
189private :
190
191
192
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218 bool fAdopted;
220 bool fCopyBufToStream;
221 const XMLByte* fSrcBytes;
222};
223
224
226{
227 fCopyBufToStream = newState;
228}
229
231
232#endif
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
unsigned char XMLByte
Definition XercesDefs.hpp:65
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Definition BinInputStream.hpp:30
A single input source for an XML entity.
Definition InputSource.hpp:63
This class is a derivative of the standard InputSource class.
Definition MemBufInputSource.hpp:64
void setCopyBufToStream(const bool newState)
By default, for safety's sake, each newly created stream from this input source will make its own cop...
Definition MemBufInputSource.hpp:225
MemBufInputSource(const XMLByte *const srcDocBytes, const XMLSize_t byteCount, const XMLCh *const bufId, const bool adoptBuffer=false, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
A memory buffer input source is constructed from a buffer of byte data, and the count of bytes in tha...
void resetMemBufInputSource(const XMLByte *const srcDocBytes, const XMLSize_t byteCount)
This methods allows the MemBufInputSource to be used for more than one input source,...
BinInputStream * makeStream() const
This method will return a binary input stream derivative that will parse from the memory buffer.
MemBufInputSource(const XMLByte *const srcDocBytes, const XMLSize_t byteCount, const char *const bufId, const bool adoptBuffer=false, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor is identical to the previous one, except that it takes the fake system id in local c...
~MemBufInputSource()
If the buffer was adopted, the copy made during construction is deleted at this point.
Configurable memory manager.
Definition MemoryManager.hpp:40
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121