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.
More...
|
static void | BlockCopy (const uint8_t *src, int srcOffset, uint8_t *dst, int dstOffset, int count) |
| Copies a specified number of bytes from source buffer to destination buffer. More...
|
|
template<typename TSrc , typename TDst > |
static void | BlockCopy (const SharedPtr< Array< TSrc > > &src, int srcOffset, const SharedPtr< Array< TDst > > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , typename TDst > |
static void | BlockCopy (const System::Details::ArrayView< TSrc > &src, int srcOffset, const System::Details::ArrayView< TDst > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , typename TDst > |
static void | BlockCopy (const SharedPtr< Array< TSrc > > &src, int srcOffset, const System::Details::ArrayView< TDst > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , typename TDst > |
static void | BlockCopy (const System::Details::ArrayView< TSrc > &src, int srcOffset, const SharedPtr< Array< TDst > > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , std::size_t NS, typename TDst , std::size_t ND> |
static void | BlockCopy (const System::Details::StackArray< TSrc, NS > &src, int srcOffset, const System::Details::StackArray< TDst, ND > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , typename TDst , std::size_t ND> |
static void | BlockCopy (const SharedPtr< Array< TSrc > > &src, int srcOffset, const System::Details::StackArray< TDst, ND > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<typename TSrc , std::size_t NS, typename TDst > |
static void | BlockCopy (const System::Details::StackArray< TSrc, NS > &src, int srcOffset, const SharedPtr< Array< TDst > > &dst, int dstOffset, int count) |
| Interprets two specified typed arrays as raw arrays of bytes and copies data from one of them to another. More...
|
|
template<class T > |
static int | ByteLength (const SharedPtr< Array< T > > &array) |
| Determines the number of bytes occupied by all elements of the specified array. More...
|
|
template<class T > |
static int | ByteLength (const System::Details::ArrayView< T > &array) |
| Determines the number of bytes occupied by all elements of the specified array. More...
|
|
template<class T , std::size_t N> |
static int | ByteLength (const System::Details::StackArray< T, N > &array) |
| Determines the number of bytes occupied by all elements of the specified array. More...
|
|
template<typename T > |
static uint8_t | GetByte (const SharedPtr< Array< T > > &array, int index) |
| Interprets the specified typed array as a raw byte array and retrieves the byte value at specified byte offset. More...
|
|
template<typename T > |
static uint8_t | GetByte (const System::Details::ArrayView< T > &array, int index) |
| Interprets the specified typed array as a raw byte array and retrieves the byte value at specified byte offset. More...
|
|
template<typename T , std::size_t N> |
static uint8_t | GetByte (const System::Details::StackArray< T, N > &array, int index) |
| Interprets the specified typed array as a raw byte array and retrieves the byte value at specified byte offset. More...
|
|
template<typename T > |
static void | SetByte (const SharedPtr< Array< T > > &array, int index, uint8_t value) |
| Interprets the specified typed array as a raw byte array and sets the specified byte value at specified byte offset. More...
|
|
template<typename T > |
static void | SetByte (const System::Details::ArrayView< T > &array, int index, uint8_t value) |
| Interprets the specified typed array as a raw byte array and sets the specified byte value at specified byte offset. More...
|
|
template<typename T , std::size_t N> |
static void | SetByte (const System::Details::StackArray< T, N > &array, int index, uint8_t value) |
| Interprets the specified typed array as a raw byte array and sets the specified byte value at specified byte offset. More...
|
|
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.
#include <system/buffer.h>
{
for (auto i = 0; i < size; i++)
{
std::cout << static_cast<int>(source[i]) << ' ';
}
std::cout << std::endl;
}
int main()
{
const int SIZE = 16;
auto first = MakeObject<Array<uint8_t>>(SIZE);
for (auto i = 0; i < SIZE; ++i)
{
first[i] = static_cast<uint8_t>(i * 2);
}
auto second = MakeObject<Array<uint8_t>>(SIZE / 2);
return 0;
}
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:259
static void BlockCopy(const uint8_t *src, int srcOffset, uint8_t *dst, int dstOffset, int count)
Copies a specified number of bytes from source buffer to destination buffer.
static void SetByte(const SharedPtr< Array< T > > &array, int index, uint8_t value)
Interprets the specified typed array as a raw byte array and sets the specified byte value at specifi...
Definition: buffer.h:285
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: db_command.h:9