|
| | PacketReader (const Packet &packet) |
| | Creates a reader around packet. More...
|
| |
| bool | empty () const |
| | Returns true if the reader has consumed all data, false otherwise. More...
|
| |
| bool | hasError () const |
| | Returns true if a reading error has been encountered, false otherwise. More...
|
| |
| template<typename TValue > |
| const TValue * | readFixed () |
| | Reads a fixed-sized value from the packet. More...
|
| |
| template<typename TEntity > |
| const TEntity * | readVariable () |
| | Reads a variable-sized value from the packet. More...
|
| |
|
| void | require (uint32_t numBytes, const char *message) |
| |
| void | advance (uint32_t numBytes) |
| |
| void | rewind (uint32_t numBytes) |
| |
Stateful packet reader.
- Note
- Behavior is undefined if error has been encountered on any previous call.
◆ PacketReader()
| catapult::ionet::PacketReader::PacketReader |
( |
const Packet & |
packet | ) |
|
|
inlineexplicit |
Creates a reader around packet.
◆ advance()
| void catapult::ionet::PacketReader::advance |
( |
uint32_t |
numBytes | ) |
|
|
inlineprivate |
◆ empty()
| bool catapult::ionet::PacketReader::empty |
( |
| ) |
const |
|
inline |
Returns true if the reader has consumed all data, false otherwise.
◆ hasError()
| bool catapult::ionet::PacketReader::hasError |
( |
| ) |
const |
|
inline |
Returns true if a reading error has been encountered, false otherwise.
◆ readFixed()
template<typename TValue >
| const TValue* catapult::ionet::PacketReader::readFixed |
( |
| ) |
|
|
inline |
Reads a fixed-sized value from the packet.
◆ readVariable()
template<typename TEntity >
| const TEntity* catapult::ionet::PacketReader::readVariable |
( |
| ) |
|
|
inline |
Reads a variable-sized value from the packet.
◆ require()
| void catapult::ionet::PacketReader::require |
( |
uint32_t |
numBytes, |
|
|
const char * |
message |
|
) |
| |
|
inlineprivate |
◆ rewind()
| void catapult::ionet::PacketReader::rewind |
( |
uint32_t |
numBytes | ) |
|
|
inlineprivate |
◆ m_hasError
| bool catapult::ionet::PacketReader::m_hasError |
|
private |
◆ m_numRemainingBytes
| uint32_t catapult::ionet::PacketReader::m_numRemainingBytes |
|
private |
◆ m_pData
| const uint8_t* catapult::ionet::PacketReader::m_pData |
|
private |
The documentation for this class was generated from the following file: