System::Buffer Class Reference

Static Public Member Functions

static void BlockCopy (const uint8_t *src, int srcOffset, uint8_t *dst, int dstOffset, int count)
 
template<typename TSrc , typename TDst >
static void BlockCopy (const SharedPtr< Array< TSrc >> &src, int srcOffset, const SharedPtr< Array< TDst >> &dst, int dstOffset, int count)
 
template<class T >
static int ByteLength (const SharedPtr< Array< T >> &array)
 
template<typename T >
static uint8_t GetByte (const SharedPtr< Array< T >> &array, int index)
 
template<typename T >
static void SetByte (const SharedPtr< Array< T >> &array, int index, uint8_t value)
 

Detailed Description

Contains methods that manipulate raw byte arrays. This is a static type with no instance services. You should never create instances of it by any means.

Member Function Documentation

◆ BlockCopy() [1/2]

static void System::Buffer::BlockCopy ( const uint8_t *  src,
int  srcOffset,
uint8_t *  dst,
int  dstOffset,
int  count 
)
static

Copies a specified number of bytes from source buffer to destination buffer.

Parameters
srcPointer to the source buffer
srcOffsetA byte offset in source buffer at which copying starts
dstPointer to the destination buffer
dstOffsetA byte offset in the destination buffer at which to start inserting data
countThe number of bytes to copy

◆ BlockCopy() [2/2]

template<typename TSrc , typename TDst >
static void System::Buffer::BlockCopy ( const SharedPtr< Array< TSrc >> &  src,
int  srcOffset,
const SharedPtr< Array< TDst >> &  dst,
int  dstOffset,
int  count 
)
inlinestatic

Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another.

Parameters
srcThe source array
srcOffsetA byte offset in the tho source array at which copying starts
dstPointer to the destination buffer
dstOffsetA byte offset in the destination array at which to start inserting data
countThe number of bytes to copy
Template Parameters
TSrcThe type of elements of the source array
TDstThe type of elements of the destination array

◆ ByteLength()

template<class T >
static int System::Buffer::ByteLength ( const SharedPtr< Array< T >> &  array)
inlinestatic

Determines the number of bytes occupied by all elements of the specified array.

Parameters
arrayAn array
Returns
The number of bytes occupied by all elements of the specified array
Template Parameters
TThe type of elements of the array

◆ GetByte()

template<typename T >
static uint8_t System::Buffer::GetByte ( const SharedPtr< Array< T >> &  array,
int  index 
)
inlinestatic

Interprets the specified typed array as a raw byte array and retrieves the byte value at specified byte offset.

Parameters
arrayThe target array
indexZero-based offset of the byte to retrieve
Returns
The byte value at the specified index
Template Parameters
TThe type of elements of the array

◆ SetByte()

template<typename T >
static void System::Buffer::SetByte ( const SharedPtr< Array< T >> &  array,
int  index,
uint8_t  value 
)
inlinestatic

Interprets the specified typed array as a raw byte array and sets the specified byte value at specified byte offset.

Parameters
arrayThe target array
indexZero-based offset of the byte to set
valueThe byte value to set
Template Parameters
TThe type of elements of the array