Quantum 3 3.0.14

Public Member Functions | Public Attributes | List of all members
Photon.Deterministic.Native.AllocatorVTableManaged Class Reference

A class that wraps memory allocation methods to be used in native code parts of the engine. More...

Public Member Functions

unsafe AllocatorVTableManaged (AllocateDelegate malloc, FreeDelegate free, CopyDelegate memcpy, MoveDelegate memmove, SetDelegate memset, CompareDelegate memcmp)
 Create an allocator operations table. More...
 
unsafe AllocatorVTableManaged (Allocator alloc, Utility util)
 Create am allocator operations table. More...
 
AllocatorVTable Marshal ()
 Wrap the allocator operations table into a struct to be marshaled to native code. More...
 

Public Attributes

AllocateDelegate Allocate => _malloc
 Returns the Allocator.Alloc(int) method. More...
 
CompareDelegate Compare => _memcmp
 Returns the Utility.Compare method. More...
 
CopyDelegate Copy => _memcpy
 Returns the Utility.Copy method. More...
 
FreeDelegate Free => _free
 Returns the Allocator.Free method. More...
 
MoveDelegate Move => _memmove
 Returns the Utility.Move method. More...
 
SetDelegate Set => _memset
 Returns the Utility.Set method. More...
 

Detailed Description

A class that wraps memory allocation methods to be used in native code parts of the engine.

Constructor & Destructor Documentation

◆ AllocatorVTableManaged() [1/2]

unsafe Photon.Deterministic.Native.AllocatorVTableManaged.AllocatorVTableManaged ( Allocator  alloc,
Utility  util 
)
inline

Create am allocator operations table.

Parameters
allocThe allocator to use.
utilThe util methods to use.

◆ AllocatorVTableManaged() [2/2]

unsafe Photon.Deterministic.Native.AllocatorVTableManaged.AllocatorVTableManaged ( AllocateDelegate  malloc,
FreeDelegate  free,
CopyDelegate  memcpy,
MoveDelegate  memmove,
SetDelegate  memset,
CompareDelegate  memcmp 
)
inline

Create an allocator operations table.

Parameters
mallocThe explicit Allocate method.
freeThe explicit Free method.
memcpyThe explicit Copy method
memmoveThe explicit Move method.
memsetThe explicit Set method.
memcmpThe explicit Compare method.

Member Function Documentation

◆ Marshal()

AllocatorVTable Photon.Deterministic.Native.AllocatorVTableManaged.Marshal ( )
inline

Wrap the allocator operations table into a struct to be marshaled to native code.

Returns

Member Data Documentation

◆ Allocate

AllocateDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Allocate => _malloc

Returns the Allocator.Alloc(int) method.

◆ Free

FreeDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Free => _free

Returns the Allocator.Free method.

◆ Copy

CopyDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Copy => _memcpy

Returns the Utility.Copy method.

◆ Move

MoveDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Move => _memmove

Returns the Utility.Move method.

◆ Set

SetDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Set => _memset

Returns the Utility.Set method.

◆ Compare

CompareDelegate Photon.Deterministic.Native.AllocatorVTableManaged.Compare => _memcmp

Returns the Utility.Compare method.