|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Zero-copy input stream that reads from a raw memory buffer. More...
#include <aeongames/ProtoBufHelpers.hpp>


Public Member Functions | |
| BufferInputStream (const void *aData, size_t aSize) | |
| Constructs a BufferInputStream over a memory region. | |
| virtual | ~BufferInputStream () |
| Destructor. | |
| bool | Next (const void **data, int *size) override |
| Returns the next contiguous block of data from the buffer. | |
| void | BackUp (int count) override |
Backs up the read cursor by count bytes. | |
| bool | Skip (int count) override |
Skips forward count bytes in the buffer. | |
| google::protobuf::int64 | ByteCount () const override |
| Returns the total number of bytes read from the buffer so far. | |
Zero-copy input stream that reads from a raw memory buffer.
Implements the google::protobuf::io::ZeroCopyInputStream interface to allow Protocol Buffer parsing directly from memory without additional copies.
Definition at line 60 of file ProtoBufHelpers.hpp.
|
inline |
Constructs a BufferInputStream over a memory region.
| aData | Pointer to the start of the buffer. |
| aSize | Size of the buffer in bytes. |
Definition at line 67 of file ProtoBufHelpers.hpp.
|
inlinevirtual |
Destructor.
Definition at line 72 of file ProtoBufHelpers.hpp.
|
inlineoverride |
Backs up the read cursor by count bytes.
| count | Number of bytes to back up. Clamped to the start of the buffer. |
Definition at line 88 of file ProtoBufHelpers.hpp.
|
inlineoverride |
Returns the total number of bytes read from the buffer so far.
Definition at line 104 of file ProtoBufHelpers.hpp.
|
inlineoverride |
Returns the next contiguous block of data from the buffer.
| [out] | data | Set to point to the next block of available data. |
| [out] | size | Set to the number of bytes available at data. |
Definition at line 78 of file ProtoBufHelpers.hpp.
|
inlineoverride |
Skips forward count bytes in the buffer.
| count | Number of bytes to skip. Clamped to the end of the buffer. |
Definition at line 96 of file ProtoBufHelpers.hpp.