Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | List of all members
Photon.Deterministic.Native.Utility Class Referenceabstract

Represents a collection of memory utility functions that interact with the platform's native code directly. More...

Inheritance diagram for Photon.Deterministic.Native.Utility:
Photon.Deterministic.Native.LIBCUtility Photon.Deterministic.Native.MSVCRTUtility Quantum.QuantumUnityNativeUtility

Public Member Functions

abstract void Clear (void *dest, int count)
 Writes the desired number zeroed bytes to the specified memory location. More...
 
abstract int Compare (void *ptr1, void *ptr2, int count)
 Compares the first count bytes of these arrays. The comparison is done lexicographically. More...
 
abstract void Copy (void *dest, void *src, int count)
 Copies count bytes from the object pointed to by src to the object pointed to by dest. More...
 
void CopyArray< T > (T *source, int sourceIndex, T *destination, int destinationIndex, int count)
 Copies count bytes from the array pointed to by src to the array pointed to by dest. More...
 
void CopyArrayWithStride (void *source, int sourceIndex, void *destination, int destinationIndex, int count, int stride)
 Copies count bytes from the array pointed to by src to the array pointed to by dest. More...
 
abstract void Move (void *dest, void *src, int count)
 Copies count characters from the object pointed to by src to the object pointed to by dest. More...
 
abstract void Set (void *dest, byte value, int count)
 Copies the value into each of the first count characters of the object pointed to by dest. More...
 

Static Public Member Functions

static void ClearFast (void *dest, int count)
 
static void CopyFast (void *dest, void *src, int count)
 

Detailed Description

Represents a collection of memory utility functions that interact with the platform's native code directly.

Member Function Documentation

◆ Copy()

abstract void Photon.Deterministic.Native.Utility.Copy ( void *  dest,
void *  src,
int  count 
)
pure virtual

Copies count bytes from the object pointed to by src to the object pointed to by dest.

Parameters
destPointer to the memory location to copy to.
srcPointer to the memory location to copy from.
countNumber of bytes to copy.

Implemented in Quantum.QuantumUnityNativeUtility, Photon.Deterministic.Native.LIBCUtility, and Photon.Deterministic.Native.MSVCRTUtility.

◆ Clear()

abstract void Photon.Deterministic.Native.Utility.Clear ( void *  dest,
int  count 
)
pure virtual

Writes the desired number zeroed bytes to the specified memory location.

Parameters
destPointer to the object to fill.
countNumber of bytes to write.

Implemented in Quantum.QuantumUnityNativeUtility, Photon.Deterministic.Native.LIBCUtility, and Photon.Deterministic.Native.MSVCRTUtility.

◆ Move()

abstract void Photon.Deterministic.Native.Utility.Move ( void *  dest,
void *  src,
int  count 
)
pure virtual

Copies count characters from the object pointed to by src to the object pointed to by dest.

Parameters
destPointer to the memory location to copy to.
srcPointer to the memory location to copy from.
countNumber of bytes to copy.

Implemented in Quantum.QuantumUnityNativeUtility, Photon.Deterministic.Native.LIBCUtility, and Photon.Deterministic.Native.MSVCRTUtility.

◆ Set()

abstract void Photon.Deterministic.Native.Utility.Set ( void *  dest,
byte  value,
int  count 
)
pure virtual

Copies the value into each of the first count characters of the object pointed to by dest.

Parameters
destPinter to the object to fill.
valueThe byte to write.
countNumber of bytes to write.

Implemented in Quantum.QuantumUnityNativeUtility, Photon.Deterministic.Native.LIBCUtility, and Photon.Deterministic.Native.MSVCRTUtility.

◆ Compare()

abstract int Photon.Deterministic.Native.Utility.Compare ( void *  ptr1,
void *  ptr2,
int  count 
)
pure virtual

Compares the first count bytes of these arrays. The comparison is done lexicographically.

Parameters
ptr1Pointers to the left hand side memory buffers to compare.
ptr2Pointers to the right hand side memory buffers to compare.
countNumber of bytes to examine.
Returns
Negative value if the first differing byte in ptr1 is less than the corresponding byte in ptr2 . 0​ if all count bytes of ptr1 and ptr2 are equal. Positive value if the first differing byte in ptr1 is greater than the corresponding byte in ptr2 .

Implemented in Quantum.QuantumUnityNativeUtility, Photon.Deterministic.Native.LIBCUtility, and Photon.Deterministic.Native.MSVCRTUtility.

◆ CopyArrayWithStride()

void Photon.Deterministic.Native.Utility.CopyArrayWithStride ( void *  source,
int  sourceIndex,
void *  destination,
int  destinationIndex,
int  count,
int  stride 
)
inline

Copies count bytes from the array pointed to by src to the array pointed to by dest.

Requires the stride of the copy which represents the size of the array type.

Parameters
sourcePointer to the memory location to copy from.
sourceIndexThe offset to the source as in number stride .
destinationPointer to the memory location to copy to.
destinationIndexThe offset to the destination as in number of stride .
countNumber of times to copy stride bytes.
strideThe size of the type inside the array in bytes.

◆ CopyArray< T >()

void Photon.Deterministic.Native.Utility.CopyArray< T > ( T *  source,
int  sourceIndex,
T *  destination,
int  destinationIndex,
int  count 
)
inline

Copies count bytes from the array pointed to by src to the array pointed to by dest.

Template Parameters
TThe type of the array.
Parameters
sourcePointer to the memory location to copy from.
sourceIndexThe source array offset.
destinationPointer to the memory location to copy to.
destinationIndexThe destination array offset.
countThe number of array elements to copy.
Type Constraints
T :unmanaged