Navigation
API > API/Runtime > API/Runtime/Core
Writes bitstreams.
| Name | FBitWriter |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Serialization/BitWriter.h |
| Include Path | #include "Serialization/BitWriter.h" |
Syntax
struct FBitWriter : public FBitArchive
Inheritance Hierarchy
- FArchiveState → FArchive → FBitArchive → FBitWriter
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FBitWriter
(
int64 InMaxBits, |
Constructor using known size the buffer needs to be | Serialization/BitWriter.h | |
FBitWriter
(
FBitWriter&& |
Serialization/BitWriter.h | ||
FBitWriter
(
const FBitWriter& |
Serialization/BitWriter.h | ||
FBitWriter () |
Default constructor. Zeros everything. | Serialization/BitWriter.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FBitWriter() |
Serialization/BitWriter.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowOverflow | bool | Whether or not overflowing is allowed (overflows silently) | Serialization/BitWriter.h | |
| bAllowResize | bool | Serialization/BitWriter.h | ||
| Buffer | TArray< uint8 > | Serialization/BitWriter.h | ||
| Max | int64 | Serialization/BitWriter.h | ||
| Num | int64 | Serialization/BitWriter.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AllowAppend
(
int64 LengthBits |
Serialization/BitWriter.h | ||
virtual void CountMemory
(
FArchive& Ar |
Counts the in-memory bytes used by this object | Serialization/BitWriter.h | |
const TArray< uint8 > * GetBuffer() |
Serialization/BitWriter.h | ||
const uint8 * GetData () |
Serialization/BitWriter.h | ||
uint8 * GetData () |
Returns a pointer to our internal buffer. | Serialization/BitWriter.h | |
int64 GetMaxBits() |
Returns the number of bits the buffer supports. | Serialization/BitWriter.h | |
int64 GetNumBits() |
Returns the number of bits written. | Serialization/BitWriter.h | |
int64 GetNumBytes() |
Returns the number of bytes written. | Serialization/BitWriter.h | |
void SetAllowOverflow
(
bool bInAllow |
Sets whether or not this writer intentionally allows overflows (to avoid logspam) | Serialization/BitWriter.h | |
void SetAllowResize
(
bool NewResize |
Serialization/BitWriter.h | ||
void SetNumBits
(
int64 NumBits |
Sets how many bits packet actually contains Must be not greater than max bits allowed Useful when writing bytes to buffer manually via pointer from GetData() | Serialization/BitWriter.h | |
void SetOverflowed
(
int32 LengthBits |
Marks this bit writer as overflowed. | Serialization/BitWriter.h | |
void WriteAlign() |
Serialization/BitWriter.h | ||
void WriteBit
(
uint8 In |
Serialization/BitWriter.h | ||
void WriteIntWrapped
(
uint32 Value, |
Serializes the specified Value, but does not bounds check against ValueMax; instead, it will wrap around if the value exceeds ValueMax (this differs from SerializeInt, which clamps) | Serialization/BitWriter.h |
Overridden from FBitArchive
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void SerializeBitsWithOffset
(
void* Src, |
Serialization/BitWriter.h |
Overridden from FArchive
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Serialize
(
void* Src, |
Serialization/BitWriter.h | ||
virtual void SerializeBits
(
void* Src, |
Serialization/BitWriter.h | ||
virtual void SerializeInt
(
uint32& Value, |
Serializes a compressed integer - Value must be < Max | Serialization/BitWriter.h | |
virtual void SerializeIntPacked
(
uint32& Value |
This function is bit compatible with FArchive::SerializeIntPacked. | Serialization/BitWriter.h |
Overridden from FArchiveState
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Reset() |
Resets the bit writer back to its initial state | Serialization/BitWriter.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FBitWriter & operator=
(
FBitWriter&& |
Serialization/BitWriter.h | ||
FBitWriter & operator=
(
const FBitWriter& |
Serialization/BitWriter.h |