#include <NetBitStreamWriter.h>
◆ FNetBitStreamWriter()
| UE::Net::FNetBitStreamWriter::FNetBitStreamWriter |
( |
| ) |
|
◆ ~FNetBitStreamWriter()
| UE::Net::FNetBitStreamWriter::~FNetBitStreamWriter |
( |
| ) |
|
◆ 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. CommitWrites() is not called by this method.
◆ CommitWrites()
| void UE::Net::FNetBitStreamWriter::CommitWrites |
( |
| ) |
|
Commits pending writes to the buffer. Before this call, or the destruction of this instance, the buffer may not be up to date. Typically called after all WriteBits() calls have been made.
◆ 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 writes may be performed to this stream until the substream has been committed or discarded. Any write to a substream that occurs before overflow can modify the stream buffer contents regardless of whether the stream is committed or discarded.
The returned BitStreamWriter will have similar behavior to a newly constructed regular FNetBitStreamWriter.
- Parameters
-
| MaxBitCount | The maximum allowed bits that may be written. The value will be clamped to the number of bits left in this stream/substream. |
- Returns
- A BitStreamWriter that can be written to just like a regular BitStreamWriter.
◆ DiscardSubstream()
Discards a substream of this stream. This stream's bit position will remain intact. The buffer may be modified anyway as mentioned in CreateSubStream().
◆ DoOverflow()
| void UE::Net::FNetBitStreamWriter::DoOverflow |
( |
| ) |
|
◆ GetAbsolutePosBits()
| uint32 UE::Net::FNetBitStreamWriter::GetAbsolutePosBits |
( |
| ) |
const |
|
inline |
Returns the absolute bit position
◆ GetBitsLeft()
| uint32 UE::Net::FNetBitStreamWriter::GetBitsLeft |
( |
| ) |
const |
|
inline |
Returns the number of bits that can be written before overflowing.
◆ GetPosBits()
| uint32 UE::Net::FNetBitStreamWriter::GetPosBits |
( |
| ) |
const |
|
inline |
Returns the current bit position
◆ GetPosBytes()
| uint32 UE::Net::FNetBitStreamWriter::GetPosBytes |
( |
| ) |
const |
|
inline |
Returns the the current byte position.
◆ InitBytes()
| void UE::Net::FNetBitStreamWriter::InitBytes |
( |
void * |
Buffer, |
|
|
uint32 |
ByteCount |
|
) |
| |
InitBytes must be called before writing to the stream.
- Parameters
-
| Buffer | The buffer must be at least 4-byte aligned. |
| ByteCount | The number of bytes that is allowed to be written. Must be a multiple of 4. |
◆ IsOverflown()
| bool UE::Net::FNetBitStreamWriter::IsOverflown |
( |
| ) |
const |
|
inline |
Returns whether the stream is overflown or not.
◆ Seek()
| void UE::Net::FNetBitStreamWriter::Seek |
( |
uint32 |
BitPosition | ) |
|
Seek to a specific BitPosition. If the stream is overflown and you seek back to a position where you can still write bits the stream will no longer be considered overflown.
◆ WriteBits()
Writes the BitCount least significant bits from Value. There's no validation of the Value, meaning it is allowed to contain garbage in the bits that are not going to be written to the buffer. If the BitCount exceeds the remaining space no bits will be written and the stream will be marked as overflown.
◆ WriteBitStream()
| void UE::Net::FNetBitStreamWriter::WriteBitStream |
( |
const uint32 * |
Src, |
|
|
uint32 |
SrcBitOffset, |
|
|
uint32 |
BitCount |
|
) |
| |
Writes BitCount bits from Src starting at SrcBitOffset. Assumes that Src was written to via this class or that bits were written in order from lowest to highest memory address. If the BitCount exceeds the remaining space no bits will be written and the stream will be marked as overflown.
◆ WriteBool()
| bool UE::Net::FNetBitStreamWriter::WriteBool |
( |
bool |
Value | ) |
|
|
inline |
Writes a bool to the stream and returns the value of the bool
The documentation for this class was generated from the following files: