Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FFrozenMemoryImagePtr Struct Reference

#include <MemoryImage.h>

Public Member Functions

bool IsFrozen () const
 
void SetIsFrozen (bool bTrue)
 
int64 GetOffsetFromThis () const
 
void SetOffsetFromThis (int64 Offset)
 
int32 GetTypeIndex () const
 
void SetTypeIndex (int32 TypeIndex)
 

Public Attributes

uint64 Packed
 

Static Public Attributes

static constexpr uint64 bIsFrozenBits = 1
 
static constexpr uint64 OffsetBits = 40
 
static constexpr uint64 TypeIndexBits = 64 - OffsetBits - bIsFrozenBits
 
static constexpr uint64 bIsFrozenShift = 0
 
static constexpr uint64 TypeIndexShift = bIsFrozenBits
 
static constexpr uint64 OffsetShift = bIsFrozenBits + TypeIndexBits
 
static constexpr uint64 bIsFrozenMask = (1ULL << bIsFrozenShift)
 
static constexpr uint64 TypeIndexMask = (((1ULL << TypeIndexBits) - 1ULL) << TypeIndexShift)
 
static constexpr uint64 OffsetMask = (((1ULL << OffsetBits) - 1ULL) << OffsetShift)
 

Detailed Description

Value of this struct should never be a valid unfrozen pointer (i.e. a memory address). We rely on real pointers to have lowest bit(s) 0 this days for the alignment, this is checked later. Unfortunately, we cannot use bitfields as their layout might be compiler-specific, and the data for the target platform is being prepared with a different compiler during the cook.

Definition at line 321 of file MemoryImage.h.

Member Function Documentation

◆ GetOffsetFromThis()

int64 FFrozenMemoryImagePtr::GetOffsetFromThis ( ) const
inline

Signed offset from the current position in the memory image.

Definition at line 349 of file MemoryImage.h.

◆ GetTypeIndex()

int32 FFrozenMemoryImagePtr::GetTypeIndex ( ) const
inline

The pointer type index in the pointer table. Does not store other negative values except for INDEX_NONE

Definition at line 363 of file MemoryImage.h.

◆ IsFrozen()

bool FFrozenMemoryImagePtr::IsFrozen ( ) const
inline

Whether the value is indeed a frozen pointer, must come first to avoid being set in regular pointers - which are expected to point at padded things so are never even.

Definition at line 338 of file MemoryImage.h.

◆ SetIsFrozen()

void FFrozenMemoryImagePtr::SetIsFrozen ( bool bTrue)
inline

Definition at line 343 of file MemoryImage.h.

◆ SetOffsetFromThis()

void FFrozenMemoryImagePtr::SetOffsetFromThis ( int64 Offset)
inline

Definition at line 357 of file MemoryImage.h.

◆ SetTypeIndex()

void FFrozenMemoryImagePtr::SetTypeIndex ( int32 TypeIndex)
inline

Definition at line 368 of file MemoryImage.h.

Member Data Documentation

◆ bIsFrozenBits

constexpr uint64 FFrozenMemoryImagePtr::bIsFrozenBits = 1
staticconstexpr

Definition at line 323 of file MemoryImage.h.

◆ bIsFrozenMask

constexpr uint64 FFrozenMemoryImagePtr::bIsFrozenMask = (1ULL << bIsFrozenShift)
staticconstexpr

Definition at line 331 of file MemoryImage.h.

◆ bIsFrozenShift

constexpr uint64 FFrozenMemoryImagePtr::bIsFrozenShift = 0
staticconstexpr

Definition at line 327 of file MemoryImage.h.

◆ OffsetBits

constexpr uint64 FFrozenMemoryImagePtr::OffsetBits = 40
staticconstexpr

Definition at line 324 of file MemoryImage.h.

◆ OffsetMask

constexpr uint64 FFrozenMemoryImagePtr::OffsetMask = (((1ULL << OffsetBits) - 1ULL) << OffsetShift)
staticconstexpr

Definition at line 333 of file MemoryImage.h.

◆ OffsetShift

constexpr uint64 FFrozenMemoryImagePtr::OffsetShift = bIsFrozenBits + TypeIndexBits
staticconstexpr

Definition at line 329 of file MemoryImage.h.

◆ Packed

uint64 FFrozenMemoryImagePtr::Packed

Definition at line 335 of file MemoryImage.h.

◆ TypeIndexBits

constexpr uint64 FFrozenMemoryImagePtr::TypeIndexBits = 64 - OffsetBits - bIsFrozenBits
staticconstexpr

Definition at line 325 of file MemoryImage.h.

◆ TypeIndexMask

constexpr uint64 FFrozenMemoryImagePtr::TypeIndexMask = (((1ULL << TypeIndexBits) - 1ULL) << TypeIndexShift)
staticconstexpr

Definition at line 332 of file MemoryImage.h.

◆ TypeIndexShift

constexpr uint64 FFrozenMemoryImagePtr::TypeIndexShift = bIsFrozenBits
staticconstexpr

Definition at line 328 of file MemoryImage.h.


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