|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Manipulates arrays of primitive types efficiently at the byte level. More...
#include <Buffer.h>
Static Public Member Functions | |
| template<typename T> | |
| static void | BlockCopy (Array< T > &src, int srcOffset, Array< T > &dst, int dstOffset, int count) |
| Copies a specified number of bytes from a source array starting at a particular offset to a destination array. | |
| template<typename T> | |
| static int | ByteLength (Array< T > &array) |
| Returns the number of bytes in the specified array. | |
| template<typename T> | |
| static byte | GetByte (Array< T > &array, int index) |
| Retrieves the byte at a specified location in a specified array. | |
| template<typename T> | |
| static void | SetByte (Array< T > &array, int index, byte value) |
| Assigns a specified value to a byte at a particular location in a specified array. | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Additional Inherited Members | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Manipulates arrays of primitive types efficiently at the byte level.
Modeled after .NET System.Buffer. Provides methods to copy bytes between arrays, retrieve individual bytes, assign byte values, and calculate byte lengths.
|
inlinestatic |
Copies a specified number of bytes from a source array starting at a particular offset to a destination array.
| T | Element type of the arrays. |
| src | Source array. |
| srcOffset | Zero-based byte offset into src. |
| dst | Destination array. |
| dstOffset | Zero-based byte offset into dst. |
| count | Number of bytes to copy. |
| DotNetDupe::System::ArgumentNullException | If src or dst is null. |
| DotNetDupe::System::ArgumentOutOfRangeException | If offsets or count are negative. |
| DotNetDupe::System::ArgumentException | If offsets + count exceeds byte length of either array. |
Step: Copy contiguous byte segments from source into destination offset.
Definition at line 38 of file Buffer.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), DotNetDupe::System::ArgumentNullException::ArgumentNullException(), DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), DotNetDupe::System::Array< T >::GetData(), DotNetDupe::System::Array< T >::GetLength(), and DotNetDupe::System::Array< T >::IsNull().
|
inlinestatic |
Returns the number of bytes in the specified array.
| T | Element type of the array. |
| array | The array whose byte length is determined. |
| DotNetDupe::System::ArgumentNullException | If array is null. |
Definition at line 68 of file Buffer.h.
References DotNetDupe::System::ArgumentNullException::ArgumentNullException(), DotNetDupe::System::Array< T >::GetLength(), and DotNetDupe::System::Array< T >::IsNull().
|
inlinestatic |
Retrieves the byte at a specified location in a specified array.
| T | Element type of the array. |
| array | The array to read from. |
| index | Zero-based byte index. |
| DotNetDupe::System::ArgumentOutOfRangeException | If index is out of range. |
Definition at line 81 of file Buffer.h.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), ByteLength(), and DotNetDupe::System::Array< T >::GetData().
|
inlinestatic |
Assigns a specified value to a byte at a particular location in a specified array.
| T | Element type of the array. |
| array | The array to modify. |
| index | Zero-based byte index. |
| value | Byte value to write. |
| DotNetDupe::System::ArgumentOutOfRangeException | If index is out of range. |
Definition at line 94 of file Buffer.h.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), ByteLength(), and DotNetDupe::System::Array< T >::GetData().