Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FLargeMemoryData Class Reference

#include <LargeMemoryData.h>

Public Member Functions

 FLargeMemoryData (const int64 PreAllocateBytes=0)
 
 ~FLargeMemoryData ()
 
bool Write (void *InData, int64 InOffset, int64 InNum)
 
FORCEINLINE void Append (void *InData, int64 InNum)
 
bool Read (void *OutData, int64 InOffset, int64 InNum) const
 
FORCEINLINE int64 GetSize () const
 
FORCEINLINE uint8 * GetData ()
 
FORCEINLINE const uint8 * GetData () const
 
uint8 * ReleaseOwnership ()
 
bool HasData () const
 
void Reserve (int64 Size)
 

Private Member Functions

 FLargeMemoryData (const FLargeMemoryData &)=delete
 
FLargeMemoryData & operator= (const FLargeMemoryData &)=delete
 
void GrowBuffer ()
 

Private Attributes

uint8 * Data
 
int64 NumBytes
 
int64 MaxBytes
 

Detailed Description

Data storage for the large memory reader and writer.

Definition at line 16 of file LargeMemoryData.h.

Constructor & Destructor Documentation

◆ FLargeMemoryData() [1/2]

FLargeMemoryData::FLargeMemoryData ( const int64 PreAllocateBytes = 0)
explicit

◆ ~FLargeMemoryData()

FLargeMemoryData::~FLargeMemoryData ( )

◆ FLargeMemoryData() [2/2]

FLargeMemoryData::FLargeMemoryData ( const FLargeMemoryData & )
privatedelete

Non-copyable

Member Function Documentation

◆ Append()

FORCEINLINE void FLargeMemoryData::Append ( void * InData,
int64 InNum )
inline

Append data at the given offset.

Definition at line 27 of file LargeMemoryData.h.

+ Here is the call graph for this function:

◆ GetData() [1/2]

FORCEINLINE uint8 * FLargeMemoryData::GetData ( )
inline

Returns the written data.

Definition at line 42 of file LargeMemoryData.h.

◆ GetData() [2/2]

FORCEINLINE const uint8 * FLargeMemoryData::GetData ( ) const
inline

Returns the written data.

Definition at line 48 of file LargeMemoryData.h.

◆ GetSize()

FORCEINLINE int64 FLargeMemoryData::GetSize ( ) const
inline

Gets the size of the data written.

Definition at line 36 of file LargeMemoryData.h.

+ Here is the caller graph for this function:

◆ GrowBuffer()

void FLargeMemoryData::GrowBuffer ( )
private

Resizes the data buffer to at least NumBytes with some slack

◆ HasData()

bool FLargeMemoryData::HasData ( ) const
inline

Check whether data is allocated or if the ownership was released.

Definition at line 57 of file LargeMemoryData.h.

◆ operator=()

FLargeMemoryData & FLargeMemoryData::operator= ( const FLargeMemoryData & )
privatedelete

◆ Read()

bool FLargeMemoryData::Read ( void * OutData,
int64 InOffset,
int64 InNum ) const

Read data at the given offset. Returns true if the data was read.

◆ ReleaseOwnership()

uint8 * FLargeMemoryData::ReleaseOwnership ( )

Releases ownership of the written data.

+ Here is the caller graph for this function:

◆ Reserve()

void FLargeMemoryData::Reserve ( int64 Size)
+ Here is the caller graph for this function:

◆ Write()

bool FLargeMemoryData::Write ( void * InData,
int64 InOffset,
int64 InNum )

Write data at the given offset. Returns true if the data was written.

+ Here is the caller graph for this function:

Member Data Documentation

◆ Data

uint8* FLargeMemoryData::Data
private

Memory owned by this archive. Ownership can be released by calling ReleaseOwnership()

Definition at line 71 of file LargeMemoryData.h.

◆ MaxBytes

int64 FLargeMemoryData::MaxBytes
private

Number of bytes currently allocated for our data buffer

Definition at line 77 of file LargeMemoryData.h.

◆ NumBytes

int64 FLargeMemoryData::NumBytes
private

Number of bytes currently written to our data buffer

Definition at line 74 of file LargeMemoryData.h.


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