Represents an in-memory input byte stream.
More...
#include <memorystream.h>
|
| const Ch * | src_ |
| | Current read position.
|
| const Ch * | begin_ |
| | Original head of the string.
|
| const Ch * | end_ |
| | End of stream.
|
| size_t | size_ |
| | Size of the stream.
|
Represents an in-memory input byte stream.
This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream.
It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.
Differences between MemoryStream and StringStream:
- StringStream has encoding but MemoryStream is a byte stream.
- MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source.
- MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4().
- Note
- implements Stream concept
Definition at line 40 of file memorystream.h.
◆ Ch
◆ MemoryStream()
| MemoryStream::MemoryStream |
( |
const Ch * | src, |
|
|
size_t | size ) |
|
inline |
Definition at line 43 of file memorystream.h.
const Ch * end_
End of stream.
const Ch * src_
Current read position.
const Ch * begin_
Original head of the string.
size_t size_
Size of the stream.
◆ Flush()
| void MemoryStream::Flush |
( |
| ) |
|
|
inline |
Definition at line 51 of file memorystream.h.
#define RAPIDJSON_ASSERT(x)
Assertion.
◆ Peek()
| Ch MemoryStream::Peek |
( |
| ) |
const |
|
inline |
Definition at line 45 of file memorystream.h.
#define RAPIDJSON_UNLIKELY(x)
Compiler branching hint for expression with low probability to be true.
◆ Peek4()
| const Ch * MemoryStream::Peek4 |
( |
| ) |
const |
|
inline |
◆ Put()
| void MemoryStream::Put |
( |
Ch | | ) |
|
|
inline |
◆ PutBegin()
| Ch * MemoryStream::PutBegin |
( |
| ) |
|
|
inline |
◆ PutEnd()
| size_t MemoryStream::PutEnd |
( |
Ch * | | ) |
|
|
inline |
◆ Take()
| Ch MemoryStream::Take |
( |
| ) |
|
|
inline |
◆ Tell()
| size_t MemoryStream::Tell |
( |
| ) |
const |
|
inline |
◆ begin_
| const Ch* MemoryStream::begin_ |
◆ end_
| const Ch* MemoryStream::end_ |
◆ size_
| size_t MemoryStream::size_ |
◆ src_
| const Ch* MemoryStream::src_ |
The documentation for this struct was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/rapidjson/include/rapidjson/memorystream.h