Weaponry Assembly System
WAS
Loading...
Searching...
No Matches
FIntegerPtr Struct Reference

#include <DynamicPointer.h>

Public Member Functions

 FIntegerPtr () noexcept
 
 FIntegerPtr (const FIntegerPtr &Other)=delete
 
 FIntegerPtr (FIntegerPtr &&Other) noexcept
 
 ~FIntegerPtr () noexcept
 
template<TAnyInt T>
void AllocateNewValue (T &&Value=T())
 
void Deactivate () noexcept
 
template<TAnyInt T>
Get () const
 
const void * GetPtr () const noexcept
 
template<TAnyInt T>
T & GetRef ()
 
template<TAnyInt T>
const T & GetRef () const
 
uint8 GetSize () const noexcept
 
BiggestUnsigned GetValueRaw () const noexcept
 
template<typename T >
void Initialize ()
 
bool IsActive () const noexcept
 
template<TAnyInt T>
bool IsEqual (T Operational) const
 
bool IsExternal () const noexcept
 
bool IsInternal () const noexcept
 
bool IsSigned () const noexcept
 
bool IsUnsigned () const noexcept
 
bool IsValid () const noexcept
 
 operator bool () const
 
template<TAnyInt T>
 operator T () const
 
FIntegerPtroperator= (const FIntegerPtr &Other)=delete
 
FIntegerPtroperator= (FIntegerPtr &&Other) noexcept
 
template<TAnyInt T>
FIntegerPtroperator= (T Other)
 
bool operator== (const FIntegerPtr &Other) const noexcept
 
template<TAnyInt T>
bool operator== (T Other) const
 
void Reset ()
 
void SetActive () noexcept
 
template<TAnyInt T>
SetEqualTo (T Operational)
 
template<typename T >
void SetExternalPointer (T Pointer)
 
void SetExternalPointer (void *Pointer, uint8 Size, bool bSigned)
 
void SetSize (uint8 NewSize)
 
void ShareFromOther (FIntegerPtr &Other)
 
bool SharesPointer (const FIntegerPtr &Other) const noexcept
 
template<TAnyInt T>
int8 TypeSizeComparison () const
 

Static Public Member Functions

template<auto Callable, typename ConvertTo , typename VoidType , typename List , size_t Is, bool IsConst, typename... Args>
static ConvertTo Func (VoidType Ptr, Args... args)
 

Constructor & Destructor Documentation

◆ FIntegerPtr() [1/3]

FIntegerPtr::FIntegerPtr ( const FIntegerPtr & Other)
delete

◆ FIntegerPtr() [2/3]

FIntegerPtr::FIntegerPtr ( )
inlinenoexcept

◆ FIntegerPtr() [3/3]

FIntegerPtr::FIntegerPtr ( FIntegerPtr && Other)
inlinenoexcept

◆ ~FIntegerPtr()

FIntegerPtr::~FIntegerPtr ( )
inlinenoexcept

Member Function Documentation

◆ AllocateNewValue()

template<TAnyInt T>
void FIntegerPtr::AllocateNewValue ( T && Value = T())
inline

Allocates and stores an integer value inline.

Template Parameters
TInteger type to store.
Parameters
ValueValue to store (defaults to zero-initialized).

◆ Deactivate()

void FIntegerPtr::Deactivate ( )
inlinenoexcept

◆ Func()

template<auto Callable, typename ConvertTo , typename VoidType , typename List , size_t Is, bool IsConst, typename... Args>
static ConvertTo FIntegerPtr::Func ( VoidType Ptr,
Args... args )
inlinestatic

◆ Get()

template<TAnyInt T>
T FIntegerPtr::Get ( ) const
inline

◆ GetPtr()

const void * FIntegerPtr::GetPtr ( ) const
inlinenoexcept

Returns pointer to the stored integer (internal or external).

◆ GetRef() [1/2]

template<TAnyInt T>
T & FIntegerPtr::GetRef ( )
inline

Returns mutable reference to the stored integer.

Template Parameters
TExpected integer type.
Returns
Reference to the value (must match actual type).
Warning
Behavior is undefined if T does not match the actual stored type. Use with caution.

◆ GetRef() [2/2]

template<TAnyInt T>
const T & FIntegerPtr::GetRef ( ) const
inline

Returns const reference to the stored integer.

Template Parameters
TExpected integer type.
Returns
Const reference to the value.

◆ GetSize()

uint8 FIntegerPtr::GetSize ( ) const
inlinenoexcept

◆ GetValueRaw()

BiggestUnsigned FIntegerPtr::GetValueRaw ( ) const
inlinenoexcept

Returns raw stored value (internal storage only).

◆ Initialize()

template<typename T >
void FIntegerPtr::Initialize ( )
inline

Initializes pointer metadata for type T. Must be called before setting values.

Template Parameters
TInteger type or pointer to integer type.

◆ IsActive()

bool FIntegerPtr::IsActive ( ) const
inlinenoexcept

◆ IsEqual()

template<TAnyInt T>
bool FIntegerPtr::IsEqual ( T Operational) const
inline

Tests equality between stored value and integer.

◆ IsExternal()

bool FIntegerPtr::IsExternal ( ) const
inlinenoexcept

◆ IsInternal()

bool FIntegerPtr::IsInternal ( ) const
inlinenoexcept

◆ IsSigned()

bool FIntegerPtr::IsSigned ( ) const
inlinenoexcept

◆ IsUnsigned()

bool FIntegerPtr::IsUnsigned ( ) const
inlinenoexcept

◆ IsValid()

bool FIntegerPtr::IsValid ( ) const
inlinenoexcept

◆ operator bool()

FIntegerPtr::operator bool ( ) const
inlineexplicit

Bool conversion (true if valid).

◆ operator T()

template<TAnyInt T>
FIntegerPtr::operator T ( ) const
inline

Implicit conversion to integer (returns value via Get<T>).

◆ operator=() [1/3]

FIntegerPtr & FIntegerPtr::operator= ( const FIntegerPtr & Other)
delete

Copy assignment deleted to prevent accidental pointer sharing.

◆ operator=() [2/3]

FIntegerPtr & FIntegerPtr::operator= ( FIntegerPtr && Other)
inlinenoexcept

Move assignment operator.

◆ operator=() [3/3]

template<TAnyInt T>
FIntegerPtr & FIntegerPtr::operator= ( T Other)
inline

Assignment from integer value.

◆ operator==() [1/2]

bool FIntegerPtr::operator== ( const FIntegerPtr & Other) const
inlinenoexcept

Compares stored values byte-for-byte for equality.

◆ operator==() [2/2]

template<TAnyInt T>
bool FIntegerPtr::operator== ( T Other) const
inline

Equality comparison with integer value.

◆ Reset()

void FIntegerPtr::Reset ( )
inline

Marks pointer as invalid and initializes to safe state.

◆ SetActive()

void FIntegerPtr::SetActive ( )
inlinenoexcept

◆ SetEqualTo()

template<TAnyInt T>
T FIntegerPtr::SetEqualTo ( T Operational)
inline

Sets stored value equal to integer and returns new value.

◆ SetExternalPointer() [1/2]

template<typename T >
void FIntegerPtr::SetExternalPointer ( T Pointer)
inline

Points to an external integer variable without taking ownership.

Template Parameters
TPointer to integer type.
Parameters
PointerAddress of the integer variable.

◆ SetExternalPointer() [2/2]

void FIntegerPtr::SetExternalPointer ( void * Pointer,
uint8 Size,
bool bSigned )
inline

Points to an external variable using reflection metadata. Used for FProperty access where type information comes from parameters.

Parameters
PointerAddress of the variable (from FNumericProperty).
SizeSize of the variable in bytes.
bSignedTrue if variable is signed integer.
Warning
This does not verify that the pointer is valid for the given size/type. Use with caution.

◆ SetSize()

void FIntegerPtr::SetSize ( uint8 NewSize)
inline

◆ ShareFromOther()

void FIntegerPtr::ShareFromOther ( FIntegerPtr & Other)
inline

Shares pointer with another FIntegerPtr, making both reference the same value.

Warning
Shares only the address; if Other resets or is destroyed, this becomes a dangling pointer.
Parameters
OtherSource pointer to share from.

◆ SharesPointer()

bool FIntegerPtr::SharesPointer ( const FIntegerPtr & Other) const
inlinenoexcept

Checks if two pointers reference the same address (both must be valid).

◆ TypeSizeComparison()

template<TAnyInt T>
int8 FIntegerPtr::TypeSizeComparison ( ) const
inline

Three-way comparison with integer value. Compares size of this pointer's type with sizeof(T).

Member Data Documentation

◆ Ptr

void* FIntegerPtr::Ptr

◆ Value

std::byte FIntegerPtr::Value[MaxSize]