UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStructBuilder Class Reference

#include <StructBuilder.h>

Public Member Functions

constexpr FStructBuilder ()
 
constexpr int32 AddMember (int32 MemberSize, int32 MemberAlignment)
 
constexpr int32 GetSize () const
 
constexpr int32 GetAlignment () const
 

Detailed Description

Lays out up a struct at runtime, in hopefully the same way as a compiler, and returns the offset of each member as it's added.

Constructor & Destructor Documentation

◆ FStructBuilder()

constexpr FStructBuilder::FStructBuilder ( )
inlineconstexpr

Member Function Documentation

◆ AddMember()

constexpr int32 FStructBuilder::AddMember ( int32  MemberSize,
int32  MemberAlignment 
)
inlineconstexpr

Adds a new member to the end of the struct.

Parameters
MemberSizeThe size of the member.
MemberAlignmentThe alignment of the member.
Returns
The offset of the member from the start of the struct.

◆ GetAlignment()

constexpr int32 FStructBuilder::GetAlignment ( ) const
inlineconstexpr

Returns the current alignment of the struct.

Returns
The alignment of the struct.

◆ GetSize()

constexpr int32 FStructBuilder::GetSize ( ) const
inlineconstexpr

Returns the current size of the struct.

Returns
The size of the struct.

The documentation for this class was generated from the following file: