#include <NetBitStreamReader.h>
◆ FNetBitStreamReader()
| UE::Net::FNetBitStreamReader::FNetBitStreamReader |
( |
| ) |
|
◆ ~FNetBitStreamReader()
| UE::Net::FNetBitStreamReader::~FNetBitStreamReader |
( |
| ) |
|
◆ CommitSubstream()
Commits a substream to this stream. Substreams that are overflown or do not belong to this stream will be ignored. If the substream is valid then this stream's bit position will be updated.
◆ CreateSubstream()
Creates a substream at the current bit position. The substream must be committed or discarded. Only one active substream at a time is allowed, but a substream can have an active substream as well. Once the substream has been commited or discarded a new substream may be created. No reads may be performed on this stream until the substream has been committed or discarded.
The returned FNetBitStreamReader will have similar behavior to a newly constructed regular FNetBitStreamWriter.
- Parameters
-
| MaxBitCount | The maximum allowed bits that may be read. The value will be clamped to the number of bits left in this stream/substream. If it's a requirement a specific size is supported you can verify it with GetBitsLeft(). |
- Returns
- A FNetBitStreamReader.
◆ DiscardSubstream()
Discards a substream of this stream. This stream's bit position will remain intact.
◆ DoOverflow()
| void UE::Net::FNetBitStreamReader::DoOverflow |
( |
| ) |
|
◆ GetAbsolutePosBits()
| uint32 UE::Net::FNetBitStreamReader::GetAbsolutePosBits |
( |
| ) |
const |
|
inline |
Returns the absolute bit position
◆ GetBitsLeft()
| uint32 UE::Net::FNetBitStreamReader::GetBitsLeft |
( |
| ) |
const |
|
inline |
Returns the number of bits that can be read before overflowing.
◆ GetPosBits()
| uint32 UE::Net::FNetBitStreamReader::GetPosBits |
( |
| ) |
const |
|
inline |
Returns the current bit position
◆ GetPosBytes()
| uint32 UE::Net::FNetBitStreamReader::GetPosBytes |
( |
| ) |
const |
|
inline |
Returns the the current byte position.
◆ InitBits()
| void UE::Net::FNetBitStreamReader::InitBits |
( |
const void * |
Buffer, |
|
|
uint32 |
BitCount |
|
) |
| |
InitBits must be called before reading from the stream.
- Parameters
-
| Buffer | The buffer must be at least 4-byte aligned. |
| BitCount | The number of bits that is allowed to be read from the buffer. |
◆ IsOverflown()
| bool UE::Net::FNetBitStreamReader::IsOverflown |
( |
| ) |
const |
|
inline |
Returns whether the stream is overflown or not.
◆ ReadBits()
| uint32 UE::Net::FNetBitStreamReader::ReadBits |
( |
uint32 |
BitCount | ) |
|
Reads BitCount bits that are stored in the least significant bits in the return value. Other bits will be set to zero. If the BitCount exceeds the remaining space the function will return zero and the stream will be marked as overflown.
◆ ReadBitStream()
| void UE::Net::FNetBitStreamReader::ReadBitStream |
( |
uint32 * |
Dst, |
|
|
uint32 |
BitCount |
|
) |
| |
Reads BitCount bits and stores them in Dst, starting from bit offset 0. The bits will be stored as they are stored internally in this class, i.e. bits will be written from lower to higher memory addresses. If the BitCount exceeds the remaining space no bits will be written to Dst and the stream will be marked as overflown. It's up to the user to check for overflow.
◆ ReadBool()
| bool UE::Net::FNetBitStreamReader::ReadBool |
( |
| ) |
|
|
inline |
Reads a bool from the stream and returns the value, A failed read will always return false and stream will be marked as overflown
◆ Seek()
| void UE::Net::FNetBitStreamReader::Seek |
( |
uint32 |
BitPosition | ) |
|
Seek to a specific position from the start of the stream or substream. If the stream is overflown and you seek back to a position where you can still read bits the stream will no longer be considered overflown.
The documentation for this class was generated from the following files: